local HealBot_Options_ComboButtons_Modifier=1
local HealBot_Options_SkinsComboButtons_Modifier=1
local HealBot_buffbarcolr={};
local HealBot_buffbarcolg={};
local HealBot_buffbarcolb={};
local HealBot_DebuffWatchTarget={}
local HealBot_BuffWatchTarget={}
local BuffTextClass=nil
local DoneInitTab={}
local ClickedBuffGroupDD=nil
local hbCurSkin=""
local hbCurSkinSubFrameID=1001
local _,g
local HealBot_DebuffSpell={};
local HealBot_DebuffType={};
local customDebuffPriority=hbv_GetStatic("cDebuff")
local customBuffPriority=hbv_GetStatic("cBuff")

local HealBot_Options_TabRunOnce={}
local HealBot_CDebuffCasyBy_List={}
local HealBot_CDebuffCasyBy_Indexed_List={}
local HealBot_Buff_WeaponEnchant_List={[1]={},[2]={}}
local HealBot_Options_AggroAlertLevel_List={}
local HealBot_Options_AuxAssign_List={}
local HealBot_Options_AuxOverlap_List={}
local HealBot_Options_AuxBarColours_List={}
local HealBot_Options_AuxBarOpacityType_List={}
local HealBot_Options_AuxBarAnchor_List={}
local HealBot_Options_Class_HoTctlAction_List={}
local HealBot_Options_Class_HoTctlIDMethod_List={}
local HealBot_Options_UseOverrideFocusGroups_List={}
local HealBot_Options_FilterHoTctl_List={
        HEALBOT_CLASSES_ALL,
        HEALBOT_DEATHKNIGHT,
        HEALBOT_DEMONHUNTER,
        HEALBOT_DRUID,
        HEALBOT_EVOKER,
        HEALBOT_PALADIN,
        HEALBOT_MONK,
        HEALBOT_PRIEST,
        HEALBOT_SHAMAN,
        HEALBOT_WARRIOR,
        HEALBOT_HUNTER,
        HEALBOT_MAGE,
        HEALBOT_ROGUE,
        HEALBOT_WARLOCK,
    }
local HealBot_Options_ManaIndicator_List={}
local HealBot_Options_BarsGrowDirection_List={}
local HealBot_Options_BarsOrientation_List={}
local HealBot_Options_ActionAnchor_List={}
local HealBot_Options_ActionBarsCombo_List={}
local HealBot_Options_UseOverrides_List={}
local HealBot_Options_Sort_List={}
local HealBot_Options_EmergencyFClass_List={}
local HealBot_Options_hbCommands_List={}
local HealBot_Options_hbProfile_List={}
local HealBot_Options_hbLangs_List={}
local HealBot_Options_TooltipFontSize_List={}
local HealBot_Options_EmoteCat_List={}
local HealBot_Options_EmoteCombat_List={}
local HealBot_Options_EmoteEmotion_List={}
local HealBot_Options_EmoteHappy_List={}
local HealBot_Options_EmoteGreet_List={}
local HealBot_Options_EmoteOther_List={}
local HealBot_Options_EmoteRespect_List={}
local HealBot_Options_EmoteUnhappy_List={}
local HealBot_Options_ExtraSkinsCat_List={}
local HealBot_Options_TestBarsProfile_List={}
local HealBot_Options_ButtonCastMethod_List={}
local HealBot_Options_BarHealthType_List={}
local HealBot_Options_BarHealthAnchor_List={}
local HealBot_Options_AbsorbColour_List={}
local HealBot_Options_BarIncHealColour_List={}
local HealBot_Options_BarHealthColour_List={}
local HealBot_Options_EnemyOOC_List={}
local HealBot_Options_EnemyCombat_List={}
local HealBot_Options_BarHealthIncHeal_List={}
local HealBot_Options_BarHealthIncAbsorb_List={}
local HealBot_Options_BarHealthOverHeal_List={}
local HealBot_Options_FontOutline_List={}
local HealBot_Options_BuffTxt_List={}
local HealBot_Options_HealGroupsFrame_List={}
local HealBot_Options_TargetFocusInCombat_List={}
local HealBot_Options_NoDuplcates={}
local HealBot_Options_Lists={}
local hbOptionsTooltip=CreateFrame("GameTooltip", "hbOptionsTooltip", nil, "GameTooltipTemplate")
local HealBot_ComboKeys_List={"","Shift","Ctrl","Alt","Alt-Shift","Ctrl-Shift","Alt-Ctrl","Alt-Ctrl-Shift"}
local HealBot_Font_Outline={[1]="", [2]="OUTLINE", [3]="THICKOUTLINE"}
local HealBot_Options_BindsKeyList={}
local HealBot_Options_BindsKeyListRead={}
HealBot_Options_BindsKeyList[1]=""
HealBot_Options_BindsKeyList[2]="MOUSEWHEELUP"
HealBot_Options_BindsKeyList[3]="MOUSEWHEELDOWN"
HealBot_Options_BindsKeyListRead[1]=HEALBOT_WORDS_NONE
HealBot_Options_BindsKeyListRead[2]="Mouse Wheel Up"
HealBot_Options_BindsKeyListRead[3]="Mouse Wheel Down"
for x=0,9 do
    HealBot_Options_BindsKeyList[x+4]=""..x
    HealBot_Options_BindsKeyListRead[x+4]=""..x
end
for x=0,9 do
    HealBot_Options_BindsKeyList[x+14]="NUMPAD"..x
    HealBot_Options_BindsKeyListRead[x+14]="NumPad "..x
end
for x=65,90 do
    HealBot_Options_BindsKeyList[x-41]=string.char(x)
    HealBot_Options_BindsKeyListRead[x-41]=string.char(x)
end
HealBot_Options_BindsKeyList[50]="INSERT"
HealBot_Options_BindsKeyList[51]="DELETE"
HealBot_Options_BindsKeyList[52]="HOME"
HealBot_Options_BindsKeyList[53]="END"
HealBot_Options_BindsKeyList[54]="PAGEUP"
HealBot_Options_BindsKeyList[55]="PAGEDOWN"
HealBot_Options_BindsKeyList[56]="UP"
HealBot_Options_BindsKeyList[57]="LEFT"
HealBot_Options_BindsKeyList[58]="DOWN"
HealBot_Options_BindsKeyList[59]="RIGHT"
HealBot_Options_BindsKeyListRead[50]="Insert"
HealBot_Options_BindsKeyListRead[51]="Delete"
HealBot_Options_BindsKeyListRead[52]="Home"
HealBot_Options_BindsKeyListRead[53]="End"
HealBot_Options_BindsKeyListRead[54]="Page Up"
HealBot_Options_BindsKeyListRead[55]="Page Down"
HealBot_Options_BindsKeyListRead[56]="Up Arrow"
HealBot_Options_BindsKeyListRead[57]="Left Arrow"
HealBot_Options_BindsKeyListRead[58]="Down Arrow"
HealBot_Options_BindsKeyListRead[59]="Right Arrow"
HealBot_Options_BindsKeyList[60]="\\\\"
HealBot_Options_BindsKeyList[61]="/"
HealBot_Options_BindsKeyList[62]=","
HealBot_Options_BindsKeyList[63]="."
HealBot_Options_BindsKeyList[64]=";"
HealBot_Options_BindsKeyList[65]="'"
HealBot_Options_BindsKeyList[66]="#"
HealBot_Options_BindsKeyList[67]="["
HealBot_Options_BindsKeyList[68]="]"
HealBot_Options_BindsKeyList[69]="-"
HealBot_Options_BindsKeyList[70]="="
HealBot_Options_BindsKeyList[71]="`"
HealBot_Options_BindsKeyList[72]="LMETA"
HealBot_Options_BindsKeyList[73]="RMETA"
HealBot_Options_BindsKeyListRead[60]="\\"
HealBot_Options_BindsKeyListRead[61]="/"
HealBot_Options_BindsKeyListRead[62]=","
HealBot_Options_BindsKeyListRead[63]="."
HealBot_Options_BindsKeyListRead[64]=";"
HealBot_Options_BindsKeyListRead[65]="'"
HealBot_Options_BindsKeyListRead[66]="#"
HealBot_Options_BindsKeyListRead[67]="["
HealBot_Options_BindsKeyListRead[68]="]"
HealBot_Options_BindsKeyListRead[69]="-"
HealBot_Options_BindsKeyListRead[70]="="
HealBot_Options_BindsKeyListRead[71]="`"
HealBot_Options_BindsKeyListRead[72]="Left Windows"
HealBot_Options_BindsKeyListRead[73]="Right Windows"
for x=1,12 do
    HealBot_Options_BindsKeyList[x+73]="F"..x
    HealBot_Options_BindsKeyListRead[x+73]="F"..x
end

function HealBot_Options_retBindKey(id)
      --HealBot_setCall("HealBot_Options_retBindKey")
    return HealBot_Options_BindsKeyList[id]
end

function HealBot_Options_retBindRead(id)
      --HealBot_setCall("HealBot_Options_retBindKey")
    return HealBot_Options_BindsKeyListRead[id]
end

function HealBot_Options_retBindLists()
      --HealBot_setCall("HealBot_Options_retBindLists")
    return HealBot_Options_BindsKeyList, HealBot_Options_BindsKeyListRead
end

local OptionThemes={[1]={["egdeFile"]="Interface\\DialogFrame\\UI-DialogBox-Gold-Border", ["egdeSize"]=18,
                         ["TitleBox"]="Interface\\DialogFrame\\UI-DialogBox-Gold-Header",
                         ["R"]=1,["G"]=0.82,["B"]=0,["A"]=0.9,["Classic"]=true},
                    [2]={["egdeFile"]="Interface\\DialogFrame\\UI-DialogBox-Border", ["egdeSize"]=18,
                         ["TitleBox"]="Interface\\DialogFrame\\UI-DialogBox-Header",
                         ["R"]=0.84,["G"]=0.84,["B"]=0.84,["A"]=0.95,["Classic"]=true},
                    [3]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_WORD_AQUA
                         ["TitleBox"]="",
                         ["R"]=0.32,["G"]=1,["B"]=1,["A"]=0.98,["Classic"]=false},
                    [4]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_WORD_BLUE
                         ["TitleBox"]="",
                         ["R"]=0.15,["G"]=0.4,["B"]=1,["A"]=1,["Classic"]=false},
                    [5]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_WORD_DARK
                         ["TitleBox"]="",
                         ["R"]=0.4,["G"]=0.4,["B"]=0.4,["A"]=1,["Classic"]=false},
                    [6]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_WORD_FUCHSIA
                         ["TitleBox"]="",
                         ["R"]=1,["G"]=0.4,["B"]=0.8,["A"]=1,["Classic"]=false},
                    [7]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_WORD_GREEN
                         ["TitleBox"]="",
                         ["R"]=0.05,["G"]=0.7,["B"]=0.1,["A"]=1,["Classic"]=false},
                    [8]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_WORD_LIME
                         ["TitleBox"]="",
                         ["R"]=0.2,["G"]=1,["B"]=0.2,["A"]=1,["Classic"]=false},
                    [9]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_WORD_ORANGE
                         ["TitleBox"]="",
                         ["R"]=1,["G"]=0.58,["B"]=0,["A"]=1,["Classic"]=false},
                   [10]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_WORD_PURPLE
                         ["TitleBox"]="",
                         ["R"]=0.8,["G"]=0,["B"]=0.8,["A"]=1,["Classic"]=false},
                   [11]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_WORD_RED
                         ["TitleBox"]="",
                         ["R"]=1,["G"]=0.1,["B"]=0.1,["A"]=1,["Classic"]=false},
                   [12]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --  HEALBOT_WORD_TEAL
                         ["TitleBox"]="",
                         ["R"]=0.02,["G"]=0.58,["B"]=0.58,["A"]=1,["Classic"]=false},
                   [13]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_WORD_WHITE
                         ["TitleBox"]="",
                         ["R"]=1,["G"]=1,["B"]=1,["A"]=1,["Classic"]=false},
                   [14]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_WORD_YELLOW
                         ["TitleBox"]="",
                         ["R"]=1,["G"]=1,["B"]=0,["A"]=1,["Classic"]=false},
                   [15]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_DEATHKNIGHT
                         ["TitleBox"]="",
                         ["R"]=0.77,["G"]=0.12,["B"]=0.23,["A"]=1,["Classic"]=false},
                   [16]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_DEMONHUNTER
                         ["TitleBox"]="",
                         ["R"]=0.64,["G"]=0.19,["B"]=0.79,["A"]=1,["Classic"]=false},
                   [17]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_DRUID
                         ["TitleBox"]="",
                         ["R"]=1,["G"]=0.49,["B"]=0.04,["A"]=1,["Classic"]=false},
                   [18]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_EVOKER
                         ["TitleBox"]="",
                         ["R"]=0.22,["G"]=0.59,["B"]=0.49,["A"]=1,["Classic"]=false},
                   [19]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_HUNTER
                         ["TitleBox"]="",
                         ["R"]=0.67,["G"]=0.83,["B"]=0.45,["A"]=1,["Classic"]=false},
                   [20]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_MAGE
                         ["TitleBox"]="",
                         ["R"]=0.25,["G"]=0.78,["B"]=0.92,["A"]=1,["Classic"]=false},
                   [21]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_MONK
                         ["TitleBox"]="",
                         ["R"]=0,["G"]=1,["B"]=0.59,["A"]=1,["Classic"]=false},
                   [22]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_PALADIN
                         ["TitleBox"]="",
                         ["R"]=0.96,["G"]=0.55,["B"]=0.73,["A"]=1,["Classic"]=false},
                   [23]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_PRIEST
                         ["TitleBox"]="",
                         ["R"]=1,["G"]=1,["B"]=1,["A"]=1,["Classic"]=false},
                   [24]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_ROGUE
                         ["TitleBox"]="",
                         ["R"]=1,["G"]=0.96,["B"]=0.41,["A"]=1,["Classic"]=false},
                   [25]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_SHAMAN
                         ["TitleBox"]="",
                         ["R"]=0,["G"]=0.44,["B"]=0.87,["A"]=1,["Classic"]=false},
                   [26]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_WARLOCK
                         ["TitleBox"]="",
                         ["R"]=0.53,["G"]=0.53,["B"]=0.93,["A"]=1,["Classic"]=false},
                   [27]={["egdeFile"]="Interface\\Tooltips\\UI-Tooltip-Border", ["egdeSize"]=22, --    HEALBOT_WARRIOR
                         ["TitleBox"]="",
                         ["R"]=0.78,["G"]=0.61,["B"]=0.43,["A"]=1,["Classic"]=false},
                    }

if not HealBot_Globals.OptionsTheme then HealBot_Globals.OptionsTheme=1 end

local hb_lVars={}
hb_lVars["Frame"]=1
hb_lVars["customDebuffPriority"]=15
hb_lVars["OptionsOpacityAdj"]=0.35
hb_lVars["ModKeyShift"]=false
hb_lVars["ModKeyCtrl"]=false
hb_lVars["ModKeyAlt"]=false
hb_lVars["AuxBar"]=1
hb_lVars["AuxTxtBar"]=1
hb_lVars["cSkin"]=""
hb_lVars["HeaderSwitchNumColsHdrOn"]=0
hb_lVars["HeaderSwitchNumColsHdrOff"]=0
hb_lVars["TestBarsOn"]=false
hb_lVars["mapName"]=""
hb_lVars["SpellsTabOpenWarnId"]=0
hb_lVars["HoTlvl"]=0
hb_lVars["CDClvl"]=0
hb_lVars["CDCSelflvl"]=0
hb_lVars["BuffIconSet"]=1
hb_lVars["DebuffIconSet"]=1
hb_lVars["ActionIconsID"]=1
hb_lVars["ActionIconsCopyFrom"]=1
hb_lVars["ActionIconsCondNo"]=1
hb_lVars["CDebuffcustomSpellID"]=1
hb_lVars["BuffByHistoryFilter"]=1
hb_lVars["DebuffByHistoryFilter"]=1
hb_lVars["AIconBuffByHistoryFilter"]=1
hb_lVars["AIconDebuffByHistoryFilter"]=1


function HealBot_Options_setLuVars(vName, vValue)
      --HealBot_setCall("HealBot_Options_setLuVars - "..vName)
    hb_lVars[vName]=vValue
end

function HealBot_Options_retLuVars(vName)
      --HealBot_setCall("HealBot_Options_retLuVars - "..vName)
    return hb_lVars[vName]
end

local HealBot_Debuff_Types={}

local optionsPanel=CreateFrame("Frame")
optionsPanel.name=HEALBOT_HEALBOT
local optionsTitle, optionsText, optionsButton
if InterfaceOptions_AddCategory then
	InterfaceOptions_AddCategory(optionsPanel)
else
	local category=Settings.RegisterCanvasLayoutCategory(optionsPanel, optionsPanel.name);
	Settings.RegisterAddOnCategory(category);
end
optionsTitle=optionsPanel:CreateFontString(nil, "ARTWORK", "GameFontNormalLarge")
optionsTitle:SetPoint("TOPLEFT", 16, -16)
optionsTitle:SetText(HEALBOT_HEALBOT)
optionsText=optionsPanel:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
optionsText:SetPoint("TOPLEFT", optionsTitle, "BOTTOMLEFT", 0, -8)
optionsText:SetText(HEALBOT_ABOUT_DESC1)
optionsButton=CreateFrame("Button", nil, optionsPanel, "UIPanelButtonTemplate")

function HealBot_Options_InitDebuffTypes()
      --HealBot_setCall("HealBot_Options_InitDebuffTypes")
    local hbPURIFICATION_POTION=HealBot_WoWAPI_ItemInfoInstant(HEALBOT_PURIFICATION_POTION) or "Purification Potion"
    local hbANTI_VENOM=HealBot_WoWAPI_ItemInfoInstant(HEALBOT_ANTI_VENOM) or "Anti-Venom"
    local hbPOWERFUL_ANTI_VENOM=HealBot_WoWAPI_ItemInfoInstant(HEALBOT_POWERFUL_ANTI_VENOM) or "Powerful Anti-Venom"
    local hbSTONEFORM=HealBot_WoWAPI_SpellName(HEALBOT_STONEFORM) or "Stoneform"
    if HEALBOT_GAME_VERSION<5 then
        HealBot_Debuff_Types={
            [HEALBOT_REMOVE_CURSE]={HEALBOT_CURSE_en},
            [HEALBOT_REMOVE_GREATER_CURSE]={HEALBOT_MAGIC_en, HEALBOT_CURSE_en},
            [hbPURIFICATION_POTION]={HEALBOT_CURSE_en, HEALBOT_DISEASE_en, HEALBOT_POISON_en},
            [hbANTI_VENOM]={HEALBOT_POISON_en},
            [hbPOWERFUL_ANTI_VENOM]={HEALBOT_POISON_en},
            [hbSTONEFORM]={HEALBOT_BLEED_en, HEALBOT_DISEASE_en, HEALBOT_POISON_en},
            [HBC_SHAMAN_CURE_POISON]={HEALBOT_POISON_en},
            [HBC_DRUID_CURE_POISON]={HEALBOT_POISON_en},
            [HBC_DRUID_ABOLISH_POISON]={HEALBOT_POISON_en},
            [HBC_DRUID_REMOVE_CURSE]={HEALBOT_CURSE_en},
            [HBC_DISPELL_MAGIC]={HEALBOT_MAGIC_en},
            [HBC_SHAMAN_CURE_DISEASE]={HEALBOT_DISEASE_en},
            [HBC_PRIEST_CURE_DISEASE]={HEALBOT_DISEASE_en},
            [HBC_PRIEST_ABOLISH_DISEASE]={HEALBOT_DISEASE_en},
            [HEALBOT_CLEANSE_SPIRIT]={HEALBOT_CURSE_en, HEALBOT_DISEASE_en, HEALBOT_POISON_en},
        }

        if UnitLevel("player")<41 then
            HealBot_Debuff_Types[HEALBOT_CLEANSE]={HEALBOT_DISEASE_en, HEALBOT_POISON_en, HEALBOT_MAGIC_en}
            HealBot_Debuff_Types[HBC_PURIFY]= {HEALBOT_POISON_en, HEALBOT_DISEASE_en}
        else
            HealBot_Debuff_Types[HBC_PURIFY]= {HEALBOT_POISON_en, HEALBOT_DISEASE_en}
            HealBot_Debuff_Types[HEALBOT_CLEANSE]={HEALBOT_DISEASE_en, HEALBOT_POISON_en, HEALBOT_MAGIC_en}
        end
        hb_lVars["HEALBOT_LAY_ON_HANDS"]=HealBot_WoWAPI_SpellName(HEALBOT_LAY_ON_HANDS)
    else
        local hbELIXIR_OF_POISON_RES=HealBot_WoWAPI_ItemInfoInstant(HEALBOT_ELIXIR_OF_POISON_RES) or "Potion of Curing"
        local hbPOTION_OF_SOUL_PURITY=HealBot_WoWAPI_ItemInfoInstant(HEALBOT_POTION_OF_SOUL_PURITY) or "Potion of Soul Purity"
        local hbPHIAL_OF_SERENITY=HealBot_WoWAPI_ItemInfoInstant(HEALBOT_PHIAL_OF_SERENITY) or "Phial of Serenity"
        HealBot_Debuff_Types={
            [HEALBOT_CLEANSE]={HEALBOT_MAGIC_en},
            [HEALBOT_REMOVE_CURSE]={HEALBOT_CURSE_en},
            [HEALBOT_REMOVE_CORRUPTION]={HEALBOT_CURSE_en, HEALBOT_POISON_en},
            [HEALBOT_NATURES_CURE]={HEALBOT_MAGIC_en},
            [HEALBOT_IMPROVED_NATURES_CURE]={HEALBOT_MAGIC_en, HEALBOT_CURSE_en, HEALBOT_POISON_en},
            [HEALBOT_PURIFY_DISEASE]={HEALBOT_DISEASE_en},
            [HEALBOT_PURIFY]={HEALBOT_MAGIC_en},
            [hbPURIFICATION_POTION]={HEALBOT_CURSE_en, HEALBOT_DISEASE_en, HEALBOT_POISON_en},
            [hbANTI_VENOM]={HEALBOT_POISON_en},
            [hbPOWERFUL_ANTI_VENOM]={HEALBOT_POISON_en},
            [HEALBOT_CLEANSE_TOXIN]={HEALBOT_DISEASE_en, HEALBOT_POISON_en},
            [hbELIXIR_OF_POISON_RES]={HEALBOT_POISON_en},
            [hbSTONEFORM]={HEALBOT_BLEED_en, HEALBOT_MAGIC_en, HEALBOT_CURSE_en, HEALBOT_DISEASE_en, HEALBOT_POISON_en},
            [HEALBOT_PURIFY_SPIRIT]={HEALBOT_MAGIC_en},
            [HEALBOT_MASS_DISPEL]={HEALBOT_MAGIC_en},
            [HEALBOT_CLEANSE_SPIRIT]={HEALBOT_CURSE_en},
            [HEALBOT_DETOX]={HEALBOT_DISEASE_en, HEALBOT_POISON_en},
            [hbPOTION_OF_SOUL_PURITY]={HEALBOT_CURSE_en, HEALBOT_DISEASE_en, HEALBOT_POISON_en},
            [hbPHIAL_OF_SERENITY]={HEALBOT_CURSE_en, HEALBOT_DISEASE_en, HEALBOT_POISON_en},
            [HEALBOT_NATURALIZE]={HEALBOT_MAGIC_en, HEALBOT_POISON_en},
            [HEALBOT_CAUTERIZING_FLAME]={HEALBOT_BLEED_en, HEALBOT_CURSE_en, HEALBOT_DISEASE_en, HEALBOT_POISON_en},
            [HEALBOT_EXPUNGE]={HEALBOT_POISON_en},
            [HEALBOT_DETOX]={HEALBOT_MAGIC_en, HEALBOT_DISEASE_en, HEALBOT_POISON_en},
        }
    end
    HealBot_Debuff_Types[HEALBOT_POISON]= {HEALBOT_POISON_en}
    HealBot_Debuff_Types[HEALBOT_CURSE]= {HEALBOT_CURSE_en}
    HealBot_Debuff_Types[HEALBOT_MAGIC]= {HEALBOT_MAGIC_en}
    HealBot_Debuff_Types[HEALBOT_DISEASE]= {HEALBOT_DISEASE_en}
    HealBot_Debuff_Types[HEALBOT_BLEED]= {HEALBOT_BLEED_en}
end

local hbDebuffSpellEnd,hbDebuffSpellStart,hbDebuffSpellDuration=0,0,0
function HealBot_Options_DebuffSpellAuraCD(spellName)
      --HealBot_setCall("HealBot_Options_DebuffSpellAuraCD")
    if HealBot_Debuff_Types[spellName] then
        hbDebuffSpellStart, hbDebuffSpellDuration=HealBot_WoWAPI_SpellCooldown(spellName)
        if hbDebuffSpellDuration>2 then
            hbDebuffSpellEnd=((hbDebuffSpellStart or 0)+(hbDebuffSpellDuration or 0))-0.1
            table.foreach(HealBot_Debuff_Types[spellName], function (i,dType)
                HealBot_Aura_setDebuffTypeCD(dType, hbDebuffSpellEnd)
            end)
            HealBot_Timers_Set("AURA","UpdateActiveDebuffs")
            C_Timer.After(hbDebuffSpellDuration-0.05, HealBot_Update_AllDebuffsReindexActives)
        end
    end
end

local HealBot_ExtraSkins_Image
local hbCustomDebuff_Text={}
local hbCustomBuff_Text={}
local hbActionIcons_Text={}
function HealBot_Options_InitVars()
      --HealBot_setCall("HealBot_Options_InitVars")
    customDebuffPriority=hbv_GetStatic("cDebuff")
    customBuffPriority=hbv_GetStatic("cBuff")
    if not HealBot_Globals.OptionsTheme then HealBot_Globals.OptionsTheme=1 end
    if not HealBot_Globals.CDCBarColour[customDebuffPriority] or type(HealBot_Globals.CDCBarColour[customDebuffPriority]) == "number" then
        HealBot_Globals.CDCBarColour[customDebuffPriority]={}
        HealBot_Globals.CDCBarColour[customDebuffPriority].R=0.45
        HealBot_Globals.CDCBarColour[customDebuffPriority].G=0
        HealBot_Globals.CDCBarColour[customDebuffPriority].B=0.26
    end
    optionsButton:SetText(HEALBOT_ACTION_OPTIONS)
    optionsButton:SetWidth(100)
    optionsButton:SetPoint("TOPLEFT", 14, -58)
    optionsButton:SetScript('OnClick', function()
        HealBot_Options_ShowHide()
    end)
    local f=_G["HealBot_Options_ShareExternalEditBoxFrame"]
    HealBot_ExtraSkins_Image=f:CreateTexture(nil, "BACKGROUND")
   -- HealBot_ExtraSkins_Image:SetAllPoints(f)
    HealBot_ExtraSkins_Image:SetColorTexture(0,0,0,0)
    HealBot_ExtraSkins_Image:SetHorizTile(true)
    HealBot_ExtraSkins_Image:SetVertTile(true)
    HealBot_ExtraSkins_Image:SetPoint("CENTER",0,-20)
    g=_G["HealBot_Options_ExtraSkinsDesc"]
    g:SetTextColor(1,1,1,1)
    g:SetSpacing(2)
    g=_G["HealBot_Options_FrameAliasFixedFrame"]
    g:Hide()

    g=_G["HealBot_Options_CustomCureFrame"]
    hbCustomDebuff_Text[0]={}
    hbCustomDebuff_Text[0]["Prio"]=g:CreateFontString()
    hbCustomDebuff_Text[0]["Prio"]:SetFontObject(GameFontNormal)
    hbCustomDebuff_Text[0]["Prio"]:SetTextColor(1,1,1,1)
    hbCustomDebuff_Text[0]["Prio"]:SetText(HEALBOT_WORD_PRIORITY)
    hbCustomDebuff_Text[0]["Prio"]:SetPoint("TOPLEFT", 20, -265)
    hbCustomDebuff_Text[0]["ID"]=g:CreateFontString()
    hbCustomDebuff_Text[0]["ID"]:SetFontObject(GameFontNormal)
    hbCustomDebuff_Text[0]["ID"]:SetTextColor(1,1,1,1)
    hbCustomDebuff_Text[0]["ID"]:SetText(HEALBOT_OPTIONS_CUSTOM_IDMETHODSID)
    hbCustomDebuff_Text[0]["ID"]:SetPoint("TOPLEFT", 80, -265)
    hbCustomDebuff_Text[0]["Name"]=g:CreateFontString()
    hbCustomDebuff_Text[0]["Name"]:SetFontObject(GameFontNormal)
    hbCustomDebuff_Text[0]["Name"]:SetTextColor(1,1,1,1)
    hbCustomDebuff_Text[0]["Name"]:SetText(HEALBOT_WORDS_SPELLNAME)
    hbCustomDebuff_Text[0]["Name"]:SetPoint("TOPLEFT", 140, -265)
    hbCustomDebuff_Text[0]["Tag"]=g:CreateFontString()
    hbCustomDebuff_Text[0]["Tag"]:SetFontObject(GameFontNormal)
    hbCustomDebuff_Text[0]["Tag"]:SetTextColor(1,1,1,1)
    hbCustomDebuff_Text[0]["Tag"]:SetText(HEALBOT_WORD_TAG)
    hbCustomDebuff_Text[0]["Tag"]:SetPoint("TOPLEFT", 340, -265)
    for x=1,15 do
        hbCustomDebuff_Text[x]={}
        hbCustomDebuff_Text[x]["Prio"]=g:CreateFontString()
        hbCustomDebuff_Text[x]["Prio"]:SetFontObject(GameFontNormalSmall)
        hbCustomDebuff_Text[x]["ID"]=g:CreateFontString()
        hbCustomDebuff_Text[x]["ID"]:SetFontObject(GameFontNormalSmall)
        hbCustomDebuff_Text[x]["Name"]=g:CreateFontString()
        hbCustomDebuff_Text[x]["Name"]:SetFontObject(GameFontNormalSmall)
        hbCustomDebuff_Text[x]["Tag"]=g:CreateFontString()
        hbCustomDebuff_Text[x]["Tag"]:SetFontObject(GameFontNormalSmall)
    end
    hbCustomDebuff_Text[1]["Prio"]:SetPoint("TOPLEFT", hbCustomDebuff_Text[0]["Prio"], "BOTTOMLEFT", 0, -5)
    hbCustomDebuff_Text[1]["ID"]:SetPoint("TOPLEFT", hbCustomDebuff_Text[0]["ID"], "BOTTOMLEFT", 0, -5)
    hbCustomDebuff_Text[1]["Name"]:SetPoint("TOPLEFT", hbCustomDebuff_Text[0]["Name"], "BOTTOMLEFT", 0, -5)
    hbCustomDebuff_Text[1]["Tag"]:SetPoint("TOPLEFT", hbCustomDebuff_Text[0]["Tag"], "BOTTOMLEFT", 0, -5)
    for x=2,15 do
        hbCustomDebuff_Text[x]["Prio"]:SetPoint("TOPLEFT", hbCustomDebuff_Text[x-1]["Prio"], "TOPLEFT", 0, -12)
        hbCustomDebuff_Text[x]["ID"]:SetPoint("TOPLEFT", hbCustomDebuff_Text[x-1]["ID"], "TOPLEFT", 0, -12)
        hbCustomDebuff_Text[x]["Name"]:SetPoint("TOPLEFT", hbCustomDebuff_Text[x-1]["Name"], "TOPLEFT", 0, -12)
        hbCustomDebuff_Text[x]["Tag"]:SetPoint("TOPLEFT", hbCustomDebuff_Text[x-1]["Tag"], "TOPLEFT", 0, -12)
    end

    g=_G["HealBot_Options_BuffIconFrame"]
    hbCustomBuff_Text[0]={}
    hbCustomBuff_Text[0]["Prio"]=g:CreateFontString()
    hbCustomBuff_Text[0]["Prio"]:SetFontObject(GameFontNormal)
    hbCustomBuff_Text[0]["Prio"]:SetTextColor(1,1,1,1)
    hbCustomBuff_Text[0]["Prio"]:SetText(HEALBOT_WORD_PRIORITY)
    hbCustomBuff_Text[0]["Prio"]:SetPoint("TOPLEFT", 20, -265)
    hbCustomBuff_Text[0]["ID"]=g:CreateFontString()
    hbCustomBuff_Text[0]["ID"]:SetFontObject(GameFontNormal)
    hbCustomBuff_Text[0]["ID"]:SetTextColor(1,1,1,1)
    hbCustomBuff_Text[0]["ID"]:SetText(HEALBOT_OPTIONS_CUSTOM_IDMETHODSID)
    hbCustomBuff_Text[0]["ID"]:SetPoint("TOPLEFT", 80, -265)
    hbCustomBuff_Text[0]["Name"]=g:CreateFontString()
    hbCustomBuff_Text[0]["Name"]:SetFontObject(GameFontNormal)
    hbCustomBuff_Text[0]["Name"]:SetTextColor(1,1,1,1)
    hbCustomBuff_Text[0]["Name"]:SetText(HEALBOT_WORDS_SPELLNAME)
    hbCustomBuff_Text[0]["Name"]:SetPoint("TOPLEFT", 140, -265)
    hbCustomBuff_Text[0]["Tag"]=g:CreateFontString()
    hbCustomBuff_Text[0]["Tag"]:SetFontObject(GameFontNormal)
    hbCustomBuff_Text[0]["Tag"]:SetTextColor(1,1,1,1)
    hbCustomBuff_Text[0]["Tag"]:SetText(HEALBOT_WORD_TAG)
    hbCustomBuff_Text[0]["Tag"]:SetPoint("TOPLEFT", 340, -265)
    for x=1,15 do
        hbCustomBuff_Text[x]={}
        hbCustomBuff_Text[x]["Prio"]=g:CreateFontString()
        hbCustomBuff_Text[x]["Prio"]:SetFontObject(GameFontNormalSmall)
        hbCustomBuff_Text[x]["ID"]=g:CreateFontString()
        hbCustomBuff_Text[x]["ID"]:SetFontObject(GameFontNormalSmall)
        hbCustomBuff_Text[x]["Name"]=g:CreateFontString()
        hbCustomBuff_Text[x]["Name"]:SetFontObject(GameFontNormalSmall)
        hbCustomBuff_Text[x]["Tag"]=g:CreateFontString()
        hbCustomBuff_Text[x]["Tag"]:SetFontObject(GameFontNormalSmall)
    end
    hbCustomBuff_Text[1]["Prio"]:SetPoint("TOPLEFT", hbCustomBuff_Text[0]["Prio"], "BOTTOMLEFT", 0, -5)
    hbCustomBuff_Text[1]["ID"]:SetPoint("TOPLEFT", hbCustomBuff_Text[0]["ID"], "BOTTOMLEFT", 0, -5)
    hbCustomBuff_Text[1]["Name"]:SetPoint("TOPLEFT", hbCustomBuff_Text[0]["Name"], "BOTTOMLEFT", 0, -5)
    hbCustomBuff_Text[1]["Tag"]:SetPoint("TOPLEFT", hbCustomBuff_Text[0]["Tag"], "BOTTOMLEFT", 0, -5)
    for x=2,15 do
        hbCustomBuff_Text[x]["Prio"]:SetPoint("TOPLEFT", hbCustomBuff_Text[x-1]["Prio"], "TOPLEFT", 0, -12)
        hbCustomBuff_Text[x]["ID"]:SetPoint("TOPLEFT", hbCustomBuff_Text[x-1]["ID"], "TOPLEFT", 0, -12)
        hbCustomBuff_Text[x]["Name"]:SetPoint("TOPLEFT", hbCustomBuff_Text[x-1]["Name"], "TOPLEFT", 0, -12)
        hbCustomBuff_Text[x]["Tag"]:SetPoint("TOPLEFT", hbCustomBuff_Text[x-1]["Tag"], "TOPLEFT", 0, -12)
    end

    g=_G["HealBot_Options_SkinsFrameActionIconsIcons"]
    hbActionIcons_Text[0]={}
    hbActionIcons_Text[0]["ID"]=g:CreateFontString()
    hbActionIcons_Text[0]["ID"]:SetFontObject(GameFontNormal)
    hbActionIcons_Text[0]["ID"]:SetTextColor(1,1,1,1)
    hbActionIcons_Text[0]["ID"]:SetText(HEALBOT_OPTIONS_ID)
    hbActionIcons_Text[0]["ID"]:SetPoint("TOPLEFT", 40, -50)
    hbActionIcons_Text[0]["Ability"]=g:CreateFontString()
    hbActionIcons_Text[0]["Ability"]:SetFontObject(GameFontNormal)
    hbActionIcons_Text[0]["Ability"]:SetTextColor(1,1,1,1)
    hbActionIcons_Text[0]["Ability"]:SetText(HEALBOT_OPTIONS_ABILITY)
    hbActionIcons_Text[0]["Ability"]:SetPoint("TOPLEFT", 75, -50)
    hbActionIcons_Text[0]["Target"]=g:CreateFontString()
    hbActionIcons_Text[0]["Target"]:SetFontObject(GameFontNormal)
    hbActionIcons_Text[0]["Target"]:SetTextColor(1,1,1,1)
    hbActionIcons_Text[0]["Target"]:SetText(HEALBOT_OPTIONS_TARGETHEALS)
    hbActionIcons_Text[0]["Target"]:SetPoint("TOPLEFT", 310, -50)
    hbActionIcons_Text[0]["Bind"]=g:CreateFontString()
    hbActionIcons_Text[0]["Bind"]:SetFontObject(GameFontNormal)
    hbActionIcons_Text[0]["Bind"]:SetTextColor(1,1,1,1)
    hbActionIcons_Text[0]["Bind"]:SetText(HEALBOT_WORD_KEYBIND)
    hbActionIcons_Text[0]["Bind"]:SetPoint("TOPLEFT", 455, -50)
    for x=1,20 do
        hbActionIcons_Text[x]={}
        hbActionIcons_Text[x]["ID"]=g:CreateFontString()
        hbActionIcons_Text[x]["ID"]:SetFontObject(GameFontNormal)
        hbActionIcons_Text[x]["Ability"]=g:CreateFontString()
        hbActionIcons_Text[x]["Ability"]:SetFontObject(GameFontNormal)
        hbActionIcons_Text[x]["Target"]=g:CreateFontString()
        hbActionIcons_Text[x]["Target"]:SetFontObject(GameFontNormal)
        hbActionIcons_Text[x]["Bind"]=g:CreateFontString()
        hbActionIcons_Text[x]["Bind"]:SetFontObject(GameFontNormal)
    end
    hbActionIcons_Text[1]["ID"]:SetPoint("TOPLEFT", hbActionIcons_Text[0]["ID"], "BOTTOMLEFT", 0, -10)
    hbActionIcons_Text[1]["Ability"]:SetPoint("TOPLEFT", hbActionIcons_Text[0]["Ability"], "BOTTOMLEFT", 0, -10)
    hbActionIcons_Text[1]["Target"]:SetPoint("TOPLEFT", hbActionIcons_Text[0]["Target"], "BOTTOMLEFT", 0, -10)
    hbActionIcons_Text[1]["Bind"]:SetPoint("TOPLEFT", hbActionIcons_Text[0]["Bind"], "BOTTOMLEFT", 0, -10)
    for x=2,10 do
        hbActionIcons_Text[x]["ID"]:SetPoint("TOPLEFT", hbActionIcons_Text[x-1]["ID"], "TOPLEFT", 0, -18)
        hbActionIcons_Text[x]["Ability"]:SetPoint("TOPLEFT", hbActionIcons_Text[x-1]["Ability"], "TOPLEFT", 0, -18)
        hbActionIcons_Text[x]["Target"]:SetPoint("TOPLEFT", hbActionIcons_Text[x-1]["Target"], "TOPLEFT", 0, -18)
        hbActionIcons_Text[x]["Bind"]:SetPoint("TOPLEFT", hbActionIcons_Text[x-1]["Bind"], "TOPLEFT", 0, -18)
    end
    hbActionIcons_Text[11]["ID"]:SetPoint("TOPLEFT", hbActionIcons_Text[0]["ID"], "BOTTOMLEFT", 0, -10)
    hbActionIcons_Text[11]["Ability"]:SetPoint("TOPLEFT", hbActionIcons_Text[0]["Ability"], "BOTTOMLEFT", 0, -10)
    hbActionIcons_Text[11]["Target"]:SetPoint("TOPLEFT", hbActionIcons_Text[0]["Target"], "BOTTOMLEFT", 0, -10)
    hbActionIcons_Text[11]["Bind"]:SetPoint("TOPLEFT", hbActionIcons_Text[0]["Bind"], "BOTTOMLEFT", 0, -10)
    for x=12,20 do
        hbActionIcons_Text[x]["ID"]:SetPoint("TOPLEFT", hbActionIcons_Text[x-1]["ID"], "TOPLEFT", 0, -18)
        hbActionIcons_Text[x]["Ability"]:SetPoint("TOPLEFT", hbActionIcons_Text[x-1]["Ability"], "TOPLEFT", 0, -18)
        hbActionIcons_Text[x]["Target"]:SetPoint("TOPLEFT", hbActionIcons_Text[x-1]["Target"], "TOPLEFT", 0, -18)
        hbActionIcons_Text[x]["Bind"]:SetPoint("TOPLEFT", hbActionIcons_Text[x-1]["Bind"], "TOPLEFT", 0, -18)
    end
end

function HealBot_Options_cacheNames(list)
      --HealBot_setCall("HealBot_Options_cacheNames")
    local iName
    for j=1, getn(list), 1 do
        iName=HealBot_WoWAPI_ItemInfo(list[j]);
    end
end

function HealBot_Options_setLists()
      --HealBot_setCall("HealBot_Options_setLists")
    HealBot_Options_BuffTxt_List={
        HEALBOT_WORDS_NONE,
        HEALBOT_OPTIONS_BUFFSELF,
        HEALBOT_OPTIONS_BUFFPARTY,
        HEALBOT_OPTIONS_BUFFRAID,
        HEALBOT_CLASSES_MELEE,
        HEALBOT_CLASSES_RANGES,
        HEALBOT_CLASSES_HEALERS,
        HEALBOT_CLASSES_CUSTOM,
        HEALBOT_BUFF_PVP,
        HEALBOT_BUFF_PVE,
        HEALBOT_OPTIONS_TANKHEALS,
        HEALBOT_OPTIONS_MYTARGET,
        HEALBOT_WORD_FOCUS,
        HEALBOT_OPTIONS_PRIVFOCUS,
        HEALBOT_OPTIONS_SINGLETANK,
        HEALBOT_WORD_SOLO,
    }

        if HEALBOT_GAME_VERSION>9 then
        HealBot_Options_FilterHoTctl_List={
            HEALBOT_CLASSES_ALL,
            HEALBOT_DEATHKNIGHT,
            HEALBOT_DEMONHUNTER,
            HEALBOT_DRUID,
            HEALBOT_EVOKER,
            HEALBOT_PALADIN,
            HEALBOT_MONK,
            HEALBOT_PRIEST,
            HEALBOT_SHAMAN,
            HEALBOT_WARRIOR,
            HEALBOT_HUNTER,
            HEALBOT_MAGE,
            HEALBOT_ROGUE,
            HEALBOT_WARLOCK,
        }
        HealBot_Options_Lists["SingleClass"]={
            HEALBOT_OPTIONS_SINGLE..HEALBOT_DEATHKNIGHT,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_DEMONHUNTER,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_DRUID,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_EVOKER,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_PALADIN,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_MONK,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_PRIEST,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_SHAMAN,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_WARRIOR,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_HUNTER,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_MAGE,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_ROGUE,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_WARLOCK,
        }
    elseif HEALBOT_GAME_VERSION>6 then
        HealBot_Options_FilterHoTctl_List={
            HEALBOT_CLASSES_ALL,
            HEALBOT_DEATHKNIGHT,
            HEALBOT_DEMONHUNTER,
            HEALBOT_DRUID,
            HEALBOT_PALADIN,
            HEALBOT_MONK,
            HEALBOT_PRIEST,
            HEALBOT_SHAMAN,
            HEALBOT_WARRIOR,
            HEALBOT_HUNTER,
            HEALBOT_MAGE,
            HEALBOT_ROGUE,
            HEALBOT_WARLOCK,
        }
        HealBot_Options_Lists["SingleClass"]={
            HEALBOT_OPTIONS_SINGLE..HEALBOT_DEATHKNIGHT,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_DEMONHUNTER,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_DRUID,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_PALADIN,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_MONK,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_PRIEST,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_SHAMAN,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_WARRIOR,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_HUNTER,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_MAGE,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_ROGUE,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_WARLOCK,
        }
    elseif HEALBOT_GAME_VERSION>4 then
        HealBot_Options_FilterHoTctl_List={
            HEALBOT_CLASSES_ALL,
            HEALBOT_DEATHKNIGHT,
            HEALBOT_DRUID,
            HEALBOT_PALADIN,
            HEALBOT_MONK,
            HEALBOT_PRIEST,
            HEALBOT_SHAMAN,
            HEALBOT_WARRIOR,
            HEALBOT_HUNTER,
            HEALBOT_MAGE,
            HEALBOT_ROGUE,
            HEALBOT_WARLOCK,
        }
        HealBot_Options_Lists["SingleClass"]={
            HEALBOT_OPTIONS_SINGLE..HEALBOT_DEATHKNIGHT,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_DRUID,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_PALADIN,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_MONK,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_PRIEST,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_SHAMAN,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_WARRIOR,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_HUNTER,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_MAGE,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_ROGUE,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_WARLOCK,
        }
    elseif HEALBOT_GAME_VERSION>2 then
        HealBot_Options_FilterHoTctl_List={
            HEALBOT_CLASSES_ALL,
            HEALBOT_DEATHKNIGHT,
            HEALBOT_DRUID,
            HEALBOT_PALADIN,
            HEALBOT_PRIEST,
            HEALBOT_SHAMAN,
            HEALBOT_WARRIOR,
            HEALBOT_HUNTER,
            HEALBOT_MAGE,
            HEALBOT_ROGUE,
            HEALBOT_WARLOCK,
        }
        HealBot_Options_Lists["SingleClass"]={
            HEALBOT_OPTIONS_SINGLE..HEALBOT_DEATHKNIGHT,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_DRUID,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_PALADIN,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_PRIEST,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_SHAMAN,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_WARRIOR,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_HUNTER,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_MAGE,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_ROGUE,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_WARLOCK,
        }
    else
        HealBot_Options_FilterHoTctl_List={
            HEALBOT_CLASSES_ALL,
            HEALBOT_DRUID,
            HEALBOT_PALADIN,
            HEALBOT_PRIEST,
            HEALBOT_SHAMAN,
            HEALBOT_WARRIOR,
            HEALBOT_HUNTER,
            HEALBOT_MAGE,
            HEALBOT_ROGUE,
            HEALBOT_WARLOCK,
        }
        HealBot_Options_Lists["SingleClass"]={
            HEALBOT_OPTIONS_SINGLE..HEALBOT_DRUID,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_PALADIN,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_PRIEST,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_SHAMAN,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_WARRIOR,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_HUNTER,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_MAGE,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_ROGUE,
            HEALBOT_OPTIONS_SINGLE..HEALBOT_WARLOCK,
        }
    end

    HealBot_Options_TargetFocusInCombat_List={
        HEALBOT_OPTIONS_ALWAYSHIDE,
        HEALBOT_OPTIONS_NOCHANGE,
        HEALBOT_OPTIONS_ALWAYSSHOW,
    }

    HealBot_Options_FontOutline_List={
        HEALBOT_WORDS_NONE,
        HEALBOT_WORDS_THIN,
        HEALBOT_WORDS_THICK,
    }

    HealBot_Options_BarHealthIncHeal_List={
        HEALBOT_WORDS_NO.." "..HEALBOT_OPTIONS_INCHEAL,
        HEALBOT_OPTIONS_BARHEALTHINCHEALS,
        HEALBOT_OPTIONS_BARHEALTHSEPHEALS,
    }

    HealBot_Options_BarHealthIncAbsorb_List={
        HEALBOT_WORDS_NO.." "..HEALBOT_OPTIONS_INCABSORB,
        HEALBOT_OPTIONS_BARHEALTHINCABSORBS,
        HEALBOT_OPTIONS_BARHEALTHSEPABSORBS,
    }

    HealBot_Options_BarHealthOverHeal_List={
        HEALBOT_OPTIONS_NOOVERHEALS,
        HEALBOT_OPTIONS_BARHEALTHMYOVERHEALS,
        HEALBOT_OPTIONS_BARHEALTHALLOVERHEALS,
    }

    HealBot_Options_Lists["OverHealFormat"]={
        "100",
        "^100",
        "+100",
        "<100",
        "(100)",
        "{100}",
        "[100]",
        "<100>",
        "=100=",
    }

    HealBot_Options_Lists["AggroNameFormat"]={
        HEALBOT_WORDS_NONE,
        ">>"..HEALBOT_SORTBY_NAME.."<<",
        "!!"..HEALBOT_SORTBY_NAME.."!!",
        "++"..HEALBOT_SORTBY_NAME.."++",
        "**"..HEALBOT_SORTBY_NAME.."**",
        "^^"..HEALBOT_SORTBY_NAME.."^^",
        "--"..HEALBOT_SORTBY_NAME.."--",
        "##"..HEALBOT_SORTBY_NAME.."##",
        " == "..HEALBOT_SORTBY_NAME.." == ",
    }

    HealBot_Options_Lists["OverHealColour"]={
        HEALBOT_OPTIONS_HEALTHOPTCOLOUR,
        HEALBOT_CLASSES_CUSTOM,
    }

    HealBot_Options_Lists["HealthCustomColour"]={
        HEALBOT_OPTIONS_NAMEOPTCOLOUR,
        HEALBOT_CLASSES_CUSTOM,
    }

    HealBot_Options_BarHealthColour_List={
        HEALBOT_WORD_HEALTH,
        HEALBOT_SORTBY_CLASS,
        HEALBOT_SORTBY_ROLE,
        HEALBOT_CLASSES_CUSTOM,
        HEALBOT_OPTIONS_CLASSHLTHMIX,
        HEALBOT_OPTIONS_ROLEHLTHMIX,
    }

    HealBot_Options_Lists["EmergGlow"]={
        HEALBOT_OPTIONS_DONT_SHOW,
        HEALBOT_SKIN_BORDER_HAZARD,
        HEALBOT_SKIN_FRAME_GLOW,
        HEALBOT_SKIN_FRAME_GLOWSTARS,
        HEALBOT_SKIN_FRAME_GLOWBLIZZ,
    }

    HealBot_Options_Lists["BarBack"]={
        HEALBOT_WORD_HEALTH,
        HEALBOT_SORTBY_CLASS,
        HEALBOT_SORTBY_ROLE,
        HEALBOT_CLASSES_CUSTOM,
        HEALBOT_OPTIONS_CLASSHLTHMIX,
        HEALBOT_OPTIONS_ROLEHLTHMIX,
        HEALBOT_OPTIONS_ADAPTIVECLASSMIX,
        HEALBOT_OPTIONS_ADAPTIVEROLEMIX,
        HEALBOT_OPTIONS_ADAPTIVECUSTOMMIX,
        HEALBOT_OPTIONS_ADAPTIVE,
    }

    HealBot_Options_Lists["BarBackBorder"]={
        HEALBOT_OPTIONS_HAZARDONLY,
        HEALBOT_WORD_HEALTH,
        HEALBOT_SORTBY_CLASS,
        HEALBOT_SORTBY_ROLE,
        HEALBOT_CLASSES_CUSTOM,
        HEALBOT_OPTIONS_CLASSHLTHMIX,
        HEALBOT_OPTIONS_ROLEHLTHMIX,
        HEALBOT_OPTIONS_ADAPTIVECLASSMIX,
        HEALBOT_OPTIONS_ADAPTIVEROLEMIX,
        HEALBOT_OPTIONS_ADAPTIVECUSTOMMIX,
        HEALBOT_OPTIONS_ADAPTIVE,
    }

    HealBot_Options_EnemyOOC_List={
        HEALBOT_OPTIONS_ALWAYSHIDE,
        HEALBOT_ENEMY_EXISTS_SHOW,
        HEALBOT_OPTIONS_ALWAYSINCOMBAT,
    }

    if HEALBOT_GAME_VERSION>2 then
        HealBot_Options_EnemyCombat_List={
            HEALBOT_OPTIONS_ALWAYSINCOMBAT,
            HEALBOT_ENEMY_EXISTS_SHOW,
            HEALBOT_ENEMY_NOBOSS_SHOW,
        }
    else
        HealBot_Options_EnemyCombat_List={
            HEALBOT_OPTIONS_ALWAYSINCOMBAT,
            HEALBOT_ENEMY_EXISTS_SHOW,
        }
    end
    HealBot_Options_Lists["EnemyUseFrame"]={
        HEALBOT_OPTIONS_USEENEMYFRAME,
        HEALBOT_OPTIONS_USEPLAYERSFRAME,
    }

    HealBot_Options_BarIncHealColour_List={
        HEALBOT_OPTIONS_DONT_SHOW,
        HEALBOT_WORD_HEALTH,
        HEALBOT_SORTBY_CLASS,
        HEALBOT_SORTBY_ROLE,
        HEALBOT_OPTIONS_FUTURE_HLTH,
        HEALBOT_CLASSES_CUSTOM,
        HEALBOT_OPTIONS_CLASSHLTHMIX,
        HEALBOT_OPTIONS_ROLEHLTHMIX,
    }

    HealBot_Options_AbsorbColour_List={
        HEALBOT_OPTIONS_DONT_SHOW,
        HEALBOT_WORD_HEALTH,
        HEALBOT_SORTBY_CLASS,
        HEALBOT_SORTBY_ROLE,
        HEALBOT_OPTIONS_FUTURE_HLTH,
        HEALBOT_CLASSES_CUSTOM,
        HEALBOT_OPTIONS_CLASSHLTHMIX,
        HEALBOT_OPTIONS_ROLEHLTHMIX,
    }

    HealBot_Options_BarHealthType_List={
        HEALBOT_OPTIONS_BARHEALTH3,
        HEALBOT_OPTIONS_BARHEALTH1,
        HEALBOT_OPTIONS_BARHEALTH2,
    }

    HealBot_Options_BarHealthAnchor_List={
        HEALBOT_OPTIONS_HLTHTXTANCHORINDL,
        HEALBOT_OPTIONS_HLTHTXTANCHORINDC,
        HEALBOT_OPTIONS_HLTHTXTANCHORINDR,
        HEALBOT_OPTIONS_HLTHTXTANCHORRIGHT,
        HEALBOT_OPTIONS_HLTHTXTANCHORBELOW,
    }

    HealBot_Options_Lists["BarStateTextAnchor"]={
        HEALBOT_OPTIONS_HLTHTXTANCHORINDL,
        HEALBOT_OPTIONS_HLTHTXTANCHORINDC,
        HEALBOT_OPTIONS_HLTHTXTANCHORINDR,
        HEALBOT_OPTIONS_HLTHTXTANCHORLEFT,
        HEALBOT_OPTIONS_HLTHTXTANCHORABOVE,
        HEALBOT_OPTIONS_STATETXTREPLACENAME,
    }

    HealBot_Options_Lists["BarAggroTextAnchor"]={
        HEALBOT_OPTIONS_HLTHTXTANCHORINDL,
        HEALBOT_OPTIONS_HLTHTXTANCHORINDC,
        HEALBOT_OPTIONS_HLTHTXTANCHORINDR,
        HEALBOT_OPTIONS_HLTHTXTANCHORABOVE,
        HEALBOT_OPTIONS_HLTHTXTANCHORBELOW,
    }

    HealBot_Options_Lists["BarNameTextAnchor"]={
        HEALBOT_OPTIONS_ANCHORLEFT,
        HEALBOT_OPTIONS_ANCHORCENTER,
        HEALBOT_OPTIONS_ANCHORRIGHT,
    }

    HealBot_Options_Lists["HotBarsDebuffPrio"]={
        HEALBOT_WORD_OFF,
        HEALBOT_ONE,
        HEALBOT_TWO,
        HEALBOT_THREE,
        HEALBOT_FOUR,
        HEALBOT_FIVE,
    }

    HealBot_Options_Lists["GroupHealthRange"]={
        HEALBOT_VISIBLE_RANGE,
        HEALBOT_SPELL_RANGE,
    }

    HealBot_Options_UseOverrideFocusGroups_List={
        HEALBOT_OPTIONS_FOCUSGROUPS1,
        HEALBOT_OPTIONS_FOCUSGROUPS2,
        HEALBOT_OPTIONS_FOCUSGROUPS3,
    }

    HealBot_Options_ButtonCastMethod_List={
        HEALBOT_OPTIONS_BUTTONCASTPRESSED,
        HEALBOT_OPTIONS_BUTTONCASTRELEASED,
    }

    HealBot_Options_TestBarsProfile_List={
        HEALBOT_WORD_PARTY,
        HEALBOT_OPTIONS_EMERGENCYHEALS.." 10",
        HEALBOT_OPTIONS_EMERGENCYHEALS.." 25",
        HEALBOT_OPTIONS_EMERGENCYHEALS.." 40",
    }

    HealBot_Options_TooltipFontSize_List={
        HEALBOT_WORDS_SMALL,
        HEALBOT_WORDS_MEDIUM,
        HEALBOT_WORDS_LARGE,
    }

    HealBot_Options_ExtraSkinsCat_List={
        HEALBOT_SORTBY_GROUP,
        HEALBOT_EXTRASKINS_CAT_SRAID,
        HEALBOT_EXTRASKINS_CAT_LRAID,
    }

    HealBot_Options_EmoteCat_List={
        HEALBOT_EMOTE_CAT_COMBAT,
        HEALBOT_EMOTE_CAT_EMOTION,
        HEALBOT_EMOTE_CAT_HAPPY,
        HEALBOT_EMOTE_CAT_GREET,
        HEALBOT_EMOTE_CAT_OTHER,
        HEALBOT_EMOTE_CAT_RESPECT,
        HEALBOT_EMOTE_CAT_UNHAPPY,
    }

    HealBot_Options_EmoteCombat_List={
        HEALBOT_EMOTE_ATTACKTARGET,
        HEALBOT_EMOTE_CHARGE,
        HEALBOT_EMOTE_DOOM,
        HEALBOT_EMOTE_FLEE,
        HEALBOT_EMOTE_FOLLOWME,
        HEALBOT_EMOTE_GROWL,
        HEALBOT_EMOTE_HEALME,
        HEALBOT_EMOTE_INCOMING,
        HEALBOT_EMOTE_INSULT,
        HEALBOT_EMOTE_OOM,
        HEALBOT_EMOTE_OPENFIRE,
        HEALBOT_EMOTE_ROAR,
        HEALBOT_EMOTE_RUDE,
        HEALBOT_EMOTE_SURRENDER,
        HEALBOT_EMOTE_TAUNT,
        HEALBOT_EMOTE_VICTORY,
        HEALBOT_EMOTE_WAIT,
    }

    HealBot_Options_EmoteEmotion_List={
        HEALBOT_EMOTE_BASHFUL,
        HEALBOT_EMOTE_BLOW,
        HEALBOT_EMOTE_BLUSH,
        HEALBOT_EMOTE_FLIRT,
        HEALBOT_EMOTE_KISS,
        HEALBOT_EMOTE_SHY,
    }

    HealBot_Options_EmoteHappy_List={
        HEALBOT_EMOTE_CACKLE,
        HEALBOT_EMOTE_CHUCKLE,
        HEALBOT_EMOTE_CLAP,
        HEALBOT_EMOTE_DANCE,
        HEALBOT_EMOTE_EXCITED,
        HEALBOT_EMOTE_GIGGLE,
        HEALBOT_EMOTE_LAUGH,
        HEALBOT_EMOTE_ROFL,
        HEALBOT_EMOTE_SILLY,
        HEALBOT_EMOTE_THANK,
        HEALBOT_EMOTE_TRAIN,
    }

    HealBot_Options_EmoteGreet_List={
        HEALBOT_EMOTE_BYE,
        HEALBOT_EMOTE_GREET,
        HEALBOT_EMOTE_HELLO,
        HEALBOT_EMOTE_WAVE,
        HEALBOT_EMOTE_WELCOME,
    }

    HealBot_Options_EmoteOther_List={
        HEALBOT_EMOTE_BOGGLE,
        HEALBOT_EMOTE_CURIOUS,
        HEALBOT_EMOTE_DRINK,
        HEALBOT_EMOTE_EAT,
        HEALBOT_EMOTE_FLEX,
        HEALBOT_EMOTE_GASP,
        HEALBOT_EMOTE_GUFFAW,
        HEALBOT_EMOTE_LAY,
        HEALBOT_EMOTE_NO,
        HEALBOT_EMOTE_NOD,
        HEALBOT_EMOTE_POINT,
        HEALBOT_EMOTE_PRAY,
        HEALBOT_EMOTE_PUZZLED,
        HEALBOT_EMOTE_RASP,
        HEALBOT_EMOTE_SHRUG,
        HEALBOT_EMOTE_SLEEP,
        HEALBOT_EMOTE_TALK,
    }

    HealBot_Options_EmoteRespect_List={
        HEALBOT_EMOTE_APPLAUD,
        HEALBOT_EMOTE_BOW,
        HEALBOT_EMOTE_CHEER,
        HEALBOT_EMOTE_COMMEND,
        HEALBOT_EMOTE_CONGRATS,
        HEALBOT_EMOTE_CURTSEY,
        HEALBOT_EMOTE_HAIL,
        HEALBOT_EMOTE_KNEEL,
        HEALBOT_EMOTE_SALUTE,
    }

    HealBot_Options_EmoteUnhappy_List={
        HEALBOT_EMOTE_ANGRY,
        HEALBOT_EMOTE_BEG,
        HEALBOT_EMOTE_BORED,
        HEALBOT_EMOTE_CONFUSED,
        HEALBOT_EMOTE_COWER,
        HEALBOT_EMOTE_CRY,
        HEALBOT_EMOTE_GLOAT,
        HEALBOT_EMOTE_GOLFCLAP,
        HEALBOT_EMOTE_GROVEL,
        HEALBOT_EMOTE_LOST,
        HEALBOT_EMOTE_MOURN,
        HEALBOT_EMOTE_ROLLEYES,
        HEALBOT_EMOTE_SIGH,
        HEALBOT_EMOTE_VIOLIN,
    }

    HealBot_Options_hbLangs_List={
        HEALBOT_OPTIONS_LANG_ZHCN,
        HEALBOT_OPTIONS_LANG_ENUK,
        HEALBOT_OPTIONS_LANG_ENUS,
        HEALBOT_OPTIONS_LANG_FRFR,
        HEALBOT_OPTIONS_LANG_DEDE,
        HEALBOT_OPTIONS_LANG_GRGR,
        HEALBOT_OPTIONS_LANG_HUHU,
        HEALBOT_OPTIONS_LANG_ITIT,
        HEALBOT_OPTIONS_LANG_KRKR,
        HEALBOT_OPTIONS_LANG_ESMX,
        HEALBOT_OPTIONS_LANG_PTBR,
        HEALBOT_OPTIONS_LANG_RURU,
        HEALBOT_OPTIONS_LANG_ESES,
        HEALBOT_OPTIONS_LANG_TWTW,
    }

    HealBot_Options_hbProfile_List={
        HEALBOT_OPTIONS_PROFILE_CHARACTER,
        HEALBOT_OPTIONS_PROFILE_CLASS,
        HEALBOT_OPTIONS_GLOBAL,
    }

    HealBot_Options_hbCommands_List={
        HEALBOT_WORDS_NONE,
        HEALBOT_CMD_CLEARBLACKLIST,
        HEALBOT_CMD_COPYSPELLS,
        HEALBOT_CMD_RESETICONS,
        HEALBOT_CMD_RESETBARS,
        HEALBOT_CMD_RESETBUFFS,
        HEALBOT_CMD_RESETCURES,
        HEALBOT_CMD_RESETCUSTOMDEBUFFS,
        HEALBOT_CMD_RESETSKINS,
        HEALBOT_CMD_RESETSPELLS,
        HEALBOT_CMD_TOGGLEDISLIKEMOUNT,
        HEALBOT_CMD_TOGGLEEXCLUDEMOUNT,
        HEALBOT_CMD_SUPPRESSERRORS,
        HEALBOT_CMD_SUPPRESSSOUND,
        HEALBOT_CMD_TOGGLECUSTOMCURECASTBY,
        HEALBOT_CMD_TOGGLEMAINASSIST,
        HEALBOT_CMD_RESETSKINGROUP,
        HEALBOT_CMD_RESETSKINRAID25,
        HEALBOT_CMD_RESETSKINRAID40,
        HEALBOT_CMD_TOGGLECLEARINSPECT,
        HEALBOT_CMD_TOGGLENUMBERSUFFIX,
    }

    HealBot_Options_EmergencyFClass_List={
        HEALBOT_CLASSES_MELEE,
        HEALBOT_CLASSES_RANGES,
        HEALBOT_CLASSES_HEALERS,
        HEALBOT_CLASSES_CUSTOM,
    }

    HealBot_Options_Sort_List={
        HEALBOT_SORTBY_NAME,
        HEALBOT_SORTBY_CLASS,
        HEALBOT_SORTBY_GROUP,
        HEALBOT_SORTBY_MAXHEALTH,
        HEALBOT_SORTBY_ROLE,
        HEALBOT_SORTBY_UNITID,
    }

    HealBot_Options_UseOverrides_List={
        HEALBOT_USE_OVERRIDE_NO,
        HEALBOT_USE_OVERRIDE_YES,
    }

    if HEALBOT_GAME_VERSION<5 then
        HealBot_Options_Lists["PowerAlt"]={
            HEALBOT_WORD_AUTO,
            HEALBOT_MANA,
            HEALBOT_RAGE,
            HEALBOT_WORD_FOCUS,
            HEALBOT_ENERGY,
            HEALBOT_WORD_PET,
            HEALBOT_RUNES,
            HEALBOT_RUNICPOWER,
        }
    elseif HEALBOT_GAME_VERSION<10 then
        HealBot_Options_Lists["PowerAlt"]={
            HEALBOT_WORD_AUTO,
            HEALBOT_MANA,
            HEALBOT_RAGE,
            HEALBOT_WORD_FOCUS,
            HEALBOT_ENERGY,
            HEALBOT_LIGHTFORCE,
            HEALBOT_RUNES,
            HEALBOT_RUNICPOWER,
            HEALBOT_SOULSHARDS,
            HEALBOT_ECLIPSE,
            HEALBOT_HOLY_POWER,
            HEALBOT_ALTERNATE_POWER,
            HEALBOT_DARK_FORCE,
            HEALBOT_CHI,
            HEALBOT_SHADOW_ORB,
            HEALBOT_BURNING_EMBERS,
            HEALBOT_DEMONIC_FURY,
            HEALBOT_ARCANE_CHARGES,
        }
    else
        HealBot_Options_Lists["PowerAlt"]={
            HEALBOT_WORD_AUTO,
            HEALBOT_MANA,
            HEALBOT_RAGE,
            HEALBOT_WORD_FOCUS,
            HEALBOT_ENERGY,
            HEALBOT_COMBO_POINTS,
            HEALBOT_RUNES,
            HEALBOT_RUNICPOWER,
            HEALBOT_SOULSHARDS,
            HEALBOT_LUNAR_POWER,
            HEALBOT_HOLY_POWER,
            HEALBOT_ALTERNATE_POWER,
            HEALBOT_MAELSTROM,
            HEALBOT_CHI,
            HEALBOT_INSANITY,
            HEALBOT_BURNING_EMBERS,
            HEALBOT_DEMONIC_FURY,
            HEALBOT_ARCANE_CHARGES,    
            HEALBOT_FURY,
            HEALBOT_PAIN,
            HEALBOT_ESSENCE,
            HEALBOT_RUNE_BLOOD,
            HEALBOT_RUNE_FROST,
            HEALBOT_RUNE_UNHOLY,
            HEALBOT_ALTERNATE_QUEST,
            HEALBOT_ALTERNATE_ENCOUNTER,
            HEALBOT_ALTERNATE_MOUNT,
        }
    end
    
    HealBot_Options_ActionBarsCombo_List={
        HEALBOT_OPTIONS_ENABLEDBARS,
        HEALBOT_OPTIONS_ENEMYBARS,
        HEALBOT_OPTIONS_EMERGBARS,
        HEALBOT_OPTIONS_ICONS
    }

    HealBot_Options_Lists["Lock"]={
        HEALBOT_OPTIONS_LOCKOFF,
        HEALBOT_OPTIONS_LOCKON,
        HEALBOT_OPTIONS_LOCKCTRL,
        HEALBOT_OPTIONS_LOCKALT,
        HEALBOT_OPTIONS_LOCKCTRLALT,
    }

    HealBot_Options_Lists["FrameStrata"]={
        "BACKGROUND",
        "LOW",
        "MEDIUM",
        "HIGH",
        "DIALOG",
    }

    HealBot_Options_Lists["AutoShow"]={
        HEALBOT_WORD_OFF,
        HEALBOT_WORD_ONWITHOUTSOUND,
        HEALBOT_WORD_ONWITHSOUND,
    }

    HealBot_Options_Lists["GlowFrame"]={
        HEALBOT_WORDS_TINY,
        HEALBOT_WORDS_SMALL,
        HEALBOT_WORDS_MEDIUM,
        HEALBOT_WORDS_LARGE,
        HEALBOT_WORDS_HUGE,
    }

    HealBot_Options_Lists["GlowSize"]={
        [1]=HEALBOT_WORDS_TINY,
        [2]=HEALBOT_WORDS_SMALL,
        [3]=HEALBOT_WORDS_MEDIUM,
        [4]=HEALBOT_WORDS_LARGE,
        [5]=HEALBOT_WORDS_HUGE,
    }

    HealBot_Options_ActionAnchor_List={
        HEALBOT_OPTIONS_ANCHORTOPLEFT,
        HEALBOT_OPTIONS_ANCHORBOTTOMLEFT,
        HEALBOT_OPTIONS_ANCHORTOPRIGHT,
        HEALBOT_OPTIONS_ANCHORBOTTOMRIGHT,
        HEALBOT_OPTIONS_ANCHORTOP,
        HEALBOT_OPTIONS_ANCHORLEFT,
        HEALBOT_OPTIONS_ANCHORRIGHT,
        HEALBOT_OPTIONS_ANCHORBOTTOM,
    }

    HealBot_Options_BarsGrowDirection_List={
        HEALBOT_OPTIONS_GROW_HORIZONTAL,
        HEALBOT_OPTIONS_GROW_VERTICAL,
    }

    HealBot_Options_BarsOrientation_List={
        HEALBOT_OPTIONS_GROW_HORIZONTAL,
        HEALBOT_OPTIONS_GROW_VERTICAL,
    }

    HealBot_Options_ManaIndicator_List={
        HEALBOT_OPTIONS_LOWMANAINDICATOR1,
        HEALBOT_OPTIONS_LOWMANAINDICATOR2,
        HEALBOT_OPTIONS_LOWMANAINDICATOR3,
        HEALBOT_OPTIONS_LOWMANAINDICATOR4,
        HEALBOT_OPTIONS_LOWMANAINDICATOR5,
        HEALBOT_OPTIONS_LOWMANAINDICATOR6,
    }

    HealBot_Options_Class_HoTctlIDMethod_List={
        HEALBOT_OPTIONS_CUSTOM_IDMETHODSID,
        HEALBOT_OPTIONS_CUSTOM_IDMETHODSBOTH,
    }

    HealBot_Options_Class_HoTctlAction_List={
        HEALBOT_OPTIONS_SELFHEALS,
        HEALBOT_OPTIONS_MYCLASS,
        HEALBOT_CUSTOM_CASTBY_EVERYONE,
    }

    HealBot_Options_Lists["BuffsCustomAuto"]={
        HEALBOT_WORDS_NONE,
        HEALBOT_OPTIONS_BUFFSAUTOTIMED,
        HEALBOT_OPTIONS_BUFFSAUTOALL,
    }

    HealBot_Options_Lists["BuffsCustomAutoCastBy"]={
        HEALBOT_OPTIONS_CASTBYSELF,
        HEALBOT_OPTIONS_CASTBYMYCLASS,
        HEALBOT_OPTIONS_CASTBYEVERYONE,
    }

    HealBot_Options_Lists["AuraCustomSort"]={
        HEALBOT_WORD_PRIORITY,
        HEALBOT_WORDS_SPELLNAME,
        HEALBOT_WORD_TAG,
    }

    HealBot_Options_Lists["AuraCustomFilter"]={
        HEALBOT_WORD_PRIORITY.." (1 - 4)",
        HEALBOT_WORD_PRIORITY.." (5 - 8)",
        HEALBOT_WORD_PRIORITY.." (9 - 12)",
        HEALBOT_WORD_PRIORITY.." (13 - 16)",
        HEALBOT_WORD_PRIORITY.." (17 - 20)",
    }

    HealBot_Options_Lists["ActionIconsHighlightFilter"]={
        HEALBOT_OPTIONS_HIGHLIGHTFILTER01,
        HEALBOT_OPTIONS_HIGHLIGHTFILTER02,
    }

    HealBot_Options_Lists["ActionIconsAlertFilter"]={HEALBOT_WORDS_NONE,
                                                       HEALBOT_PLUGIN_AURAWATCHBUFFEXISTS,
                                                       HEALBOT_PLUGIN_AURAWATCHBUFFEXISTSTAG,
                                                       HEALBOT_PLUGIN_AURAWATCHBUFFEXPIRE,
                                                       HEALBOT_PLUGIN_AURAWATCHBUFFNOTEXIST,
                                                       HEALBOT_PLUGIN_AURAWATCHDEBUFFEXISTS,
                                                       HEALBOT_PLUGIN_AURAWATCHDEBUFFEXISTSTAG,
                                                       HEALBOT_PLUGIN_AURAWATCHDEBUFFEXPIRE,
                                                       HEALBOT_PLUGIN_AURAWATCHDEBUFFNOTEXIST,
                                                       HEALBOT_PLUGIN_AURAWATCHHEALTHBELOW,
                                                       HEALBOT_PLUGIN_AURAWATCHHEALTHABOVE,
                                                       HEALBOT_PLUGIN_AURAWATCHMANABELOW,
                                                       HEALBOT_PLUGIN_AURAWATCHMANAABOVE,
                                                       HEALBOT_PLUGIN_AURAWATCHAGGROLEVEL,
                                                       HEALBOT_OPTION_ISFALLING,
                                                       HEALBOT_OPTION_ISSWIMMING,
                                                       HEALBOT_OPTION_GOURPHEALSEFFECT,
    }

    HealBot_Options_Lists["ActionIconsSelfAlertFilter"]={HEALBOT_WORDS_NONE,
                                                         HEALBOT_PLUGIN_AURAWATCHSBEXISTS,
                                                         HEALBOT_PLUGIN_AURAWATCHSBEXISTSTAG,
    }

    HealBot_Options_AggroAlertLevel_List={
       -- HEALBOT_OPTIONS_ALERTAGGROLEVEL1,
        HEALBOT_OPTIONS_ALERTAGGROLEVEL2,
        HEALBOT_OPTIONS_ALERTAGGROLEVEL3,
    }

    HealBot_Options_AuxAssign_List={
        HEALBOT_WORDS_NONE,
        HEALBOT_classicABSORBHOTUP,
        HEALBOT_OPTIONS_INCHEAL,
        HEALBOT_OPTIONS_POWER,
        HEALBOT_OPTIONS_TAB_AGGRO,
        HEALBOT_WORD_THREAT,
        HEALBOT_WORD_OVERHEALS,
        HEALBOT_OPTION_HIGHLIGHTACTIVEBAR,
        HEALBOT_OPTIONS_TAB_BUFFS,
        HEALBOT_OPTIONS_TAB_DEBUFFS,
        HEALBOT_OPTIONS_CASTBAR,
        HEALBOT_OPTIONS_TARGETHEALS,
        HEALBOT_OUTOFRANGE_LABEL,
        HEALBOT_INRANGE,
        HEALBOT_RECENTHEALS,
        HEALBOT_WORD_RESURRECTION,
        HEALBOT_WORD_SUMMONS,
        HEALBOT_OPTION_HEALTHDROP,
        HEALBOT_OPTIONS_TAB_NAMETEXT,
        HEALBOT_WORD_HEALTH,
        HEALBOT_OPTIONS_TAB_STATETEXT,
        HEALBOT_OPTIONS_TOTALHEALABSORBS,
        HEALBOT_OPTIONS_PLUGINTXT,
        HEALBOT_OPTIONS_POWERALT,
    }

    HealBot_Options_AuxBarColours_List={
        HEALBOT_WORD_AUTO,
        HEALBOT_SORTBY_CLASS,
        HEALBOT_SORTBY_ROLE,
        HEALBOT_CLASSES_CUSTOM,
    }

    HealBot_Options_AuxBarOpacityType_List={
        HEALBOT_OPTIONS_AUXOPACITYTYPE1,
        HEALBOT_OPTIONS_AUXOPACITYTYPE2,
        HEALBOT_CLASSES_CUSTOM,
    }

    HealBot_Options_AuxBarAnchor_List={
        HEALBOT_OPTIONS_ANCHORBOTTOM,
        HEALBOT_OPTIONS_ANCHORTOP,
        HEALBOT_OPTIONS_ANCHORLEFT,
        HEALBOT_OPTIONS_ANCHORRIGHT,
        HEALBOT_OPTIONS_ANCHORBOTTOMLEFT,
        HEALBOT_OPTIONS_ANCHORBOTTOMRIGHT,
        HEALBOT_OPTIONS_ANCHORTOPLEFT,
        HEALBOT_OPTIONS_ANCHORTOPRIGHT,
    }

    HealBot_Options_AuxOverlap_List={
        HEALBOT_OPTIONS_GROW_VERTICAL,
        HEALBOT_OPTIONS_GROW_HORIZONTAL,
        HEALBOT_WORDS_NONE,
    }

    HealBot_Options_Lists["AuxConfigSelect"]={
        HEALBOT_OPTIONS_FULLAUX.."1",
        HEALBOT_OPTIONS_FULLAUX.."2",
        HEALBOT_OPTIONS_FULLAUX.."3",
        HEALBOT_OPTIONS_FULLAUX.."4",
        HEALBOT_OPTIONS_FULLAUX.."5",
        HEALBOT_OPTIONS_FULLAUX.."6",
        HEALBOT_OPTIONS_FULLAUX.."7",
        HEALBOT_OPTIONS_FULLAUX.."8",
        HEALBOT_OPTIONS_FULLAUX.."9",
    }

    HealBot_Options_Lists["AggroIndAlertLevel"]={
        HEALBOT_OPTIONS_ALERTAGGROLEVEL1,
        HEALBOT_OPTIONS_ALERTAGGROLEVEL2,
        HEALBOT_OPTIONS_ALERTAGGROLEVEL3,
    }

    HealBot_Options_Lists["TooltipPos"]={
        HEALBOT_TOOLTIP_POSDEFAULT,
        HEALBOT_TOOLTIP_POSLEFT,
        HEALBOT_TOOLTIP_POSRIGHT,
        HEALBOT_TOOLTIP_POSABOVE,
        HEALBOT_TOOLTIP_POSBELOW,
        HEALBOT_TOOLTIP_POSCURSOR,
        HEALBOT_CUSTOM_CAT_CUSTOM,
    }

    HealBot_Options_Lists["DebuffItems"]={
        HEALBOT_ANTI_VENOM,
        HEALBOT_PHIAL_OF_SERENITY,
        HEALBOT_ELIXIR_OF_POISON_RES,
        HEALBOT_POTION_OF_SOUL_PURITY,
        HEALBOT_POWERFUL_ANTI_VENOM,
        HEALBOT_PURIFICATION_POTION,
    }

    HealBot_Options_Lists["DebuffTypes"]={
        HEALBOT_DISEASE,
        HEALBOT_MAGIC,
        HEALBOT_CURSE,
        HEALBOT_POISON,
        HEALBOT_BLEED,
    }

    HealBot_Options_cacheNames(HealBot_Options_Lists["DebuffItems"])

    HealBot_Options_Lists["RangeWarning"]={
        HEALBOT_WORD_ALWAYS,
        HEALBOT_VISIBLE_RANGE,
        HEALBOT_SPELL_RANGE,
    }

    HealBot_Options_Lists["SoundChannels"]={
        HEALBOT_OPTIONS_SOUNDCHAN1,
        HEALBOT_OPTIONS_SOUNDCHAN2,
        HEALBOT_OPTIONS_SOUNDCHAN3,
        HEALBOT_OPTIONS_SOUNDCHAN4,
    }

    HealBot_Options_Lists["AuraFilters"]={
        HEALBOT_PLUGIN_NOFILTER,
        HEALBOT_WORD_TANK,
        HEALBOT_WORD_HEALER,
        HEALBOT_WORD_DAMAGER,
        HEALBOT_MANAUSER,
        HEALBOT_NONMANAUSER,
        HEALBOT_OPTION_INGROUP,
        HEALBOT_OPTIONS_PC,
        HEALBOT_OPTIONS_NPC,
        HEALBOT_OPTIONS_PRIVFOCUS,
        HEALBOT_OPTIONS_MYTARGET,
        HEALBOT_OPTIONS_PRIVATETANKS,
        HEALBOT_OPTIONS_PRIVATEHEALERS,
        HEALBOT_OPTIONS_PRIVATEDAMAGERS,
    }

    HealBot_Options_Lists["AuraHistoryCat"]={
        HEALBOT_CUSTOM_CAT_02,
        HEALBOT_CUSTOM_CAT_03,
        HEALBOT_CUSTOM_CAT_04,
        HEALBOT_CUSTOM_CAT_05,
        HEALBOT_CUSTOM_CAT_06,
        HEALBOT_CUSTOM_CAT_07,
        HEALBOT_CUSTOM_CAT_08,
        HEALBOT_CUSTOM_CAT_09,
        HEALBOT_CUSTOM_CAT_10,
        HEALBOT_CUSTOM_CAT_11,
        HEALBOT_CUSTOM_CAT_12,
        HEALBOT_CUSTOM_CAT_13,
        HEALBOT_CUSTOM_CAT_14,
    }
    
    HealBot_Options_Lists["CDebuffCat"]={
        HEALBOT_CUSTOM_CAT_CUSTOM,
        HEALBOT_CUSTOM_CAT_02,
        HEALBOT_CUSTOM_CAT_03,
        HEALBOT_CUSTOM_CAT_04,
        HEALBOT_CUSTOM_CAT_05,
        HEALBOT_CUSTOM_CAT_06,
        HEALBOT_CUSTOM_CAT_07,
        HEALBOT_CUSTOM_CAT_08,
        HEALBOT_CUSTOM_CAT_09,
        HEALBOT_CUSTOM_CAT_10,
        HEALBOT_CUSTOM_CAT_11,
        HEALBOT_CUSTOM_CAT_12,
        HEALBOT_CUSTOM_CAT_13,
        HEALBOT_CUSTOM_CAT_14,
    }

    HealBot_Options_Lists["ImportMethods"]={
        HEALBOT_IMPORT_OVERWRITEALL,
        HEALBOT_IMPORT_MERGEALL,
        HEALBOT_IMPORT_MERGENEW,
    }

    HealBot_Options_Lists["Plugins"]={
    HEALBOT_PLUGIN_THREAT,
    HEALBOT_PLUGIN_TIMETODIE,
    HEALBOT_PLUGIN_TIMETOLIVE,
    HEALBOT_PLUGIN_EXTRABUTTONS,
    HEALBOT_PLUGIN_COMBATPROT,
    HEALBOT_PLUGIN_PERFORMANCE,
    HEALBOT_PLUGIN_MYCOOLDOWNS,
    HEALBOT_PLUGIN_TWEAKS,
    HEALBOT_PLUGIN_REQUESTS,
    HEALBOT_PLUGIN_AURAWATCH,
    HEALBOT_PLUGIN_HEALTHWATCH,
    HEALBOT_PLUGIN_MANAWATCH,
    HEALBOT_PLUGIN_MEDIA,
    }

    HealBot_Options_Lists["IconPosition"]={
        HEALBOT_OPTIONS_HOTONBAR,
        HEALBOT_OPTIONS_HOTOFFBAR,
        HEALBOT_OPTIONS_HOTBELOWBAR,
    }

    HealBot_Options_Lists["IconSets"]={
        HEALBOT_ONE,
        HEALBOT_TWO,
        HEALBOT_THREE,
    }

    HealBot_Options_Lists["IconDebuffSets"]={
        HEALBOT_SKIN_ICONDEBUFFSET01,
        HEALBOT_SKIN_ICONDEBUFFSET02,
        HEALBOT_SKIN_ICONDEBUFFSET03,
    }

    HealBot_Options_Lists["IconBuffSets"]={
        HEALBOT_SKIN_ICONBUFFSET01,
        HEALBOT_SKIN_ICONBUFFSET02,
        HEALBOT_SKIN_ICONBUFFSET03,
    }

    HealBot_Options_Lists["UnitInCombat"]={
        HEALBOT_OPTIONS_UNITINCOMBAT01,
        HEALBOT_OPTIONS_UNITINCOMBAT02,
        HEALBOT_OPTIONS_UNITINCOMBAT03,
    }

    HealBot_Options_Lists["AuraBarCol"]={
        HEALBOT_WORDS_NONE,
        HEALBOT_OPTIONS_ADAPTIVEONLY,
        HEALBOT_OPTIONS_ADAPTIVEHEALTHBAR,
        HEALBOT_OPTIONS_HEALTHBARONLY,
        HEALBOT_SKIN_BORDER_HAZARD,
        HEALBOT_SKIN_FRAME_GLOW,
        HEALBOT_SKIN_FRAME_GLOWSTARS,
        HEALBOT_SKIN_FRAME_GLOWBLIZZ,
    }

    HealBot_Options_Lists["AuraIconGlow"]={
        HEALBOT_WORDS_NONE,
        HEALBOT_SKIN_BORDER_HAZARD,
        HEALBOT_SKIN_FRAME_GLOW,
        HEALBOT_SKIN_FRAME_GLOWSTARS,
        HEALBOT_SKIN_FRAME_GLOWBLIZZ,
        HEALBOT_SKIN_BORDER_SOLID,

    }

    HealBot_Options_Lists["Themes"]={
        HEALBOT_WORD_GOLD,
        HEALBOT_WORD_SILVER,
        HEALBOT_WORD_AQUA,
        HEALBOT_WORD_BLUE,
        HEALBOT_WORD_DARK,
        HEALBOT_WORD_FUCHSIA,
        HEALBOT_WORD_GREEN,
        HEALBOT_WORD_LIME,
        HEALBOT_WORD_ORANGE,
        HEALBOT_WORD_PURPLE,
        HEALBOT_WORD_RED,
        HEALBOT_WORD_TEAL,
        HEALBOT_WORD_WHITE,
        HEALBOT_WORD_YELLOW,
        HEALBOT_DEATHKNIGHT,
        HEALBOT_DEMONHUNTER,
        HEALBOT_DRUID,
        HEALBOT_EVOKER,
        HEALBOT_HUNTER,
        HEALBOT_MAGE,
        HEALBOT_MONK,
        HEALBOT_PALADIN,
        HEALBOT_PRIEST,
        HEALBOT_ROGUE,
        HEALBOT_SHAMAN,
        HEALBOT_WARLOCK,
        HEALBOT_WARRIOR,
    }

    HealBot_Options_Lists["IndicatorCol"]={
        HEALBOT_WORD_AUTO,
        HEALBOT_WORD_GOLD,
        HEALBOT_WORD_SILVER,
        HEALBOT_WORD_WHITE,
        HEALBOT_WORD_YELLOW,
        HEALBOT_WORD_ORANGE,
        HEALBOT_WORD_PINK,
        HEALBOT_WORD_RED,
        HEALBOT_WORD_PURPLE,
        HEALBOT_WORD_AQUA,
        HEALBOT_WORD_LIME,
        HEALBOT_WORD_GREEN,
        HEALBOT_WORD_BLUE,
        HEALBOT_WORD_BROWN,
        HEALBOT_WORD_BLACK,
    }

    HealBot_Options_Lists["IndicatorAnchor"]={
        HEALBOT_OPTIONS_ANCHORTOP,
        HEALBOT_OPTIONS_ANCHORBOTTOM,
        HEALBOT_OPTIONS_ANCHORLEFT,
        HEALBOT_OPTIONS_ANCHORRIGHT,
        HEALBOT_OPTIONS_ANCHORTOPLEFT,
        HEALBOT_OPTIONS_ANCHORBOTTOMLEFT,
        HEALBOT_OPTIONS_ANCHORTOPRIGHT,
        HEALBOT_OPTIONS_ANCHORBOTTOMRIGHT,
    }

    HealBot_Options_Lists["ActionIconsAnchor"]={
        HEALBOT_OPTIONS_ANCHORTOPLEFT,
        HEALBOT_OPTIONS_ANCHORTOP,
        HEALBOT_OPTIONS_ANCHORTOPRIGHT,
        HEALBOT_OPTIONS_ANCHORRIGHT,
        HEALBOT_OPTIONS_ANCHORBOTTOMRIGHT,
        HEALBOT_OPTIONS_ANCHORBOTTOM,
        HEALBOT_OPTIONS_ANCHORBOTTOMLEFT,
        HEALBOT_OPTIONS_ANCHORLEFT,
    }

    HealBot_Options_Lists["AggroIndAnchor"]={
        HEALBOT_OPTIONS_ANCHORTOP,
        HEALBOT_OPTIONS_ANCHORBOTTOM,
    }

    HealBot_Options_Lists["ActionIconsTarget"]={
        HEALBOT_WORDS_NONE,
        HEALBOT_OPTIONS_SELFHEALS,
        HEALBOT_WORD_FOCUS,
        HEALBOT_OPTIONS_TARGETHEALS,
        HEALBOT_OPTIONS_PRIVFOCUS,
    }

    HealBot_Options_Lists["ActionIconsRoleTargets"]={
        HEALBOT_OPTIONS_TANK1,
        HEALBOT_OPTIONS_TANK2,
        HEALBOT_OPTIONS_SINGLEHEALER,
        HEALBOT_OPTIONS_SINGLEDAMAGER,
        HEALBOT_OPTIONS_SINGLECASTER,
    }

    HealBot_Options_FrameAliasList()
    HealBot_Options_setCDebuffCasyBy()
end

function HealBot_Options_retAuraBarCol(val)
      --HealBot_setCall("HealBot_Options_retAuraBarCol")
    return HealBot_Options_Lists["AuraBarCol"][val]
end

function HealBot_Options_retAuraIconGlow(val)
      --HealBot_setCall("HealBot_Options_retAuraIconGlow")
    return HealBot_Options_Lists["AuraIconGlow"][val]
end

function HealBot_Options_retAuraHistoryCat()
      --HealBot_setCall("HealBot_Options_retAuraIconGlow")
    return HealBot_Options_Lists["AuraHistoryCat"]
end

local function HealBot_Options_ObjectsShowHide(oName,oShow)
      --HealBot_setCall("HealBot_Options_ObjectsShowHide")
    local g=_G[oName]
    if oShow then
        g:Show()
    else
        g:Hide()
    end
end

function HealBot_Options_ObjectsEnableDisable(oName,oEnable)
      --HealBot_setCall("HealBot_Options_ObjectsEnableDisable")
    local g=_G[oName]
    if oEnable then
        g:SetAlpha(1)
        g:Enable()
    else
        g:SetAlpha(0.4)
        g:Disable()
    end
end

function HealBot_Options_CmdButtonsEnableDisable(state)
    HealBot_Options_ObjectsEnableDisable("HealBot_Options_Reload",state)
    HealBot_Options_ObjectsEnableDisable("HealBot_Options_Unused_Defaults",state)
    HealBot_Options_ObjectsEnableDisable("HealBot_Options_Reset",state)
    HealBot_Options_ObjectsEnableDisable("HealBot_Options_Local_Defaults",state)
    HealBot_Options_ObjectsEnableDisable("HealBot_Options_Defaults",state)
end

local function HealBot_Options_ButtonHighlight(oName,oHighlight)
      --HealBot_setCall("HealBot_Options_ButtonHighlight")
    local g=_G[oName]
    if oHighlight then
        g:LockHighlight()
    else
        g:UnlockHighlight()
    end
end

local function HealBot_Options_setCDebuffCasyByIndexed()
      --HealBot_setCall("HealBot_Options_setCDebuffCasyByIndexed")
    for j=1, getn(HealBot_CDebuffCasyBy_List), 1 do
        HealBot_CDebuffCasyBy_Indexed_List[HealBot_CDebuffCasyBy_List[j]]=j
    end
    HealBot_Aura_setCDebuffCasyByIndexed(HealBot_CDebuffCasyBy_Indexed_List)
end

function HealBot_Options_setCDebuffCasyBy()
      --HealBot_setCall("HealBot_Options_setCDebuffCasyBy")
    if HealBot_Globals.CureCustomDefaultCastBy == 2 then
        HealBot_CDebuffCasyBy_List={
            HEALBOT_CUSTOM_CASTBY_ENEMY,
            HEALBOT_CUSTOM_CASTBY_FRIEND,
            HEALBOT_OPTIONS_SELFHEALS,
            HEALBOT_CUSTOM_CASTBY_EVERYONE,
        }
    else
        HealBot_CDebuffCasyBy_List={
            HEALBOT_CUSTOM_CASTBY_EVERYONE,
            HEALBOT_CUSTOM_CASTBY_ENEMY,
            HEALBOT_CUSTOM_CASTBY_FRIEND,
            HEALBOT_OPTIONS_SELFHEALS,
        }
    end
    HealBot_Options_setCDebuffCasyByIndexed()
end

function HealBot_Options_framesChanged(skinUpdate, iconUpdate, indUpdate, textUpdate, auxUpdate)
      --HealBot_setCall("HealBot_Options_framesChanged")
    if skinUpdate or iconUpdate or indUpdate or textUpdate or auxUpdate then
        if iconUpdate then HealBot_Action_setLuVars("resetIcon", true) end
        if skinUpdate then HealBot_Action_setLuVars("resetSkin", true) end
        if indUpdate then HealBot_Action_setLuVars("resetIndicator", true) end
        if textUpdate then HealBot_Action_setLuVars("resetText", true) end
        if auxUpdate then HealBot_Action_setLuVars("resetAux", true) end
        HealBot_Action_ResetSkinAllButtons()
        HealBot_Timers_TurboOn()
    end
    HealBot_nextRecalcParty(0)
end

function HealBot_Options_ToggleCustomCuresCastBy()
      --HealBot_setCall("HealBot_Options_ToggleCustomCuresCastBy")
    if HealBot_Globals.CureCustomDefaultCastBy == 2 then
        HealBot_Globals.CureCustomDefaultCastBy=1
        for dName, CastBy in pairs (HealBot_Globals.FilterCustomDebuff) do
            CastBy=CastBy+1
            if CastBy == 5 then CastBy=1 end
            HealBot_Globals.FilterCustomDebuff[dName]=CastBy
        end
    else
        HealBot_Globals.CureCustomDefaultCastBy=2
        for dName, CastBy in pairs (HealBot_Globals.FilterCustomDebuff) do
            CastBy=CastBy-1
            if CastBy == 0 then CastBy=4 end
            HealBot_Globals.FilterCustomDebuff[dName]=CastBy
        end
    end
    HealBot_Options_setCDebuffCasyBy()
    HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
end

function HealBot_Options_FrameAliasList()
      --HealBot_setCall("HealBot_Options_FrameAliasList")
    local alias={}
    for f=1,5 do
        if string.len(hbv_Skins_GetFrameVar("FrameAlias", "ALIAS", f))>0 then
            alias[f]=hbv_Skins_GetFrameVar("FrameAlias", "ALIAS", f)
        else
            alias[f]=HEALBOT_OPTIONS_FRAME.." "..f
        end
    end
    if HEALBOT_GAME_VERSION<2 then
        HealBot_Options_HealGroupsFrame_List={
            alias[1],
            alias[2],
            alias[3],
            alias[4],
            alias[5],
            "--------",
            HEALBOT_OPTIONS_PETHEALS_en,
            HEALBOT_OPTIONS_TARGETHEALS_en,
            "--------",
            HEALBOT_CUSTOM_CASTBY_ENEMY_en,
        }
    elseif HEALBOT_GAME_VERSION<3 then
        HealBot_Options_HealGroupsFrame_List={
            alias[1],
            alias[2],
            alias[3],
            alias[4],
            alias[5],
            "--------",
            HEALBOT_OPTIONS_PETHEALS_en,
            HEALBOT_OPTIONS_TARGETHEALS_en,
            HEALBOT_FOCUS_en,
            HEALBOT_CUSTOM_CASTBY_ENEMY_en,
        }
    else
        HealBot_Options_HealGroupsFrame_List={
            alias[1],
            alias[2],
            alias[3],
            alias[4],
            alias[5],
            HEALBOT_VEHICLE_en,
            HEALBOT_OPTIONS_PETHEALS_en,
            HEALBOT_OPTIONS_TARGETHEALS_en,
            HEALBOT_FOCUS_en,
            HEALBOT_CUSTOM_CASTBY_ENEMY_en,
        }
    end
end

local HealBot_Buff_Spells_Class_List={}
local HealBot_Buff_Spells_List={}
local Buff_WeaponEnchant_List={[1]={}, [2]={}}
function HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, id)
      --HealBot_setCall("HealBot_Options_InsertBuffSpellsWeaponEnchantList")
    local exists=false
    for j=1, getn(Buff_WeaponEnchant_List[id]) do
        if Buff_WeaponEnchant_List[id][j] == sName then
            exists=true
            break;
        end
    end
    if not exists then
        table.insert(Buff_WeaponEnchant_List[id], sName)
    end
end

function HealBot_Options_UpdateBuffSpellsWeaponEnchantList()
      --HealBot_setCall("HealBot_Options_UpdateBuffSpellsWeaponEnchantList")
    local sName=nil
    if HEALBOT_GAME_VERSION<4 then
        sName=HealBot_WoWAPI_ItemInfo(HEALBOT_BRILLIANT_MANA_OIL_SPELL)
        if sName then HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 1) end
        sName=HealBot_WoWAPI_ItemInfo(HEALBOT_BRILLIANT_WIZARD_OIL_SPELL)
        if sName then HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 1) end
        sName=HealBot_WoWAPI_ItemInfo(HEALBOT_BLESSED_WIZARD_OIL_SPELL)
        if sName then HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 1) end
        sName=HealBot_WoWAPI_ItemInfo(HEALBOT_WIZARD_OIL_SPELL)
        if sName then HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 1) end
        if HEALBOT_GAME_VERSION>1 then
            sName=HealBot_WoWAPI_ItemInfo(HEALBOT_SUPERIOR_MANA_OIL_SPELL)
            if sName then HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 1) end
            sName=HealBot_WoWAPI_ItemInfo(HEALBOT_SUPERIOR_WIZARD_OIL_SPELL)
            if sName then HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 1) end
        end
    end
    table.sort(Buff_WeaponEnchant_List[1])
    table.sort(Buff_WeaponEnchant_List[2])
    table.insert(Buff_WeaponEnchant_List[1], 1, HEALBOT_WORDS_NONE)
    table.insert(Buff_WeaponEnchant_List[2], 1, HEALBOT_WORDS_NONE)
end

function HealBot_Options_InitBuffSpellsClassList(tClass)
      --HealBot_setCall("HealBot_Options_InitBuffSpellsClassList")
	local Buff_Spells_List={}
    Buff_WeaponEnchant_List={[1]={}, [2]={}}
    HealBot_Options_UpdateBuffSpellsWeaponEnchantList()

    if tClass == "DEAT" then
        Buff_Spells_List={
            HEALBOT_HORN_OF_WINTER,
            HEALBOT_BONE_SHIELD,
        }
    elseif tClass == "DEMO" then -- Demon Hunter
        Buff_Spells_List={
        }
    elseif tClass == "DRUI" then
        Buff_Spells_List={
            HEALBOT_MARK_OF_THE_WILD,
            HBC_GIFT_OF_THE_WILD,
            HBC_OMEN_OF_CLARITY,
            HEALBOT_BARKSKIN,
            HEALBOT_IRONBARK,
            HBC_THORNS,
            HBC_NATURE_GRASP,
            HEALBOT_SYMBIOTIC_RELATIONSHIP,
        }
    elseif tClass == "EVOK" then
        Buff_Spells_List={
            HEALBOT_BLESSING_OF_THE_BRONZE,
            HEALBOT_SOURCE_OF_MAGIC,
            HEALBOT_BLISTERING_SCALES,
        }
    elseif tClass == "HUNT" then
        Buff_Spells_List={
            HEALBOT_A_CHEETAH,
            HEALBOT_A_PACK,
            HEALBOT_A_WILD,
            HEALBOT_TRAP_LAUNCHER,
            HEALBOT_LW_FEROCITY_OF_THE_RAPTOR ,
            HEALBOT_LW_FORTITUDE_OF_THE_BEAR,
            HEALBOT_LW_GRACE_OF_THE_CAT,
            HEALBOT_LW_HASTE_OF_THE_HYENA,
            HEALBOT_LW_POWER_OF_THE_PRIMATES,
            HEALBOT_LW_QUICKNESS_OF_THE_DRAGONHAWK,
            HEALBOT_LW_VERSATILITY_OF_THE_RAVAGER,
            HEALBOT_LW_WISDOM_OF_THE_SERPENT,
        }
    elseif tClass == "MAGE" then
        Buff_Spells_List={
            HEALBOT_ARCANE_BRILLIANCE,
            HBC_ARCANE_BRILLIANCE,
            HBC_AMPLIFY_MAGIC,
            HEALBOT_DALARAN_BRILLIANCE,
            HEALBOT_EVOCATION,
            HEALBOT_MAGE_WARD,
            HBC_MAGE_ARMOR,
            HBC_MANA_SHIELD,
            HEALBOT_BLAZING_BARRIER,
            HEALBOT_PRISMATIC_BARRIER,
            HEALBOT_ARCANE_POWER,
            HEALBOT_SLOW_FALL,
            HEALBOT_FOCUS_MAGIC,
            HBC_FOCUS_MAGIC,
            HEALBOT_ICE_WARD,
            HEALBOT_ICE_BARRIER,
            HBC_DAMPEN_MAGIC,
            HBC_FROST_ARMOR,
            HBC_ICE_ARMOR,
            HBC_MOLTEN_ARMOR,
        }
    elseif tClass == "MONK" then
        Buff_Spells_List={
            HEALBOT_LEGACY_EMPEROR,
            HEALBOT_LEGACY_WHITETIGER,
            HEALBOT_RUSHING_JADE_WIND,
            HEALBOT_STANCE_MONK_TIGER,
            HEALBOT_STANCE_MONK_SERPENT,
            HEALBOT_STANCE_MONK_CRANE,
        }
    elseif tClass == "PALA" then
        Buff_Spells_List={
            HEALBOT_BLESSING_OF_MIGHT,
            HBC_BLESSING_OF_MIGHT,
            HBC_GREATER_BLESSING_OF_MIGHT,
            HBC_BLESSING_OF_SANCTUARY,
            HBC_GREATER_BLESSING_OF_SANCTUARY,
            HEALBOT_BLESSING_OF_KINGS,
            HBC_BLESSING_OF_KINGS,
            HBC_GREATER_BLESSING_OF_KINGS,
            HBC_BLESSING_OF_LIGHT,
            HBC_BLESSING_OF_SALVATION,
            HBC_GREATER_BLESSING_OF_LIGHT,
            HEALBOT_BLESSING_OF_WISDOM,
            HBC_BLESSING_OF_WISDOM,
            HBC_GREATER_BLESSING_OF_WISDOM,
            HEALBOT_HAND_OF_FREEDOM,
            HEALBOT_HAND_OF_PROTECTION,
            HEALBOT_HAND_OF_SALVATION,
            HBC_GREATER_BLESSING_OF_SALVATION,
            HEALBOT_RIGHTEOUS_FURY,
            HEALBOT_CONCENTRATION_AURA,
            HEALBOT_CRUSADER_AURA,
            HEALBOT_DEVOTION_AURA,
            HBC_CONCENTRATION_AURA,
            HBC_RETRIBUTION_AURA,
            HBC_FIRE_RESISTANCE_AURA,
            HBC_FROST_RESISTANCE_AURA,
            HBC_SHADOW_RESISTANCE_AURA,
            HEALBOT_BEACON_OF_LIGHT,
            HEALBOT_BEACON_OF_FAITH,
            HEALBOT_BEACON_OF_VIRTUE,
            HEALBOT_SEAL_OF_RIGHTEOUSNESS,
            HEALBOT_SEAL_OF_INSIGHT,
            HEALBOT_SEAL_OF_JUSTICE,
            HEALBOT_SEAL_OF_COMMAND,
            HBC_SEAL_OF_COMMAND,
            HEALBOT_SEAL_OF_TRUTH,
            HBC_SEAL_OF_CORRUPTION,
            HBC_SEAL_OF_THE_CRUSADER,
            HBC_SEAL_WISDOM,
            HEALBOT_SACRED_SHIELD,
            HBC_SACRED_SHIELD,
        }
        if HEALBOT_GAME_VERSION>5 then
            local i=GetSpecialization()
            local specID=0
            if i then specID=GetSpecializationInfo(i,false,false) end
            if specID == 70 then
                table.insert(Buff_Spells_List,HEALBOT_SEAL_OF_JUSTICE)
            end
        end
    elseif tClass == "PRIE" then
        Buff_Spells_List={
            HEALBOT_POWER_WORD_FORTITUDE,
            HBC_POWER_WORD_FORTITUDE,
            HBC_SHADOW_PROTECTION,
            HBC_TOUCH_OF_WEAKNESS,
            HBC_DIVINE_SPIRIT,
            HBC_PRAYER_OF_SHADOW_PROTECTION,
            HBC_PRAYER_OF_SPIRIT,
            HBC_INNER_FIRE,
            HBC_INNER_WILL,
            HEALBOT_FEAR_WARD,
            HBC_SHADOWGUARD,
            HEALBOT_SHADOWFORM,
            HEALBOT_LEVITATE,
            HEALBOT_VAMPIRIC_EMBRACE,
        }
    elseif tClass == "ROGU" then
        Buff_Spells_List={
            HEALBOT_DEADLY_POISON,
            HEALBOT_WOUND_POISON,
            HEALBOT_CRIPPLING_POISON,
            HEALBOT_INSTANT_POISON,
        }
    elseif tClass == "SHAM" then
        Buff_Spells_List={
            HEALBOT_LIGHTNING_SHIELD,
            HBC_LIGHTNING_SHIELD,
            HEALBOT_EARTH_SHIELD,
            HBC_EARTH_SHIELD,
            HBC_WATER_SHIELD,
            HEALBOT_WATER_SHIELD,
            HEALBOT_WATER_WALKING,
            HEALBOT_WATER_BREATHING,
            HEALBOT_SPIRIT_OF_THE_ALPHA,
            HEALBOT_SKYFURY,
        }
        local sName=HealBot_Spells_KnownByID(HEALBOT_FLAMETONGUE_SPELL)
        if sName then
            HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 1)
            HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 2)
        end
        sName=HealBot_Spells_KnownByID(HEALBOT_WINDFURY_SPELL)
        if sName then HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 1) end
        sName=HealBot_Spells_KnownByID(HBC_ROCKBITER_WEAPON)
        if sName then
            HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 1)
            HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 2)
        end
        sName=HealBot_Spells_KnownByID(HBC_EARTHLIVING_WEAPON)
        if sName then
            HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 1)
            HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 2)
        end
        sName=HealBot_Spells_KnownByID(HEALBOT_EARTHLIVING_WEAPON)
        if sName then
            HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 1)
            HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 2)
        end
        sName=HealBot_Spells_KnownByID(HBC_FLAMETONGUE_WEAPON)
        if sName then
            HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 1)
            HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 2)
        end
        sName=HealBot_Spells_KnownByID(HBC_WINDFURY_WEAPON)
        if sName then
            HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 1)
            HealBot_Options_InsertBuffSpellsWeaponEnchantList(sName, 2)
        end
    elseif tClass == "WARL" then
        Buff_Spells_List={
            HEALBOT_DEMON_ARMOR,
            HBC_DEMON_ARMOR,
            HEALBOT_FEL_ARMOR,
            HEALBOT_UNENDING_BREATH,
            HEALBOT_DARK_INTENT,
            HEALBOT_SOUL_LINK,
            HBC_DETECT_LESSER_INVISIBILITY,
            HBC_DETECT_INVISIBILITY,
            HBC_DETECT_GREATER_INVISIBILITY,
        }
    elseif tClass == "WARR" then
        Buff_Spells_List={
            HEALBOT_BATTLE_SHOUT,
            HEALBOT_COMMANDING_SHOUT,
            HEALBOT_VIGILANCE,
        }
    elseif tClass == "WARR" then
        Buff_Spells_List={
        }
    end
    if HEALBOT_GAME_VERSION>8 then
        table.insert(Buff_Spells_List,HEALBOT_FLESHCRAFT)
    end
	return Buff_Spells_List, Buff_WeaponEnchant_List[1], Buff_WeaponEnchant_List[2]
end

function HealBot_Options_InitBuffClassList()
      --HealBot_setCall("HealBot_Options_InitBuffClassList")
    HealBot_Buff_Spells_Class_List, HealBot_Buff_WeaponEnchant_List[1], HealBot_Buff_WeaponEnchant_List[2]=HealBot_Options_InitBuffSpellsClassList(HealBot_Data["PCLASSTRIM"])
end

function HealBot_Options_InitBuffList()
      --HealBot_setCall("HealBot_Options_InitBuffList")
    HealBot_Options_InitBuffClassList()
    HealBot_Buff_Spells_List={}
    for x,_ in pairs(HealBot_Options_NoDuplcates) do
        HealBot_Options_NoDuplcates[x]=nil
    end
    for j=1, getn(HealBot_Buff_Spells_Class_List), 1 do
        local spellName=HealBot_Spells_KnownByID(HealBot_Buff_Spells_Class_List[j])
        if spellName and not HealBot_Options_NoDuplcates[spellName] then
            table.insert(HealBot_Buff_Spells_List,spellName)
            HealBot_Options_NoDuplcates[spellName]=true
        end
    end
    table.sort(HealBot_Buff_Spells_List)
end

function HealBot_Options_GetDebuffSpells_List(class)
      --HealBot_setCall("HealBot_Options_GetDebuffSpells_List")
    local HealBot_Debuff_Spells={}
    local hbDebuffSpells={}
    HealBot_Debuff_Spells={
      ["DEAT"]={},
      ["DEMO"]={}, -- Demon Hunter
      ["DRUI"]={HBC_DRUID_CURE_POISON, HBC_DRUID_ABOLISH_POISON, HBC_DRUID_REMOVE_CURSE, HEALBOT_REMOVE_CORRUPTION, HEALBOT_NATURES_CURE, HEALBOT_IMPROVED_NATURES_CURE},
      ["HUNT"]={},
      ["MAGE"]={HEALBOT_REMOVE_CURSE,HEALBOT_REMOVE_GREATER_CURSE,},
      ["MONK"]={HEALBOT_DETOX,},
      ["PALA"]={HBC_PURIFY, HEALBOT_CLEANSE, HEALBOT_CLEANSE_TOXIN},
      ["PRIE"]={HBC_DISPELL_MAGIC, HBC_PRIEST_CURE_DISEASE, HBC_PRIEST_ABOLISH_DISEASE, HEALBOT_PURIFY, HEALBOT_MASS_DISPEL, HEALBOT_PURIFY_DISEASE},
      ["ROGU"]={},
      ["SHAM"]={HBC_SHAMAN_CURE_POISON, HBC_SHAMAN_CURE_DISEASE, HEALBOT_PURIFY_SPIRIT, HEALBOT_CLEANSE_SPIRIT},
      ["WARL"]={},
      ["WARR"]={},
      ["EVOK"]={HEALBOT_NATURALIZE,HEALBOT_CAUTERIZING_FLAME,HEALBOT_EXPUNGE,},
    }
    hbDebuffSpells=HealBot_Debuff_Spells[class]
    --if (strsub(GetLocale(),1,2)~="en") then
    --    HealBot_Debuff_Spells["SHAM"]={HEALBOT_CLEANSE_SPIRIT}
    --end
    for x=#hbDebuffSpells,1,-1 do
        if not HealBot_Spells_KnownByName(hbDebuffSpells[x]) then
            table.remove(hbDebuffSpells, x)
        end
    end
    return hbDebuffSpells
end

function HealBot_Options_GetRacialDebuffSpells_List(race)
      --HealBot_setCall("HealBot_Options_GetRacialDebuffSpells_List")
    local HealBot_Racial_Debuff_Spells={
      ["Human"]={},
      ["Dwarf"]={HEALBOT_STONEFORM,},
      ["Night Elf"]={},
      ["Gnome"]={},
      ["Draenei"]={HEALBOT_GIFT_OF_THE_NAARU,},
      ["Pandaren"]={},
      ["Orc"]={},
      ["Undead"]={},
      ["Tauren"]={},
      ["Troll"]={},
      ["Blood Elf"]={},
      ["Goblin"]={},
      ["Worgen"]={HEALBOT_DARKFLIGHT,},
      ["Highmountain Tauren"]={},
      ["Void Elf"]={},
      ["Lightforged Draenei"]={},
      ["Nightborne"]={},
    }
    local rArray={}
    if HealBot_Racial_Debuff_Spells[race] then
        rArray=HealBot_Racial_Debuff_Spells[race]
    end
    return rArray
end

function HealBot_Options_setDebuffTypes()
      --HealBot_setCall("HealBot_Options_setDebuffTypes")
    if HEALBOT_GAME_VERSION>9 then
        if hb_lVars["PriestImprovedPurify"] then
            HealBot_Debuff_Types[HEALBOT_PURIFY]={HEALBOT_MAGIC_en, HEALBOT_DISEASE_en}
        else
            HealBot_Debuff_Types[HEALBOT_PURIFY]={HEALBOT_MAGIC_en}
        end
        if hb_lVars["PaladinImprovedCleanse"] then
            HealBot_Debuff_Types[HEALBOT_CLEANSE]={HEALBOT_DISEASE_en, HEALBOT_POISON_en, HEALBOT_MAGIC_en}
        else
            HealBot_Debuff_Types[HEALBOT_CLEANSE]={HEALBOT_MAGIC_en}
        end
        if hb_lVars["ShamanImprovedPurifySpirit"] then
            HealBot_Debuff_Types[HEALBOT_PURIFY_SPIRIT]={HEALBOT_MAGIC_en, HEALBOT_CURSE_en}
        else
            HealBot_Debuff_Types[HEALBOT_PURIFY_SPIRIT]={HEALBOT_MAGIC_en}
        end
        if hb_lVars["DruidImprovedNaturesCure"] then
            HealBot_Debuff_Types[HEALBOT_NATURES_CURE]={HEALBOT_MAGIC_en, HEALBOT_CURSE_en, HEALBOT_POISON_en}
        else
            HealBot_Debuff_Types[HEALBOT_NATURES_CURE]={HEALBOT_MAGIC_en}
        end
    elseif HEALBOT_GAME_VERSION>3 then
        if HealBot_Data["PCLASSTRIM"] then
            if HealBot_Data["PCLASSTRIM"] == "SHAM" then
                if hb_lVars["ShamanImprovedCleanseSpirit"] then
                    HealBot_Debuff_Types[HEALBOT_CLEANSE_SPIRIT]={HEALBOT_MAGIC_en, HEALBOT_CURSE_en}
                else
                    HealBot_Debuff_Types[HEALBOT_CLEANSE_SPIRIT]={HEALBOT_CURSE_en}
                end
                if hb_lVars["ShamanImprovedPurifySpirit"] then
                    HealBot_Debuff_Types[HEALBOT_PURIFY_SPIRIT]={HEALBOT_MAGIC_en, HEALBOT_CURSE_en}
                else
                    HealBot_Debuff_Types[HEALBOT_PURIFY_SPIRIT]={HEALBOT_CURSE_en}
                end
            elseif HealBot_Data["PCLASSTRIM"] == "DRUI" then
                if hb_lVars["DruidImprovedNaturesCure"] then
                    HealBot_Debuff_Types[HBC_DRUID_REMOVE_CURSE]={HEALBOT_CURSE_en, HEALBOT_POISON_en, HEALBOT_MAGIC_en}
                else
                    HealBot_Debuff_Types[HBC_DRUID_REMOVE_CURSE]={HEALBOT_CURSE_en, HEALBOT_POISON_en}
                end
            elseif HealBot_Data["PCLASSTRIM"] == "PALA" then
                if hb_lVars["PaladinImprovedCleanse"] then
                    HealBot_Debuff_Types[HEALBOT_CLEANSE]={HEALBOT_DISEASE_en, HEALBOT_POISON_en, HEALBOT_MAGIC_en}
                else
                    HealBot_Debuff_Types[HEALBOT_CLEANSE]={HEALBOT_DISEASE_en, HEALBOT_POISON_en}
                end
            elseif HealBot_Data["PCLASSTRIM"] == "MONK" then
                if hb_lVars["MonkImprovedDetox"] then
                    HealBot_Debuff_Types[HEALBOT_DETOX]={HEALBOT_MAGIC_en, HEALBOT_DISEASE_en, HEALBOT_POISON_en}
                else
                    HealBot_Debuff_Types[HEALBOT_DETOX]={HEALBOT_DISEASE_en, HEALBOT_POISON_en}
                end
            end
        else
            HealBot_SetPlayerData()
            HealBot_Timers_Set("LAST","SetDebuffTypes",true,true)
        end
    end
end

function HealBot_Options_ReloadUI(reason)
      --HealBot_setCall("HealBot_Options_ReloadUI")
    local msg=reason or HEALBOT_OPTIONS_RELOADUIMSG
    StaticPopupDialogs["HEALBOT_OPTIONS_RELOADUI"]={
        text=msg,
        button1=HEALBOT_WORDS_YES,
        button2=HEALBOT_WORDS_NO,
        OnAccept=function()
            if not HealBot_Data["UILOCK"] then
                ReloadUI();
            else
                HealBot_AddChat("Not In Combat")
            end
        end,
        timeout=0,
        whileDead=1,
        hideOnEscape=1
    };

    StaticPopup_Show ("HEALBOT_OPTIONS_RELOADUI");
end

function HealBot_Options_ReloadUIAreYouSure()
      --HealBot_setCall("HealBot_Options_ReloadUIAreYouSure")
    HealBot_Options_ReloadUI(HEALBOT_OPTIONS_HARDRESET)
end

function HealBot_Options_retDebuffWatchTarget(debuffType)
      --HealBot_setCall("HealBot_Options_retDebuffWatchTarget")
    if HealBot_DebuffSpell[debuffType] then
        return HealBot_DebuffWatchTarget[debuffType]
    else
        return nil
    end
end

function HealBot_Options_retDebuffCureSpell(debuffType)
      --HealBot_setCall("HealBot_Options_retDebuffCureSpell")
    return HealBot_DebuffSpell[debuffType]
end

function HealBot_Options_retDebuffCureType(debuffType)
      --HealBot_setCall("HealBot_Options_retDebuffCureType")
    return HealBot_DebuffType[debuffType]
end

function HealBot_Options_retBuffWatchTarget(buffName)
      --HealBot_setCall("HealBot_Options_retBuffWatchTarget")
    return HealBot_BuffWatchTarget[buffName]
end

local hbCustomDebuffPrio={}
function HealBot_Options_setDebuffPriority()
      --HealBot_setCall("HealBot_Options_setDebuffPriority")
    for id,_ in pairs(hbCustomDebuffPrio) do
        hbCustomDebuffPrio[id]=false
    end
    for id, x in pairs(HealBot_Globals.CustomDebuffs) do
        local name=HealBot_WoWAPI_SpellName(id)
        if id~=HEALBOT_CUSTOM_CAT_CUSTOM_AUTOMATIC then hbCustomDebuffPrio[id]=x end
        if (HealBot_Globals.CustomDebuffIDMethod[id] or 2)>1 and name then
            hbCustomDebuffPrio[name]=x
        end
    end
    for id,_ in pairs(hbCustomDebuffPrio) do
        if not hbCustomDebuffPrio[id] then hbCustomDebuffPrio[id]=nil end
    end
    HealBot_Aura_setCustomDebuffFilterCastBy()
    HealBot_Timers_Set("AURA","ResetDebuffCache")
end

function HealBot_Options_retDebuffPriority(spellId, spellName, debuffType)
      --HealBot_setCall("HealBot_Options_retDebuffPriority")
    if HealBot_DebuffSpell[debuffType] then
        return hbCustomDebuffPrio[spellId] or hbCustomDebuffPrio[spellName] or 89, HealBot_Config_Cures.HealBotDebuffPriority[debuffType] or 88
    else
        return hbCustomDebuffPrio[spellId] or hbCustomDebuffPrio[spellName] or 89, 88
    end
end

function HealBot_Options_OptionsThemeCols()
      --HealBot_setCall("HealBot_Options_OptionsThemeCols")
    return OptionThemes[HealBot_Globals.OptionsTheme]["R"],
           OptionThemes[HealBot_Globals.OptionsTheme]["G"],
           OptionThemes[HealBot_Globals.OptionsTheme]["B"],
           OptionThemes[HealBot_Globals.OptionsTheme]["A"]
end

function HealBot_Options_Pct_OnLoad(self,vText)
      --HealBot_setCall("HealBot_Options_Pct_OnLoad")
    self.text=vText;
    local g=_G[self:GetName().."Text"]
    g:SetText(vText);
    g=_G[self:GetName().."Low"]
    g:SetText("0%");
    g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    g=_G[self:GetName().."High"]
    g:SetText("100%");
    g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    self:SetMinMaxValues(0.00,1.00);
    self:SetValueStep(0.01);
    self:SetStepsPerPage(5);
end

function HealBot_Options_Pct_OnLoad_MinMax(self,vText,Min,Max,Step,pageStep)
      --HealBot_setCall("HealBot_Options_Pct_OnLoad_MinMax")
    self.text=vText;
    local StepsPerPage=pageStep or 0.05
    local i=(Min*100).."%";
    local j=(Max*100).."%";

    local g=_G[self:GetName().."Text"]
    g:SetText(vText);
    g=_G[self:GetName().."Low"]
    g:SetText(i);
    g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    g=_G[self:GetName().."High"]
    g:SetText(j);
    g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    self:SetMinMaxValues(Min,Max);
    self:SetValueStep(Step);
    self:SetStepsPerPage(StepsPerPage);
end

function HealBot_Options_val_OnLoad(self,vText,Min,Max,Step,pageStep)
      --HealBot_setCall("HealBot_Options_val_OnLoad")
    self.text=vText;
    local StepsPerPage=pageStep or HealBot_Options_getStepsPerPage(Max,Step)
    local g=_G[self:GetName().."Text"]
    g:SetText(vText);
    g=_G[self:GetName().."Low"]
    g:SetText(Min);
    g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    g=_G[self:GetName().."High"]
    g:SetText(Max);
    g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    self:SetMinMaxValues(Min,Max);
    self:SetValueStep(Step);
    self:SetStepsPerPage(StepsPerPage);
end

function HealBot_Options_val2_OnLoad(self,vText,Min,Max,Step,vDiv,pageStep)
      --HealBot_setCall("HealBot_Options_val2_OnLoad")
    self.text=vText;
    local StepsPerPage=pageStep or HealBot_Options_getStepsPerPage(Max,Step)
    local g=_G[self:GetName().."Text"]
    g:SetText(vText);
    g=_G[self:GetName().."Low"]
    g:SetText(Min/vDiv);
    g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    g=_G[self:GetName().."High"]
    g:SetText(Max/vDiv);
    g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    self:SetMinMaxValues(Min,Max);
    self:SetValueStep(Step);
    self:SetStepsPerPage(StepsPerPage);
end

function HealBot_Options_sliderlabels_Init(self,vText,Min,Max,Step,pageStep,lowTxt,highTxt)
      --HealBot_setCall("HealBot_Options_sliderlabels_Init")
    self.text=vText;
    local StepsPerPage=pageStep or HealBot_Options_getStepsPerPage(Max,Step)
    local g=_G[self:GetName().."Text"]
    g:SetText(vText);
    g=_G[self:GetName().."Low"]
    g:SetText(lowTxt);
    g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    g=_G[self:GetName().."High"]
    g:SetText(highTxt);
    g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    self:SetMinMaxValues(Min,Max);
    self:SetValueStep(Step);
    self:SetStepsPerPage(StepsPerPage);
end

function HealBot_Options_valtime_OnLoad(self,vText,Min,Max,Step,pageStep)
      --HealBot_setCall("HealBot_Options_valtime_OnLoad")
    self.text=vText;
    local StepsPerPage=pageStep or 2 --HealBot_Options_getStepsPerPage(Max,Step)
    local g=_G[self:GetName().."Text"]
    g:SetText(vText);
    g=_G[self:GetName().."Low"]
    g:SetText(Min/60);
    g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    g=_G[self:GetName().."High"]
    g:SetText(Max/60);
    g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    self:SetMinMaxValues(Min,Max);
    self:SetValueStep(Step);
    self:SetStepsPerPage(StepsPerPage);
end

function HealBot_Options_getStepsPerPage(Max,Step)
      --HealBot_setCall("HealBot_Options_getStepsPerPage")
    local i=ceil(Max/10)
    if i<Step then i=Step end
    if i>20 then
        i=10
    elseif i>5 then
        i=5
    elseif i>2 then
        i=2
    end
    return i
end

function HealBot_Options_SetText(self,vText)
    local g=_G[self:GetName().."Text"]
    g:SetText(vText);
    g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["A"])
end

function HealBot_Options_SetLabel(label,vText)
      --HealBot_setCall("HealBot_Options_SetLabel")
    local g=_G[label]
    g:SetText(vText);
    g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                   OptionThemes[HealBot_Globals.OptionsTheme]["A"])
end

function HealBot_Options_UIDropDownMenu_OnLoad(self, width)
    UIDropDownMenu_SetWidth(self,width)
end

function HealBot_Options_OverrideNotifyOtherMsg_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_OverrideNotifyOtherMsg_OnTextChanged")
    HealBot_Globals.OverrideChat["MSG"]=self:GetText()
    HealBot_Timers_Set("CHAT","SetChat",true)
end

function HealBot_Options_NotifyOtherMsg_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_NotifyOtherMsg_OnTextChanged")
    hbv_Skins_SetVar(self:GetText(), "Chat", "MSG")
    HealBot_Timers_Set("CHAT","SetChat",true)
end

function HealBot_Options_SetNoColsText()
      --HealBot_setCall("HealBot_Options_SetNoColsText")
    if hbv_Skins_GetFrameBoolean("HeadBar", "SHOW", hb_lVars["Frame"]) then
        HealBot_Options_BarNumGroupPerCol:Hide()
        return HEALBOT_OPTIONS_SKINNUMHCOLS;
    else
        HealBot_Options_BarNumGroupPerCol:Show()
        if hbv_Skins_GetFrameBoolean("HealBar", "GRPCOLS", hb_lVars["Frame"]) then
            return HEALBOT_OPTIONS_SKINNUMHCOLS;
        else
            return HEALBOT_OPTIONS_SKINNUMCOLS;
        end
    end
end

function HealBot_Options_Pct_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_Pct_OnValueChanged")
    local pct=floor(self:GetValue()*100+0.5);
    local g=_G[self:GetName()]
    HealBot_Options_SetText(g, self.text .. ": " .. pct .. "%")
    --g:SetText(self.text .. " (" .. pct .. "%)");
    return self:GetValue();
end

function HealBot_Options_NewSkin_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_NewSkin_OnTextChanged")
    local text= self:GetText()
    if strlen(text)>0 then
        HealBot_Options_NewSkinb:Enable();
    else
        HealBot_Options_NewSkinb:Disable();
    end
end

function HealBot_Options_NewSkinb_OnClick(self)
      --HealBot_setCall("HealBot_Options_NewSkinb_OnClick")
    local skinName=HealBot_Options_NewSkin:GetText()
    if tonumber(skinName) then skinName='#'..skinName end
    HealBot_Options_setNewSkin(skinName)
end

function HealBot_Options_setNewSkin(newSkinName)
      --HealBot_setCall("HealBot_Options_setNewSkin")
    Healbot_Config_Skins.HealBar[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.HealBar[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.BarTextCol[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.BarTextCol[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.BarCol[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.BarCol[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.BarIACol[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.BarIACol[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.Frame[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.Frame[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.StickyFrames[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.StickyFrames[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.HeadBar[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.HeadBar[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.HeadText[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.HeadText[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.General[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.General[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.RaidIcon[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.RaidIcon[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.Icons[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.Icons[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.BarAggro[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.BarAggro[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.BarText[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.BarText[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.IconText[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.IconText[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.IconSets[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.IconSets[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.IconSetsText[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.IconSetsText[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.HealGroups[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.Healing[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.Healing[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.Chat[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.Chat[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.Anchors[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.Anchors[Healbot_Config_Skins.Current_Skin])
    HealBot_Config.SkinDefault[newSkinName]={}
    Healbot_Config_Skins.FocusGroups[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.FocusGroups[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.BarVisibility[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.BarVisibility[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.FrameAlias[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.FrameAlias[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.FrameAliasBar[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.FrameAliasBar[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.Enemy[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.Enemy[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.BarSort[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.BarSort[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.DuplicateBars[newSkinName]=Healbot_Config_Skins.DuplicateBars[Healbot_Config_Skins.Current_Skin]
    Healbot_Config_Skins.Indicators[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.Indicators[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.Emerg[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.Emerg[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.CustomCols[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.CustomCols[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.Adaptive[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.Adaptive[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.AdaptiveOrder[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.AdaptiveOrder[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.AdaptiveCol[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Skins.AdaptiveCol[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Aux.Bar[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Aux.Bar[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Aux.BarText[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Aux.BarText[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Aux.Overlay[newSkinName]=HealBot_Options_copyTable(Healbot_Config_Aux.Overlay[Healbot_Config_Skins.Current_Skin])
    HealBot_Skins_ActionIcons[newSkinName]=HealBot_Options_copyTable(HealBot_Skins_ActionIcons[Healbot_Config_Skins.Current_Skin])
    HealBot_Skins_ActionIconsData[newSkinName]=HealBot_Options_copyTable(HealBot_Skins_ActionIconsData[Healbot_Config_Skins.Current_Skin])
    Healbot_Config_Skins.Author[newSkinName]=UnitName("Player").." "..HEALBOT_PLAYER_OF_REALM.." "..GetRealmName()
    if not HealBot_Options_checkSkinName(newSkinName) then
        table.insert(Healbot_Config_Skins.Skins,2,newSkinName)
        Healbot_Config_Skins.Skin_ID=2;
    end
    HealBot_Options_Set_Current_Skin(newSkinName, nil, nil, true)
    HealBot_Options_NewSkin:SetText("")
    HealBot_Timers_Set("OOC","SaveActionIconsProfile",true)
end

function HealBot_Options_copyTable(t)
      --HealBot_setCall("HealBot_Options_copyTable", nil, nil, nil, true)
    if t == nil then return nil end
    local nt={}
    for k, v in pairs(t) do
        if type(v) == 'table' then
            nt[k]=HealBot_Options_copyTable(v)
        else
            nt[k]=v
        end
    end
    return nt
end

function HealBot_Options_DeleteSkin_OnClick(self)
      --HealBot_setCall("HealBot_Options_DeleteSkin_OnClick")
    if Healbot_Config_Skins.Current_Skin~=HEALBOT_SKINS_STD then
        local hbDelSkinName=Healbot_Config_Skins.Current_Skin
        if HealBot_Options_checkSkinName(hbDelSkinName) then
            Healbot_Config_Skins.HealBar[hbDelSkinName]=nil
            Healbot_Config_Skins.BarTextCol[hbDelSkinName]=nil
            Healbot_Config_Skins.BarCol[hbDelSkinName]=nil
            Healbot_Config_Skins.BarIACol[hbDelSkinName]=nil
            Healbot_Config_Skins.Frame[hbDelSkinName]=nil
            Healbot_Config_Skins.StickyFrames[hbDelSkinName]=nil
            Healbot_Config_Skins.HeadBar[hbDelSkinName]=nil
            Healbot_Config_Skins.HeadText[hbDelSkinName]=nil
            Healbot_Config_Skins.General[hbDelSkinName]=nil
            Healbot_Config_Skins.RaidIcon[hbDelSkinName]=nil
            Healbot_Config_Skins.Icons[hbDelSkinName]=nil
            Healbot_Config_Skins.BarAggro[hbDelSkinName]=nil
            Healbot_Config_Skins.BarText[hbDelSkinName]=nil
            Healbot_Config_Skins.IconText[hbDelSkinName]=nil
            Healbot_Config_Skins.IconSets[hbDelSkinName]=nil
            Healbot_Config_Skins.IconSetsText[hbDelSkinName]=nil
            Healbot_Config_Skins.HealGroups[hbDelSkinName]=nil
            Healbot_Config_Skins.Healing[hbDelSkinName]=nil
            Healbot_Config_Skins.BarVisibility[hbDelSkinName]=nil
            Healbot_Config_Skins.Chat[hbDelSkinName]=nil
            Healbot_Config_Skins.Anchors[hbDelSkinName]=nil
            HealBot_Config.SkinDefault[hbDelSkinName]=nil
            Healbot_Config_Skins.DuplicateBars[hbDelSkinName]=nil
            Healbot_Config_Skins.Author[hbDelSkinName]=nil
            Healbot_Config_Skins.FrameAlias[hbDelSkinName]=nil
            Healbot_Config_Skins.FrameAliasBar[hbDelSkinName]=nil
            Healbot_Config_Skins.FocusGroups[hbDelSkinName]=nil
            Healbot_Config_Skins.Enemy[hbDelSkinName]=nil
            Healbot_Config_Skins.Indicators[hbDelSkinName]=nil
            Healbot_Config_Skins.BarSort[hbDelSkinName]=nil
            Healbot_Config_Skins.Emerg[hbDelSkinName]=nil
            Healbot_Config_Skins.CustomCols[hbDelSkinName]=nil
            Healbot_Config_Skins.Adaptive[hbDelSkinName]=nil
            Healbot_Config_Skins.AdaptiveOrder[hbDelSkinName]=nil
            Healbot_Config_Skins.AdaptiveCol[hbDelSkinName]=nil
            HealBot_Config.SkinDefault[hbDelSkinName]=nil
            Healbot_Config_Aux.Bar[hbDelSkinName]=nil
            Healbot_Config_Aux.BarText[hbDelSkinName]=nil
            Healbot_Config_Aux.Overlay[hbDelSkinName]=nil
            HealBot_Skins_ActionIcons[hbDelSkinName]=nil
            HealBot_Skins_ActionIconsData[hbDelSkinName]=nil
            table.remove(Healbot_Config_Skins.Skins,Healbot_Config_Skins.Skin_ID)
            HealBot_Config.LastAutoSkinChangeTime=0
            HealBot_Options_DeleteActionIconsProfile(hbDelSkinName)
            local retryWithSkin=HealBot_getDefaultSkin()
            HealBot_Options_Set_Current_Skin(retryWithSkin, nil, nil, true)
        end
    end
end

function HealBot_Options_EnemyShowAura_OnClick(self,var)
      --HealBot_setCall("HealBot_Options_EnemyShowAura_OnClick")
    if hbv_Skins_GetBoolean("Enemy", var)~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Enemy", var)
        if not hbv_Skins_GetBoolean("Enemy", var) then
            if var == "SHOWBUFFS" or var == "SELFBUFFS" or var == "SHOWBUFFSPLAYERFRAMES" or var == "SELFBUFFSPLAYERFRAMES" then
                HealBot_Update_ClearAllBuffs(true)
            else
                HealBot_Update_ClearAllDebuffs(true)
            end
        end
    end
end

function HealBot_Options_ShowEnemyIncSelf_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowEnemyIncSelf_OnClick")
    if hbv_Skins_GetBoolean("Enemy", "INCSELF")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Enemy", "INCSELF")
        HealBot_Timers_Set("OOC","ValidateEnemyPlayerFrames")
    end
end

function HealBot_Options_ShowEnemyIncTanks_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowEnemyIncTanks_OnClick")
    if hbv_Skins_GetBoolean("Enemy", "INCTANKS")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Enemy", "INCTANKS")
        HealBot_Timers_Set("OOC","ValidateEnemyPlayerFrames")
    end
end

function HealBot_Options_ShowEnemyIncGroup_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowEnemyIncGroup_OnClick")
    if hbv_Skins_GetVar("Enemy", "INCGROUP")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Enemy", "INCGROUP")
        HealBot_Timers_Set("OOC","ValidateEnemyPlayerFrames")
    end
end

function HealBot_Options_ShowEnemyIncRaid_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowEnemyIncGroup_OnClick")
    if hbv_Skins_GetVar("Enemy", "INCRAID")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Enemy", "INCRAID")
        HealBot_Timers_Set("OOC","ValidateEnemyPlayerFrames")
    end
end

function HealBot_Options_ShowEnemyIncFocus_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowEnemyIncFocus_OnClick")
    if hbv_Skins_GetBoolean("Enemy", "INCFOCUS")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Enemy", "INCFOCUS")
        HealBot_Timers_setLuVars("ResetSkins", true)
        HealBot_Timers_Set("OOCNT","RefreshPartyNextRecalcEnemy")
    end
end

function HealBot_Options_ShowEnemyIncArena_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowEnemyIncArena_OnClick")
    if hbv_Skins_GetBoolean("Enemy", "INCARENA")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Enemy", "INCARENA")
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_ShowEnemyIncArenaPets_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowEnemyIncArenaPets_OnClick")
    if hbv_Skins_GetBoolean("Enemy", "INCARENAPETS")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Enemy", "INCARENAPETS")
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_ShowEnemyIncMyTargets_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowEnemyIncMyTargets_OnClick")
    if hbv_Skins_GetBoolean("Enemy", "INCMYTAR")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Enemy", "INCMYTAR")
        HealBot_Timers_Set("OOC","ValidateEnemyPlayerFrames")
    end
end

function HealBot_Options_ShowEnemyTargets_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowEnemyTargets_OnClick")
    if hbv_Skins_GetBoolean("Enemy", "ENEMYTARGET")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Enemy", "ENEMYTARGET")
        HealBot_Options_framesChanged(true)
        HealBot_Timers_Set("OOC","UpdateEnemyFrames")
    end
end

function HealBot_Options_ShowEnemyTargetsPlayerFrames_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowEnemyTargets_OnClick")
    if hbv_Skins_GetVar("Enemy", "ENEMYTARGETPLAYERFRAMES")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Enemy", "ENEMYTARGETPLAYERFRAMES")
        HealBot_Timers_Set("OOC","DeleteAllPlayerFrames")
        HealBot_Timers_Set("OOC","ValidateEnemyPlayerFrames")
    end
end

function HealBot_Options_EnemyExistsBosses_OnClick(self)
      --HealBot_setCall("HealBot_Options_EnemyExistsBosses_OnClick")
    if hbv_Skins_GetBoolean("Enemy", "EXISTSHOWBOSS")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Enemy", "EXISTSHOWBOSS")
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_TargetUsesEnemyCols_OnClick(self)
      --HealBot_setCall("HealBot_Options_EnemyExistsBosses_OnClick")
    if hbv_Skins_GetBoolean("Enemy", "TARUSEENEMYCOLS")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Enemy", "TARUSEENEMYCOLS")
        HealBot_Timers_Set("OOC","UpdateEnemyFrames")
    end
end

function HealBot_Options_ToTUsesEnemyCols_OnClick(self)
      --HealBot_setCall("HealBot_Options_EnemyExistsBosses_OnClick")
    if hbv_Skins_GetBoolean("Enemy", "TOTUSEENEMYCOLS")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Enemy", "TOTUSEENEMYCOLS")
        HealBot_Timers_Set("OOC","UpdateEnemyFrames")
    end
end

function HealBot_Options_OverrideAfterCombatOOM_OnClick(self)
      --HealBot_setCall("HealBot_Options_OverrideAfterCombatOOM_OnClick")
    if HealBot_Globals.OverrideChat["EOCOOM"]~=self:GetChecked() then
        HealBot_Globals.OverrideChat["EOCOOM"]=self:GetChecked()
        HealBot_Timers_Set("CHAT","SetChat")
    end
end

function HealBot_Options_AfterCombatOOM_OnClick(self)
      --HealBot_setCall("HealBot_Options_AfterCombatOOM_OnClick")
    if hbv_Skins_GetBoolean("Chat", "EOCOOM")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Chat", "EOCOOM")
        HealBot_Timers_Set("CHAT","SetChat")
    end
end

function HealBot_Options_AuxBarOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AuxBarOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Aux_GetBarVar("OFFSET", hb_lVars["Frame"], hb_lVars["AuxBar"])~=val then
        hbv_Data_AuxSetBarVar(val, "OFFSET", hb_lVars["Frame"], hb_lVars["AuxBar"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Panel_SkinResetFrame(hb_lVars["Frame"])
        HealBot_Options_framesChanged(true, false, false, false, true)
    end
end

function HealBot_Options_AuxBarDepth_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AuxBarDepth_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Aux_GetBarVar("DEPTH", hb_lVars["Frame"], hb_lVars["AuxBar"])~=val then
        hbv_Data_AuxSetBarVar(val, "DEPTH", hb_lVars["Frame"], hb_lVars["AuxBar"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Panel_SkinResetFrame(hb_lVars["Frame"])
        HealBot_Options_framesChanged(true, false, false, false, true)
    end
end

function HealBot_Options_AuxBarOpacityCustom_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AuxBarOpacityCustom_OnValueChanged")
    local val=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2)
    if hbv_Aux_GetBarVar("A", hb_lVars["Frame"], hb_lVars["AuxBar"])~=val then
        hbv_Data_AuxSetBarVar(val, "A", hb_lVars["Frame"], hb_lVars["AuxBar"])
        HealBot_Aux_UpdateAllAuxByType(hb_lVars["Frame"], hb_lVars["AuxBar"])
    end
end

function HealBot_Options_AuxBarSize_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AuxBarSize_OnValueChanged")
    local val=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2)
    if hbv_Aux_GetBarVar("SIZE", hb_lVars["Frame"], hb_lVars["AuxBar"])~=val then
        hbv_Data_AuxSetBarVar(val, "SIZE", hb_lVars["Frame"], hb_lVars["AuxBar"])
        HealBot_Options_framesChanged(false, false, false, false, true)
        HealBot_Options_framesChanged(false, false, false, true)
        HealBot_Timers_Set("SKINS","SetSkinText")
    end
end

function HealBot_Options_SetOverrideGlowSize()
    if HealBot_Globals.OverrideEffects["USE"] == 1 then
        HealBot_Action_setLuVars("BarGlowSize", hbv_Skins_GetFrameVar("Frame", "GLOW", hb_lVars["Frame"]))
        HealBot_Action_setLuVars("IconGlowSize", hbv_Skins_GetFrameVar("Frame", "ICONGLOW", hb_lVars["Frame"]))
        HealBot_Skins_setLuVars("IconGlowSize", hbv_Skins_GetFrameVar("Frame", "ICONGLOW", hb_lVars["Frame"]))
    else
        HealBot_Action_setLuVars("BarGlowSize", HealBot_Globals.OverrideEffects["GLOW"])
        HealBot_Action_setLuVars("IconGlowSize", HealBot_Globals.OverrideEffects["ICONGLOW"])
        HealBot_Skins_setLuVars("IconGlowSize", HealBot_Globals.OverrideEffects["ICONGLOW"])
    end
end

function HealBot_Options_SetOverrideBarGlowSize()
    HealBot_Options_SetOverrideGlowSize()
    HealBot_Timers_Set("LAST","UpdateButtonGlow")
end

function HealBot_Options_SetOverrideIconGlowSize()
    HealBot_Options_SetOverrideGlowSize()
    HealBot_Timer_UpdateIconGlow()
    HealBot_Options_framesChanged(true, true)
end

function HealBot_Options_OverrideGlowSizeBar_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_GlowSizeBar_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif HealBot_Globals.OverrideEffects["GLOW"]~=val then
        HealBot_Globals.OverrideEffects["GLOW"]=val;
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. HealBot_Options_Lists["GlowSize"][val])
        HealBot_Options_SetOverrideBarGlowSize()
    end
end

function HealBot_Options_OverrideGlowSizeIcon_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_GlowSizeBar_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif HealBot_Globals.OverrideEffects["ICONGLOW"]~=val then
        HealBot_Globals.OverrideEffects["ICONGLOW"]=val;
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. HealBot_Options_Lists["GlowSize"][val]);
        HealBot_Options_SetOverrideIconGlowSize()
    end
end

function HealBot_Options_GlowSizeBar_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_GlowSizeBar_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Frame", "GLOW", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Frame", "GLOW", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. HealBot_Options_Lists["GlowSize"][val]);
        HealBot_Options_SetOverrideBarGlowSize()
    end
end

function HealBot_Options_GlowSizeIcon_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_GlowSizeBar_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Frame", "ICONGLOW", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Frame", "ICONGLOW", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. HealBot_Options_Lists["GlowSize"][val]);
        HealBot_Options_SetOverrideIconGlowSize()
    end
end

function HealBot_Options_OverrideAuxBarFlashFreq_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_OverrideAuxBarFlashFreq_OnValueChanged")
    local val=HealBot_Util_Round(self:GetValue(),1)
    val=val/100;
    if HealBot_Globals.OverrideEffects["OFREQ"]~=val then
        HealBot_Globals.OverrideEffects["OFREQ"]=val;
        HealBot_Timers_Set("LAST","BarFreqVars")
    end
end

function HealBot_Options_OverrideBorderHazardFreq_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_OverrideBorderHazardFreq_OnValueChanged")
    local val=HealBot_Util_Round(self:GetValue(),1)
    val=1-(val/100)
    if HealBot_Globals.OverrideEffects["HAZARDFREQ"]~=val then
        HealBot_Globals.OverrideEffects["HAZARDFREQ"]=val;
        HealBot_Timers_Set("LAST","BarFreqVars")
    end
end

function HealBot_Options_BorderHazardFreq_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BorderHazardFreq_OnValueChanged")
    local val=HealBot_Util_Round(self:GetValue(),1)
    val=1-(val/100)
    if hbv_Skins_GetVar("General", "HAZARDFREQ")~=val then
        hbv_Skins_SetVar(val, "General", "HAZARDFREQ")
        HealBot_Timers_Set("LAST","BarFreqVars")
    end
end

function HealBot_Options_OverrideBorderHazardMinAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_OverrideBorderHazardMinAlpha_OnValueChanged")
    if HealBot_Globals.OverrideEffects["HAZARDMINALPHA"]~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        HealBot_Globals.OverrideEffects["HAZARDMINALPHA"]=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2);
        HealBot_Timers_Set("LAST","BarFreqVars")
    end
end

function HealBot_Options_BorderHazardMinAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BorderHazardMinAlpha_OnValueChanged")
    if hbv_Skins_GetVar("General", "HAZARDMINALPHA")~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "General", "HAZARDMINALPHA")
        HealBot_Timers_Set("LAST","BarFreqVars")
    end
end

function HealBot_Options_AuxBarFlashFreq_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AuxBarFlashFreq_OnValueChanged")
    local val=HealBot_Util_Round(self:GetValue(),1)
    val=val/100;
    if hbv_Skins_GetVar("General", "OFREQ")~=val then
        hbv_Skins_SetVar(val, "General", "OFREQ")
        HealBot_Timers_Set("LAST","BarFreqVars")
    end
end

function HealBot_Options_FocusGroupDimming_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_FocusGroupDimming_OnValueChanged")
    local val=HealBot_Util_Round(self:GetValue(),1)
    val=val/10;
    if hbv_Skins_GetVar("General", "FGDIMMING")~=val then
        hbv_Skins_SetVar(val, "General", "FGDIMMING")
        HealBot_Timers_Set("SKINS","SetFocusGroups")
    end
end

function HealBot_Options_HotBarDimming_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HotBarDimming_OnValueChanged")
    local val=HealBot_Util_Round(self:GetValue(),1)
    val=val/10;
    if hbv_Skins_GetVar("General", "HBDIMMING")~=val then
        hbv_Skins_SetVar(val, "General", "HBDIMMING")
        HealBot_Timers_Set("LAST","BarFreqVars")
    end
end

function HealBot_Options_GroupHealthDimming_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HotBarDimming_OnValueChanged")
    local val=HealBot_Util_Round(self:GetValue(),1)
    val=val/10;
    if hbv_Skins_GetVar("General", "GHDIMMING")~=val then
        hbv_Skins_SetVar(val, "General", "GHDIMMING")
        HealBot_Timers_Set("LAST","BarFreqVars")
    end
end

function HealBot_Options_TooltipScale_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_TooltipScale_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    val=val/100;
    local g=_G[self:GetName().."Text"]
    g:SetText(self.text .. ": " .. val);
    HealBot_Globals.Tooltip_Scale=val;
    if hb_lVars["TIPLOADED"] and hb_lVars["OPTIONSTIPVISIBLE"] then
        HealBot_Tooltip_Hide()
        HealBot_Tooltip_SetScale()
        HealBot_Options_Show_Help("TOOLTIPSCALE",true)
    end
end

function HealBot_Options_TooltipAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_TooltipAlpha_OnValueChanged")
    if HealBot_Globals.Tooltip_Alpha~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        HealBot_Globals.Tooltip_Alpha=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2);
        if hb_lVars["TIPLOADED"] and hb_lVars["OPTIONSTIPVISIBLE"] then
            HealBot_Tooltip_Hide()
            HealBot_Options_Show_Help("TOOLTIPALPHA",true)
        end
    end
end

function HealBot_Options_OverrideFocusGroupDimming_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_OverrideFocusGroupDimming_OnValueChanged")
    local val=HealBot_Util_Round(self:GetValue(),1)
    val=val/10;
    if HealBot_Globals.OverrideEffects["FGDIMMING"]~=val then
        HealBot_Globals.OverrideEffects["FGDIMMING"]=val;
        HealBot_Timers_Set("SKINS","SetFocusGroups")
    end
end

function HealBot_Options_OverrideHotBarDimming_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_OverrideHotBarDimming_OnValueChanged")
    local val=HealBot_Util_Round(self:GetValue(),1)
    val=val/10;
    if HealBot_Globals.OverrideEffects["HBDIMMING"]~=val then
        HealBot_Globals.OverrideEffects["HBDIMMING"]=val;
        HealBot_Timers_Set("LAST","BarFreqVars")
    end
end

function HealBot_Options_OverrideGroupHealthDimming_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_OverrideHotBarDimming_OnValueChanged")
    local val=HealBot_Util_Round(self:GetValue(),1)
    val=val/10;
    if HealBot_Globals.OverrideEffects["GHDIMMING"]~=val then
        HealBot_Globals.OverrideEffects["GHDIMMING"]=val;
        HealBot_Timers_Set("LAST","BarFreqVars")
    end
end

function HealBot_Options_UseOverrideFocusGroups_DropDown()
      --HealBot_setCall("HealBot_Options_UseOverrideFocusGroups_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    if HealBot_Globals.OverrideEffects["USEBARS"] == 1 then
        info.text=" "
        UIDropDownMenu_AddButton(info);
    else
        for j=1, getn(HealBot_Options_UseOverrideFocusGroups_List), 1 do
            info.text=HealBot_Options_UseOverrideFocusGroups_List[j];
            info.func=function(self)
                            if HealBot_Globals.OverrideEffects["FOCUSGROUPS"] ~= self:GetID() then
                                HealBot_Globals.OverrideEffects["FOCUSGROUPS"]=self:GetID()
                                UIDropDownMenu_SetText(HealBot_Options_UseOverrideFocusGroups, HealBot_Options_UseOverrideFocusGroups_List[HealBot_Globals.OverrideEffects["FOCUSGROUPS"]])
                                HealBot_Timers_Set("SKINS","SetFocusGroups")
                            end
                        end
            info.checked=false;
            if HealBot_Globals.OverrideEffects["FOCUSGROUPS"] == j then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_UseFocusGroups_DropDown()
      --HealBot_setCall("HealBot_Options_UseFocusGroups_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    if HealBot_Globals.OverrideEffects["USEBARS"] == 2 then
        info.text=" "
        UIDropDownMenu_AddButton(info);
    else
        for j=1, getn(HealBot_Options_UseOverrideFocusGroups_List), 1 do
            info.text=HealBot_Options_UseOverrideFocusGroups_List[j];
            info.func=function(self)
                            if hbv_Skins_GetVar("General", "FOCUSGROUPS") ~= self:GetID() then
                                hbv_Skins_SetVar(self:GetID(), "General", "FOCUSGROUPS")
                                UIDropDownMenu_SetText(HealBot_Options_UseFocusGroups, HealBot_Options_UseOverrideFocusGroups_List[hbv_Skins_GetVar("General", "FOCUSGROUPS")])
                                HealBot_Timers_Set("SKINS","SetFocusGroups")
                            end
                        end
            info.checked=false;
            if hbv_Skins_GetVar("General", "FOCUSGROUPS") == j then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_HotBarDebuffPrio_DropDown()
      --HealBot_setCall("HealBot_Options_HotBarDebuffPrio_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    if HealBot_Globals.OverrideEffects["USEBARS"] == 2 then
        info.text=" "
        UIDropDownMenu_AddButton(info);
    else
        for j=1, getn(HealBot_Options_Lists["HotBarsDebuffPrio"]), 1 do
            info.text=HealBot_Options_Lists["HotBarsDebuffPrio"][j];
            info.func=function(self)
                            if hbv_Skins_GetVar("General", "HOTBARDEBUFF") ~= self:GetID() then
                                hbv_Skins_SetVar(self:GetID(), "General", "HOTBARDEBUFF")
                                UIDropDownMenu_SetText(HealBot_Options_HotBarDebuffPrio, HealBot_Options_Lists["HotBarsDebuffPrio"][hbv_Skins_GetVar("General", "HOTBARDEBUFF")])
                                HealBot_Timers_Set("LAST","BarFreqVars")
                            end
                        end
            info.checked=false;
            if hbv_Skins_GetVar("General", "HOTBARDEBUFF") == j then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_GroupHealthRange_DropDown()
      --HealBot_setCall("HealBot_Options_HotBarDebuffPrio_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    if HealBot_Globals.OverrideEffects["USEBARS"] == 2 then
        info.text=" "
        UIDropDownMenu_AddButton(info);
    else
        for j=1, getn(HealBot_Options_Lists["GroupHealthRange"]), 1 do
            info.text=HealBot_Options_Lists["GroupHealthRange"][j];
            info.func=function(self)
                            if hbv_Skins_GetVar("General", "GHRANGE") ~= self:GetID() then
                                hbv_Skins_SetVar(self:GetID(), "General", "GHRANGE")
                                UIDropDownMenu_SetText(HealBot_Options_GroupHealthRange, HealBot_Options_Lists["GroupHealthRange"][hbv_Skins_GetVar("General", "GHRANGE")])
                                HealBot_Timers_Set("LAST","BarFreqVars")
                            end
                        end
            info.checked=false;
            if hbv_Skins_GetVar("General", "GHRANGE") == j then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_OverrideHotBarDebuffPrio_DropDown()
      --HealBot_setCall("HealBot_Options_OverrideHotBarDebuffPrio_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    if HealBot_Globals.OverrideEffects["USEBARS"] == 1 then
        info.text=" "
        UIDropDownMenu_AddButton(info);
    else
        for j=1, getn(HealBot_Options_Lists["HotBarsDebuffPrio"]), 1 do
            info.text=HealBot_Options_Lists["HotBarsDebuffPrio"][j];
            info.func=function(self)
                            if HealBot_Globals.OverrideEffects["HOTBARDEBUFF"] ~= self:GetID() then
                                HealBot_Globals.OverrideEffects["HOTBARDEBUFF"]=self:GetID()
                                UIDropDownMenu_SetText(HealBot_Options_OverrideHotBarDebuffPrio, HealBot_Options_Lists["HotBarsDebuffPrio"][HealBot_Globals.OverrideEffects["HOTBARDEBUFF"]])
                                HealBot_Timers_Set("LAST","BarFreqVars")
                            end
                        end
            info.checked=false;
            if HealBot_Globals.OverrideEffects["HOTBARDEBUFF"] == j then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_OverrideGroupHealthRange_DropDown()
      --HealBot_setCall("HealBot_Options_OverrideGroupHealthRange_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    if HealBot_Globals.OverrideEffects["USEBARS"] == 1 then
        info.text=" "
        UIDropDownMenu_AddButton(info);
    else
        for j=1, getn(HealBot_Options_Lists["GroupHealthRange"]), 1 do
            info.text=HealBot_Options_Lists["GroupHealthRange"][j];
            info.func=function(self)
                            if HealBot_Globals.OverrideEffects["GHRANGE"] ~= self:GetID() then
                                HealBot_Globals.OverrideEffects["GHRANGE"]=self:GetID()
                                UIDropDownMenu_SetText(HealBot_Options_OverrideGroupHealthRange, HealBot_Options_Lists["GroupHealthRange"][HealBot_Globals.OverrideEffects["GHRANGE"]])
                                HealBot_Timers_Set("LAST","BarFreqVars")
                            end
                        end
            info.checked=false;
            if HealBot_Globals.OverrideEffects["GHRANGE"] == j then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_AuxBarFlashAlphaMinMaxSet()
      --HealBot_setCall("HealBot_Options_AuxBarFlashAlphaMinMaxSet")
    if HealBot_Globals.OverrideEffects["USE"] == 1 then
        HealBot_Aux_setLuVars("AUXOMIN", hbv_Skins_GetVar("General", "OMIN"))
        HealBot_Aux_setLuVars("AUXOMAX", hbv_Skins_GetVar("General", "OMAX"))
    else
        HealBot_Aux_setLuVars("AUXOMIN", HealBot_Globals.OverrideEffects["OMIN"])
        HealBot_Aux_setLuVars("AUXOMAX", HealBot_Globals.OverrideEffects["OMAX"])
    end
end

function HealBot_Options_OverrideAuxBarFlashAlphaMin_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_OverrideAuxBarFlashAlphaMin_OnValueChanged")
    if HealBot_Globals.OverrideEffects["OMIN"]~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        HealBot_Globals.OverrideEffects["OMIN"]=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2);
        if HealBot_Globals.OverrideEffects["OMIN"]>=HealBot_Globals.OverrideEffects["OMAX"] then
            HealBot_Globals.OverrideEffects["OMAX"]=HealBot_Globals.OverrideEffects["OMIN"]+0.05
            HealBot_Options_AuxBarFlashAlphaMax:SetValue(HealBot_Globals.OverrideEffects["OMAX"])
        end
        HealBot_Timers_Set("AUX","BarFlashAlphaMinMax")
    end
end

function HealBot_Options_AuxBarFlashAlphaMin_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AuxBarFlashAlphaMin_OnValueChanged")
    if hbv_Skins_GetVar("General", "OMIN")~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "General", "OMIN")
        if hbv_Skins_GetVar("General", "OMIN")>=hbv_Skins_GetVar("General", "OMAX") then
            hbv_Skins_SetVar(hbv_Skins_GetVar("General", "OMIN")+0.05, "General", "OMAX")
            HealBot_Options_AuxBarFlashAlphaMax:SetValue(hbv_Skins_GetVar("General", "OMAX"))
        end
        HealBot_Timers_Set("AUX","BarFlashAlphaMinMax")
    end
end

function HealBot_Options_OverrideAuxBarFlashAlphaMax_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_OverrideAuxBarFlashAlphaMax_OnValueChanged")
    if HealBot_Globals.OverrideEffects["OMAX"]~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        HealBot_Globals.OverrideEffects["OMAX"]=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2);
        if HealBot_Globals.OverrideEffects["OMAX"]<=HealBot_Globals.OverrideEffects["OMIN"] then
            HealBot_Globals.OverrideEffects["OMIN"]=HealBot_Globals.OverrideEffects["OMAX"]-0.05
            HealBot_Options_AuxBarFlashAlphaMin:SetValue(HealBot_Globals.OverrideEffects["OMIN"])
        end
        HealBot_Timers_Set("AUX","BarFlashAlphaMinMax")
    end
end

function HealBot_Options_AuxBarFlashAlphaMax_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AuxBarFlashAlphaMax_OnValueChanged")
    if hbv_Skins_GetVar("General", "OMAX")~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "General", "OMAX")
        if hbv_Skins_GetVar("General", "OMAX")<=hbv_Skins_GetVar("General", "OMIN") then
            hbv_Skins_SetVar(hbv_Skins_GetVar("General", "OMAX")-0.05, "General", "OMIN")
            HealBot_Options_AuxBarFlashAlphaMin:SetValue(hbv_Skins_GetVar("General", "OMIN"))
        end
        HealBot_Timers_Set("AUX","BarFlashAlphaMinMax")
    end
end

function HealBot_Options_ShowEnemyNumBoss_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ShowEnemyNumBoss_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetVar("Enemy", "NUMBOSS")~=val then
        hbv_Skins_SetVar(val, "Enemy", "NUMBOSS")
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_PlayerTargetSize_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_EnemyTargetSize_OnValueChanged")
    if hbv_Skins_GetVar("Enemy", "PLAYERTARGETSIZE")~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "Enemy", "PLAYERTARGETSIZE")
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. (hbv_Skins_GetVar("Enemy", "PLAYERTARGETSIZE")*100).."%");
        HealBot_Options_framesChanged(true)
        HealBot_Timers_Set("OOC","UpdateEnemyFrames")
    end
end

function HealBot_Options_EnemyTargetSizePlayerFrames_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_EnemyTargetSizePlayerFrames_OnValueChanged")
    if hbv_Skins_GetVar("Enemy", "ENEMYTARGETSIZEPLAYERFRAMES")~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "Enemy", "ENEMYTARGETSIZEPLAYERFRAMES")
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. (hbv_Skins_GetVar("Enemy", "ENEMYTARGETSIZEPLAYERFRAMES")*100).."%");
        HealBot_Options_framesChanged(true)
        HealBot_Timers_Set("OOC","UpdateEnemyFrames")
    end
end

function HealBot_Options_EnemyTargetSize_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_EnemyTargetSize_OnValueChanged")
    if hbv_Skins_GetVar("Enemy", "ENEMYTARGETSIZE")~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "Enemy", "ENEMYTARGETSIZE")
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. (hbv_Skins_GetVar("Enemy", "ENEMYTARGETSIZE")*100).."%");
        HealBot_Options_framesChanged(true)
        HealBot_Timers_Set("OOC","UpdateEnemyFrames")
    end
end

function HealBot_Options_ShowHeaders_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowHeaders_OnClick")
    if hbv_Skins_GetFrameBoolean("HeadBar", "SHOW", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "HeadBar", "SHOW", hb_lVars["Frame"])
        if hb_lVars["cSkin"] == Healbot_Config_Skins.Current_Skin then
            if hbv_Skins_GetFrameBoolean("HeadBar", "SHOW", hb_lVars["Frame"]) then
                hb_lVars["HeaderSwitchNumColsHdrOff"]=hbv_Skins_GetFrameVar("HealBar", "NUMCOLS", hb_lVars["Frame"])
                if hb_lVars["HeaderSwitchNumColsHdrOn"]>0 then
                    hbv_Skins_SetFrameVar(hb_lVars["HeaderSwitchNumColsHdrOn"], "HealBar", "NUMCOLS", hb_lVars["Frame"])
                else
                    hbv_Skins_SetFrameVar(HealBot_Panel_retHeadersCols(hb_lVars["Frame"]), "HealBar", "NUMCOLS", hb_lVars["Frame"])
                end
            else
                hb_lVars["HeaderSwitchNumColsHdrOn"]=hbv_Skins_GetFrameVar("HealBar", "NUMCOLS", hb_lVars["Frame"])
                if hb_lVars["HeaderSwitchNumColsHdrOff"]>0 then
                    hbv_Skins_SetFrameVar(hb_lVars["HeaderSwitchNumColsHdrOff"], "HealBar", "NUMCOLS", hb_lVars["Frame"])
                else
                    hbv_Skins_SetFrameVar(HealBot_Panel_retNoCols(hb_lVars["Frame"]), "HealBar", "NUMCOLS", hb_lVars["Frame"])
                end
            end
        end
        HealBot_Options_BarNumColsS:SetValue(hbv_Skins_GetFrameVar("HealBar", "NUMCOLS", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_BarNumColsS,HealBot_Options_SetNoColsText() .. ": " .. hbv_Skins_GetFrameVar("HealBar", "NUMCOLS", hb_lVars["Frame"]))
        HealBot_Options_framesChanged(true)
    end
end

function HealBot_Options_PlayBuffSound_OnClick(self)
      --HealBot_setCall("HealBot_Options_PlayBuffSound_OnClick")
    HealBot_Media_PlaySound(HealBot_Config_Buffs.SoundBuffPlay, HealBot_Config_Buffs.SoundBuffChan)
end

function HealBot_Options_PlaySound_OnClick(self)
      --HealBot_setCall("HealBot_Options_PlaySound_OnClick")
    HealBot_Media_PlaySound(HealBot_Config_Cures.SoundDebuffPlay, HealBot_Config_Cures.SoundDebuffChan)
end

function HealBot_Options_WarningSound_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_WarningSound_OnValueChanged")
    local g=nil
    local v=floor(self:GetValue()+0.5)
    if v~=self:GetValue() then
        self:SetValue(v)
    elseif HealBot_Config_Cures.SoundDebuffPlay~=HealBot_Media_SoundName(v) then
        HealBot_Config_Cures.SoundDebuffPlay=HealBot_Media_SoundName(v);
        g=_G[self:GetName().."Text"]
        g:SetText(self.text .. " ".. v..": " ..HealBot_Media_SoundName(v));
    end
end

function HealBot_Options_BuffWarningSound_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BuffWarningSound_OnValueChanged")
    local g=nil
    local v=floor(self:GetValue()+0.5)
    if v~=self:GetValue() then
        self:SetValue(v)
    elseif HealBot_Config_Buffs.SoundBuffPlay~=HealBot_Media_SoundName(v) then
        HealBot_Config_Buffs.SoundBuffPlay=HealBot_Media_SoundName(v);
        g=_G[self:GetName().."Text"]
        g:SetText(self.text .. " ".. v..": " ..HealBot_Media_SoundName(v));
    end
end

function HealBot_Options_BarTextureS_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BarTextureS_OnValueChanged")
    local g=nil
    local v=floor(self:GetValue()+0.5)
    if v~=self:GetValue() then
        self:SetValue(v)
    else
        if v > 0 then
            if hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"])~=HealBot_Media_TextureName(v) then
                hbv_Skins_SetFrameVar(HealBot_Media_TextureName(v), "HealBar", "TEXTURE", hb_lVars["Frame"])
                g=_G[self:GetName().."Text"]
                g:SetText(self.text .. " "..v..": " .. HealBot_Media_TextureName(v));
                HealBot_Media_UpdateUsedMedia("statusbar", hb_lVars["Frame"])
            end
        else
            g=_G[self:GetName().."Text"]
            g:SetText(self.text);
        end
    end
end

function HealBot_EmergBarTexture_OnValueChanged(self)
      --HealBot_setCall("HealBot_EmergBarTexture_OnValueChanged")
    local g=nil
    local v=floor(self:GetValue()+0.5)
    if v~=self:GetValue() then
        self:SetValue(v)
    else
        if v > 0 then
            if hbv_Skins_GetFrameVar("Emerg", "TEXTURE", hb_lVars["Frame"])~=HealBot_Media_TextureName(v) then
                hbv_Skins_SetFrameVar(HealBot_Media_TextureName(v), "Emerg", "TEXTURE", hb_lVars["Frame"])
                g=_G[self:GetName().."Text"]
                g:SetText(self.text .. " "..v..": " .. HealBot_Media_TextureName(v));
                HealBot_Media_UpdateUsedMedia("statusbar", hb_lVars["Frame"])
            end
        else
            g=_G[self:GetName().."Text"]
            g:SetText(self.text);
        end
    end
end

function HealBot_EmergBarHeight_OnValueChanged(self)
      --HealBot_setCall("HealBot_EmergBarHeight_OnValueChanged")
    local val=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2)
    if hbv_Skins_GetFrameVar("Emerg", "HEIGHT", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Emerg", "HEIGHT", hb_lVars["Frame"])
        HealBot_Options_framesChanged(true)
    end
end

function HealBot_EmergBarWidth_OnValueChanged(self)
      --HealBot_setCall("HealBot_EmergBarWidth_OnValueChanged")
    local val=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2)
    if hbv_Skins_GetFrameVar("Emerg", "WIDTH", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Emerg", "WIDTH", hb_lVars["Frame"])
        HealBot_Options_framesChanged(true)
    end
end

function HealBot_EmergBarEnabledOpacity_OnValueChanged(self)
      --HealBot_setCall("HealBot_EmergBarEnabledOpacity_OnValueChanged")
    local val=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2)
    if hbv_Skins_GetFrameVar("Emerg", "A", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Emerg", "A", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","UpdateEmergBars")
    end
end

function HealBot_EmergBarOOROpacity_OnValueChanged(self)
      --HealBot_setCall("HealBot_EmergBarOOROpacity_OnValueChanged")
    local val=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2)
    if hbv_Skins_GetFrameVar("Emerg", "OA", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Emerg", "OA", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","UpdateEmergBars")
    end
end

function HealBot_EmergBarDisabledOpacity_OnValueChanged(self)
      --HealBot_setCall("HealBot_EmergBarDisabledOpacity_OnValueChanged")
    local val=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2)
    if hbv_Skins_GetFrameVar("Emerg", "DA", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Emerg", "DA", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","UpdateEmergBars")
    end
end

function HealBot_EmergBarVOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_EmergBarVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Emerg", "VOFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Emerg", "VOFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true)
    end
end

function HealBot_EmergBarHOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_EmergBarHOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Emerg", "HOFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Emerg", "HOFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true)
    end
end

function HealBot_EmergInjTrig_OnValueChanged(self)
      --HealBot_setCall("HealBot_EmergInjTrig_OnValueChanged")
    local val=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2)
    if hbv_Skins_GetFrameVar("Emerg", "INJURED", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Emerg", "INJURED", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","UpdateEmergBars")
    end
end

function HealBot_EmergBarCritTrig_OnValueChanged(self)
      --HealBot_setCall("HealBot_EmergBarCritTrig_OnValueChanged")
    local val=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2)
    if hbv_Skins_GetFrameVar("Emerg", "CRITICAL", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Emerg", "CRITICAL", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","UpdateEmergBars")
    end
end

function HealBot_Options_FramePadding_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_FramePadding_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Frame", "PADDING", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Frame", "PADDING", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true)
    end
end

function HealBot_FrameStickyOffsetHorizontal_OnValueChanged(self)
      --HealBot_setCall("HealBot_FrameStickyOffsetHorizontal_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Frame", "SFOFFSETH", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Frame", "SFOFFSETH", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Timers_FramesSetPoint()
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_FrameStickyOffsetVertical_OnValueChanged(self)
      --HealBot_setCall("HealBot_FrameStickyOffsetVertical_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Frame", "SFOFFSETV", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Frame", "SFOFFSETV", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Timers_FramesSetPoint()
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_OverrideAfterCombatOOMValue_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_OverrideAfterCombatOOMValue_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif HealBot_Globals.OverrideChat["EOCOOMV"]~=val then
        HealBot_Globals.OverrideChat["EOCOOMV"]=val;
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val .. "%");
        HealBot_Timers_Set("CHAT","SetChat")
    end
end

function HealBot_Options_AfterCombatOOMValue_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AfterCombatOOMValue_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetVar("Chat", "EOCOOMV")~=val then
        hbv_Skins_SetVar(val, "Chat", "EOCOOMV")
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val .. "%");
        HealBot_Timers_Set("CHAT","SetChat")
    end
end

function HealBot_FrameScale_OnValueChanged(self)
      --HealBot_setCall("HealBot_FrameScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=HealBot_Util_Round(self:GetValue(), 1)
    val=val*2
    val=5*floor(val)
    val=val/10;
    if val ~= self:GetValue() then
        self:SetValue(val)
    else
        val=val/10
        if hbv_Skins_GetFrameVar("Frame", "SCALE", hb_lVars["Frame"])~=val then
            hbv_Skins_SetFrameVar(val, "Frame", "SCALE", hb_lVars["Frame"])
            local g=_G[self:GetName().."Text"]
            g:SetText(self.text .. ": " .. val);
            HealBot_Options_framesChanged(true, true, true, true, true)
            HealBot_Timers_Set("LAST","UpdateButtonGlow")
            HealBot_Timers_Set("LAST","UpdateIconGlow")
        end
    end
end

function HealBot_BarButtonMaxDebuffIcons_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonMaxDebuffIcons_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetIconVar("MAXDICONS", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])~=val then
        hbv_Skins_SetIconVar(val, "MAXDICONS", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
        HealBot_Timers_Set("AURA","CheckDebuffs")
        HealBot_Timers_Set("AURA","RemoveUnusedDebuffIcons")
    end
end

function HealBot_BarButtonDebuffIconVOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonDebuffIconVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetIconVar("DVOFFSET", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])~=val then
        hbv_Skins_SetIconVar(val, "DVOFFSET", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_BarButtonDebuffIconHOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonDebuffIconHOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetIconVar("DHOFFSET", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])~=val then
        hbv_Skins_SetIconVar(val, "DHOFFSET", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_BarButtonBuffIconVOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonBuffIconVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetIconVar("BVOFFSET", hb_lVars["Frame"], hb_lVars["BuffIconSet"])~=val then
        hbv_Skins_SetIconVar(val, "BVOFFSET", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_BarButtonBuffIconHOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonBuffIconHOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetIconVar("BHOFFSET", hb_lVars["Frame"], hb_lVars["BuffIconSet"])~=val then
        hbv_Skins_SetIconVar(val, "BHOFFSET", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_BarButtonMaxBuffIcons_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonMaxBuffIcons_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetIconVar("MAXBICONS", hb_lVars["Frame"], hb_lVars["BuffIconSet"])~=val then
        hbv_Skins_SetIconVar(val, "MAXBICONS", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
        HealBot_Timers_Set("AURA","CheckBuffs")
        HealBot_Timers_Set("AURA","RemoveUnusedBuffIcons")
    end
end

function HealBot_BarButtonIconSpacer_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconSpacer_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetIconVar("BICONSPACER", hb_lVars["Frame"], hb_lVars["BuffIconSet"])~=val then
        hbv_Skins_SetIconVar(val, "BICONSPACER", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_BarButtonDebuffIconSpacer_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonDebuffIconSpacer_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetIconVar("DICONSPACER", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])~=val then
        hbv_Skins_SetIconVar(val, "DICONSPACER", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_BarButtonIconScale_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=HealBot_Util_Round(self:GetValue(), 1)
    val=val/10;
    if hbv_Skins_GetIconVar("BSCALE", hb_lVars["Frame"], hb_lVars["BuffIconSet"])~=val then
        hbv_Skins_SetIconVar(val, "BSCALE", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
        HealBot_Timers_Set("AURA","UpdateAllBuffIcons")
    end
end

function HealBot_BarDebuffButtonIconScale_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarDebuffButtonIconScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=HealBot_Util_Round(self:GetValue(), 1)
    val=val/10;
    if hbv_Skins_GetIconVar("DSCALE", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])~=val then
        hbv_Skins_SetIconVar(val, "DSCALE", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
        HealBot_Timers_Set("AURA","UpdateAllDebuffIcons")
    end
end

function HealBot_BarButtonIconZoom_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=HealBot_Util_Round(self:GetValue(), 1)
    val=val/100;
    if hbv_Skins_GetIconVar("BZOOM", hb_lVars["Frame"], hb_lVars["BuffIconSet"])~=val then
        hbv_Skins_SetIconVar(val, "BZOOM", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. (val*200).."%");
        HealBot_Options_framesChanged(true, true)
        HealBot_Timers_Set("AURA","UpdateAllBuffIcons")
    end
end

function HealBot_BarButtonDebuffIconZoom_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=HealBot_Util_Round(self:GetValue(), 1)
    val=val/100;
    if hbv_Skins_GetIconVar("DZOOM", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])~=val then
        hbv_Skins_SetIconVar(val, "DZOOM", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. (val*200).."%");
        HealBot_Options_framesChanged(true, true)
        HealBot_Timers_Set("AURA","UpdateAllDebuffIcons")
    end
end

function HealBot_IconClassZoom_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=HealBot_Util_Round(self:GetValue(), 1)
    val=val/100;
    if hbv_Skins_GetFrameVar("Icons", "CLASSZOOM", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "CLASSZOOM", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. (val*200).."%");
        HealBot_Options_framesChanged(true, true)
        HealBot_Timers_Set("AURA","UpdateAllExtraIcons")
    end
end

function HealBot_IconRankZoom_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=HealBot_Util_Round(self:GetValue(), 1)
    val=val/100;
    if hbv_Skins_GetFrameVar("Icons", "RANKZOOM", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "RANKZOOM", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. (val*200).."%");
        HealBot_Options_framesChanged(true, true)
        HealBot_Timers_Set("AURA","UpdateAllExtraIcons")
    end
end

function HealBot_IconTargetZoom_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=HealBot_Util_Round(self:GetValue(), 1)
    val=val/100;
    if hbv_Skins_GetFrameVar("Icons", "TARGETZOOM", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "TARGETZOOM", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. (val*200).."%");
        HealBot_Options_framesChanged(true, true)
        HealBot_Timers_Set("AURA","UpdateAllExtraIcons")
    end
end

function HealBot_IconCombatZoom_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=HealBot_Util_Round(self:GetValue(), 1)
    val=val/100;
    if hbv_Skins_GetFrameVar("Icons", "COMBATZOOM", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "COMBATZOOM", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. (val*200).."%");
        HealBot_Options_framesChanged(true, true)
        HealBot_Timers_Set("AURA","UpdateAllExtraIcons")
    end
end

function HealBot_IconRCZoom_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=HealBot_Util_Round(self:GetValue(), 1)
    val=val/100;
    if hbv_Skins_GetFrameVar("Icons", "RCZOOM", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "RCZOOM", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. (val*200).."%");
        HealBot_Options_framesChanged(true, true)
        HealBot_Timers_Set("AURA","UpdateAllExtraIcons")
    end
end

function HealBot_IconOORZoom_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=HealBot_Util_Round(self:GetValue(), 1)
    val=val/100;
    if hbv_Skins_GetFrameVar("Icons", "OORZOOM", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "OORZOOM", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. (val*200).."%");
        HealBot_Options_framesChanged(true, true)
        HealBot_Timers_Set("AURA","UpdateAllExtraIcons")
    end
end

function HealBot_BarButtonIconFadeStartTime_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconFadeStartTime_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetIconVar("DFADESECS", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])~=val then
        hbv_Skins_SetIconVar(val, "DFADESECS", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val .. " " .. HEALBOT_WORDS_SEC);
    end
end

function HealBot_BarButtonIconBuffFadeStartTime_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconBuffFadeStartTime_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetIconVar("BUFFFADESECS", hb_lVars["Frame"], hb_lVars["BuffIconSet"])~=val then
        hbv_Skins_SetIconVar(val, "BUFFFADESECS", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val .. " " .. HEALBOT_WORDS_SEC);
    end
end

function HealBot_BarButtonIconTextScale_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconTextScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=floor(self:GetValue()+0.5)
    if hbv_Skins_GetIconTextVar("DBHEIGHT", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])~=val then
        hbv_Skins_SetIconTextVar(val, "DBHEIGHT", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_BarButtonIconBuffTextScale_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconBuffTextScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=floor(self:GetValue()+0.5)
    if hbv_Skins_GetIconTextVar("BUFFHEIGHT", hb_lVars["Frame"], hb_lVars["BuffIconSet"])~=val then
        hbv_Skins_SetIconTextVar(val, "BUFFHEIGHT", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_BarButtonIconTextDurationTime_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconTextDurationTime_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetIconTextVar("DBDURTHRH", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])~=val then
        hbv_Skins_SetIconTextVar(val, "DBDURTHRH", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. hbv_Skins_GetIconTextVar("DBDURTHRH", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]));
    end
end

function HealBot_BarButtonIconBuffTextDurationTime_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconBuffTextDurationTime_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetIconTextVar("BUFFDURTHRH", hb_lVars["Frame"], hb_lVars["BuffIconSet"])~=val then
        hbv_Skins_SetIconTextVar(val, "BUFFDURTHRH", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. hbv_Skins_GetIconTextVar("BUFFDURTHRH", hb_lVars["Frame"], hb_lVars["BuffIconSet"]));
    end
end

function HealBot_BarButtonIconTextDurationWarn_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconTextDurationWarn_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetIconTextVar("DBDURWARN", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])~=val then
        hbv_Skins_SetIconTextVar(val, "DBDURWARN", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. hbv_Skins_GetIconTextVar("DBDURWARN", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]));
    end
end

function HealBot_BarButtonIconBuffTextDurationWarn_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconBuffTextDurationWarn_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetIconTextVar("BUFFDURWARN", hb_lVars["Frame"], hb_lVars["BuffIconSet"])~=val then
        hbv_Skins_SetIconTextVar(val, "BUFFDURWARN", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. hbv_Skins_GetIconTextVar("BUFFDURWARN", hb_lVars["Frame"], hb_lVars["BuffIconSet"]));
    end
end

function HealBot_Options_HeadTextureS_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HeadTextureS_OnValueChanged")
    local g=nil
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        if val > 0 then
            if hbv_Skins_GetFrameVar("HeadBar", "TEXTURE", hb_lVars["Frame"])~=HealBot_Media_TextureName(val) then
                hbv_Skins_SetFrameVar(HealBot_Media_TextureName(val), "HeadBar", "TEXTURE", hb_lVars["Frame"])
                g=_G[self:GetName().."Text"]
                g:SetText(self.text .. " " .. val..": " .. HealBot_Media_TextureName(val));
                HealBot_Media_UpdateUsedMedia("statusbar", hb_lVars["Frame"])
            end
        else
            g=_G[self:GetName().."Text"]
            g:SetText(self.text);
        end
    end
end

function HealBot_Options_SkinFrameAliasTextureS_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_SkinFrameAliasTextureS_OnValueChanged")
    local g=nil
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        if val>0 then
            if hbv_Skins_GetFrameVar("FrameAliasBar", "TEXTURE", hb_lVars["Frame"])~=HealBot_Media_TextureName(val) then
                hbv_Skins_SetFrameVar(HealBot_Media_TextureName(val), "FrameAliasBar", "TEXTURE", hb_lVars["Frame"])
                g=_G[self:GetName().."Text"]
                g:SetText(self.text .. " " .. val..": " .. HealBot_Media_TextureName(val));
                HealBot_Action_setFrameHeader(hb_lVars["Frame"])
            end
        else
            g=_G[self:GetName().."Text"]
            g:SetText(self.text);
        end
    end
end

function HealBot_Options_HeadFontNameS_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HeadFontNameS_OnValueChanged")
    local g=nil
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("HeadText", "FONT", hb_lVars["Frame"])~=HealBot_Media_FontName(val) then
        hbv_Skins_SetFrameVar(HealBot_Media_FontName(val), "HeadText", "FONT", hb_lVars["Frame"])
        g=_G[self:GetName().."Text"]
        g:SetText(self.text .. " ".. val..": " ..HealBot_Media_FontName(val));
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
    end
end

function HealBot_Options_ActionIconsFontName_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsFontName_OnValueChanged")
    local g=nil
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        if hbv_ActionIcons_GetVars("FONT", hb_lVars["Frame"])~=HealBot_Media_FontName(val) then
            hbv_ActionIcons_SetVars(HealBot_Media_FontName(val), "FONT", hb_lVars["Frame"])
            HealBot_Timers_Set("SKINS","ActionIconsSetFontChange")
        end
        g=_G[self:GetName().."Text"]
        g:SetText(self.text .. " ".. val..": " ..HealBot_Media_FontName(val));
    end
end

function HealBot_Options_ActionIconsFontCountName_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsFontCountName_OnValueChanged")
    local g=nil
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        if hbv_ActionIcons_GetVars("FONTCOUNT", hb_lVars["Frame"])~=HealBot_Media_FontName(val) then
            hbv_ActionIcons_SetVars(HealBot_Media_FontName(val), "FONTCOUNT", hb_lVars["Frame"])
            HealBot_Timers_Set("SKINS","ActionIconsSetFontChange")
        end
        g=_G[self:GetName().."Text"]
        g:SetText(self.text .. " ".. val..": " ..HealBot_Media_FontName(val));
    end
end

function HealBot_Options_ActionIconsFontHeight_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsFontHeight_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        if hbv_ActionIcons_GetVars("FONTSIZE", hb_lVars["Frame"])~=val then
            hbv_ActionIcons_SetVars(val, "FONTSIZE", hb_lVars["Frame"])
            HealBot_Timers_Set("SKINS","ActionIconsSetFontChange")
        end
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
    end
end

function HealBot_Options_ActionIconsFontCountHeight_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsFontCountHeight_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        if hbv_ActionIcons_GetVars("FONTCOUNTSIZE", hb_lVars["Frame"])~=val then
            hbv_ActionIcons_SetVars(val, "FONTCOUNTSIZE", hb_lVars["Frame"])
            HealBot_Timers_Set("SKINS","ActionIconsSetFontChange")
        end
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
    end
end

function HealBot_Options_ActionIconsFontVOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsFontVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        if hbv_ActionIcons_GetVars("FONTVOFFSET", hb_lVars["Frame"])~=val then
            hbv_ActionIcons_SetVars(val, "FONTVOFFSET", hb_lVars["Frame"])
            HealBot_Timers_Set("SKINS","ActionIconsSetFontChange")
        end
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
    end
end

function HealBot_Options_ActionIconsFontCountVOffset_OnValueChanged(self)
    local val=floor(self:GetValue()+0.5)
      --HealBot_setCall("HealBot_Options_ActionIconsFontCountVOffset_OnValueChanged")
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        if hbv_ActionIcons_GetVars("FONTCOUNTVOFFSET", hb_lVars["Frame"])~=val then
            hbv_ActionIcons_SetVars(val, "FONTCOUNTVOFFSET", hb_lVars["Frame"])
            HealBot_Timers_Set("SKINS","ActionIconsSetFontChange")
        end
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
    end
end

function HealBot_Options_ActionIconsFontHOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsFontHOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        if hbv_ActionIcons_GetVars("FONTHOFFSET", hb_lVars["Frame"])~=val then
            hbv_ActionIcons_SetVars(val, "FONTHOFFSET", hb_lVars["Frame"])
            HealBot_Timers_Set("SKINS","ActionIconsSetFontChange")
        end
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
    end
end

function HealBot_Options_ActionIconsFontCountHOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsFontCountHOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        if hbv_ActionIcons_GetVars("FONTCOUNTHOFFSET", hb_lVars["Frame"])~=val then
            hbv_ActionIcons_SetVars(val, "FONTCOUNTHOFFSET", hb_lVars["Frame"])
            HealBot_Timers_Set("SKINS","ActionIconsSetFontChange")
        end
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
    end
end

function HealBot_Options_ActionIconsTextOutLine_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsTextOutLine_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        if hbv_ActionIcons_GetVars("FONTOUTLINE", hb_lVars["Frame"])~=val then
            hbv_ActionIcons_SetVars(val, "FONTOUTLINE", hb_lVars["Frame"])
            HealBot_Timers_Set("SKINS","ActionIconsSetFontChange")
        end
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. HealBot_Options_FontOutline_List[val]);
    end
end

function HealBot_Options_ActionIconsTextCountOutLine_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsTextCountOutLine_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        if hbv_ActionIcons_GetVars("FONTCOUNTOUTLINE", hb_lVars["Frame"])~=val then
            hbv_ActionIcons_SetVars(val, "FONTCOUNTOUTLINE", hb_lVars["Frame"])
            HealBot_Timers_Set("SKINS","ActionIconsSetFontChange")
        end
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. HealBot_Options_FontOutline_List[val]);
    end
end

function HealBot_BarButtonIconFont_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconFont_OnValueChanged")
    local g=nil
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetIconTextVar("DBFONT", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])~=HealBot_Media_FontName(val) then
        hbv_Skins_SetIconTextVar(HealBot_Media_FontName(val), "DBFONT", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
        g=_G[self:GetName().."Text"]
        g:SetText(self.text .. " ".. val..": " ..HealBot_Media_FontName(val));
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
        HealBot_Options_framesChanged(true, true)
        HealBot_Timers_Set("SKINS","SetSkinText")
    end
end

function HealBot_BarButtonIconBuffFont_OnValueChanged(self)
      --HealBot_setCall("HealBot_BarButtonIconBuffFont_OnValueChanged")
    local g=nil
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetIconTextVar("BUFFFONT", hb_lVars["Frame"], hb_lVars["BuffIconSet"])~=HealBot_Media_FontName(val) then
        hbv_Skins_SetIconTextVar(HealBot_Media_FontName(val), "BUFFFONT", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
        g=_G[self:GetName().."Text"]
        g:SetText(self.text .. " ".. val..": " ..HealBot_Media_FontName(val));
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
        HealBot_Options_framesChanged(true, true)
        HealBot_Timers_Set("SKINS","SetSkinText")
    end
end

function HealBot_Options_AliasFontName_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AliasFontName_OnValueChanged")
    local g=nil
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("FrameAlias", "FONT", hb_lVars["Frame"])~=HealBot_Media_FontName(val) then
        hbv_Skins_SetFrameVar(HealBot_Media_FontName(val), "FrameAlias", "FONT", hb_lVars["Frame"])
        g=_G[self:GetName().."Text"]
        g:SetText(self.text .. " ".. val..": " ..HealBot_Media_FontName(val));
        HealBot_Action_SetAliasFontSize(hb_lVars["Frame"])
        --HealBot_Timers_Set("SKINS","FrameAliases")
        --HealBot_Timers_Set("SKINS","SetSkinText",true)
    end
end

function HealBot_Options_HeadFontHeightS_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HeadFontHeightS_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("HeadText", "HEIGHT", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "HeadText", "HEIGHT", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
    end
end

function HealBot_Options_HeadFontOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HeadFontOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("HeadText", "OFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "HeadText", "OFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, false, true)
        HealBot_Timers_Set("SKINS","SetSkinText")
    end
end

function HealBot_Options_SkinFrameAliasHeightS_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_SkinFrameAliasHeightS_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("FrameAliasBar", "HEIGHT", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "FrameAliasBar", "HEIGHT", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Timers_Set("SKINS","FrameAliases")
        HealBot_Options_framesChanged(true)
    end
end

function HealBot_Options_SkinFrameAliasOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_SkinFrameAliasOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("FrameAliasBar", "OFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "FrameAliasBar", "OFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Timers_Set("SKINS","FrameAliases")
        HealBot_Options_framesChanged(true)
    end
end

function HealBot_Options_SkinFrameAliasWidthS_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_SkinFrameAliasWidthS_OnValueChanged")
    local val=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2)
    if hbv_Skins_GetFrameVar("FrameAliasBar", "WIDTH", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "FrameAliasBar", "WIDTH", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","FrameAliases")
        HealBot_Options_framesChanged(true)
    end
end

function HealBot_Options_AliasFontHeight_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AliasFontHeight_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("FrameAlias", "SIZE", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "FrameAlias", "SIZE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Timers_Set("SKINS","FrameAliases")
    end
end

function HealBot_Options_AliasFontOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AliasFontOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("FrameAlias", "OFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "FrameAlias", "OFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Timers_Set("SKINS","FrameAliases")
    end
end

function HealBot_Options_BarHeightS_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BarHeightS_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("HealBar", "HEIGHT", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "HealBar", "HEIGHT", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
        HealBot_Timers_Set("LAST","UpdateButtonGlow",true)
    end
end

function HealBot_Options_BarWidthS_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BarWidthS_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("HealBar", "WIDTH", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "HealBar", "WIDTH", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Panel_SkinResetFrame(hb_lVars["Frame"])
        HealBot_Options_framesChanged(true, false, false, true, true)
        HealBot_Text_setTextLen(hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","TextUpdateNames")
        HealBot_Timers_Set("SKINS","TextUpdateHealth")
        HealBot_Timers_Set("LAST","UpdateButtonGlow",true)
    end
end

function HealBot_Options_BarNumColsS_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BarNumColsS_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("HealBar", "NUMCOLS", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "HealBar", "NUMCOLS", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(HealBot_Options_SetNoColsText() .. ": " .. val);
        HealBot_Options_framesChanged(true)
    end
end

function HealBot_Options_BarBRSpaceS_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BarBRSpaceS_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("HealBar", "RMARGIN", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "HealBar", "RMARGIN", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true)
    end
end

function HealBot_Options_BarBCSpaceS_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BarBCSpaceS_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("HealBar", "CMARGIN", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "HealBar", "CMARGIN", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true)
    end
end

function HealBot_Options_FontName_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_FontName_OnValueChanged")
    local g=nil
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "FONT", hb_lVars["Frame"])~=HealBot_Media_FontName(val) then
        hbv_Skins_SetFrameVar(HealBot_Media_FontName(val), "BarText", "FONT", hb_lVars["Frame"])
        g=_G[self:GetName().."Text"]
        g:SetText(self.text .. " ".. val..": " ..HealBot_Media_FontName(val));
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
    end
end

function HealBot_Options_StateFontName_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_StateFontName_OnValueChanged")
    local g=nil
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "SFONT", hb_lVars["Frame"])~=HealBot_Media_FontName(val) then
        hbv_Skins_SetFrameVar(HealBot_Media_FontName(val), "BarText", "SFONT", hb_lVars["Frame"])
        g=_G[self:GetName().."Text"]
        g:SetText(self.text .. " ".. val..": " ..HealBot_Media_FontName(val));
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
    end
end

function HealBot_Options_AuxFontName_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AuxFontName_OnValueChanged")
    local g=nil
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Aux_GetBarTextVar("FONT", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])~=HealBot_Media_FontName(val) then
        hbv_Aux_SetBarTextVar(HealBot_Media_FontName(val), "FONT", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])
        g=_G[self:GetName().."Text"]
        g:SetText(self.text .. " ".. val..": " ..HealBot_Media_FontName(val));
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
    end
end

function HealBot_Options_HealthFontName_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HealthFontName_OnValueChanged")
    local g=nil
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "HFONT", hb_lVars["Frame"])~=HealBot_Media_FontName(val) then
        hbv_Skins_SetFrameVar(HealBot_Media_FontName(val), "BarText", "HFONT", hb_lVars["Frame"])
        g=_G[self:GetName().."Text"]
        g:SetText(self.text .. " ".. val..": " ..HealBot_Media_FontName(val));
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
    end
end

function HealBot_Options_TooltipHeaderFont_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_TooltipHeaderFont_OnValueChanged")
    local g=nil
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif HealBot_Globals.Tooltip_HeaderFont~=HealBot_Media_FontName(val) then
        HealBot_Globals.Tooltip_HeaderFont=HealBot_Media_FontName(val);
        g=_G[self:GetName().."Text"]
        g:SetText(self.text .. " ".. val..": " ..HealBot_Media_FontName(val));
        HealBot_Timers_Set("LAST","LoadTips")
    end
end

function HealBot_Options_TooltipDetailFont_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_TooltipDetailFont_OnValueChanged")
    local g=nil
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif HealBot_Globals.Tooltip_DetailFont~=HealBot_Media_FontName(val) then
        HealBot_Globals.Tooltip_DetailFont=HealBot_Media_FontName(val);
        g=_G[self:GetName().."Text"]
        g:SetText(self.text .. " ".. val..": " ..HealBot_Media_FontName(val));
        HealBot_Timers_Set("LAST","LoadTips")
    end
end

function HealBot_Options_AggroFontName_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AggroFontName_OnValueChanged")
    local g=nil
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "AFONT", hb_lVars["Frame"])~=HealBot_Media_FontName(val) then
        hbv_Skins_SetFrameVar(HealBot_Media_FontName(val), "BarText", "AFONT", hb_lVars["Frame"])
        g=_G[self:GetName().."Text"]
        g:SetText(self.text .. " ".. val..": " ..HealBot_Media_FontName(val));
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
    end
end

function HealBot_Options_FontOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_FontOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "OFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "BarText", "OFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, false, true)
    end
end

function HealBot_Options_StateFontOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_StateFontOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "SOFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "BarText", "SOFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, false, true)
    end
end

function HealBot_Options_AuxFontOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AuxFontOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Aux_GetBarTextVar("OFFSET", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])~=val then
        hbv_Aux_SetBarTextVar(val, "OFFSET", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, false, true)
    end
end

function HealBot_Options_AuxFontHOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AuxFontHOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Aux_GetBarTextVar("HOFFSET", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]) ~= val then
        hbv_Aux_SetBarTextVar(val, "HOFFSET", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, false, true)
    end
end

function HealBot_Options_HealthFontOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HealthFontOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "HOFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "BarText", "HOFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, false, true)
    end
end

function HealBot_Options_AggroFontOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AggroFontOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "AOFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "BarText", "AOFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, false, true)
    end
end

function HealBot_Options_FontHeight_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_FontHeight_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "HEIGHT", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "BarText", "HEIGHT", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
    end
end

function HealBot_Options_StateFontHeight_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_StateFontHeight_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "SHEIGHT", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "BarText", "SHEIGHT", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
    end
end

function HealBot_Options_AuxFontHeight_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AuxFontHeight_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Aux_GetBarTextVar("HEIGHT", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])~=val then
        hbv_Aux_SetBarTextVar(val, "HEIGHT", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
    end
end

function HealBot_Options_HealthFontHeight_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HealthFontHeight_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "HHEIGHT", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "BarText", "HHEIGHT", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
    end
end

function HealBot_Options_AggroFontHeight_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AggroFontHeight_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "AHEIGHT", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "BarText", "AHEIGHT", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
    end
end

local HealBot_Alignment={ [1]=HEALBOT_OPTIONS_BUTTONLEFT, [2]=HEALBOT_OPTIONS_BUTTONMIDDLE, [3]=HEALBOT_OPTIONS_BUTTONRIGHT }

function HealBot_Options_NameTextHorOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_NameTextHorOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "OFFSET2", hb_lVars["Frame"]) ~= val then
        hbv_Skins_SetFrameVar(val, "BarText", "OFFSET2", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, false, true)
        HealBot_Timers_Set("SKINS","SetSkinText")
    end
end

function HealBot_Options_HealthTextHorOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HealthTextHorOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "HOFFSET2", hb_lVars["Frame"]) ~= val then
        hbv_Skins_SetFrameVar(val, "BarText", "HOFFSET2", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, false, true)
        HealBot_Timers_Set("SKINS","SetSkinText")
    end
end

function HealBot_Options_AggroTextHorOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AggroTextHorOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "AOFFSET2", hb_lVars["Frame"]) ~= val then
        hbv_Skins_SetFrameVar(val, "BarText", "AOFFSET2", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, false, true)
        HealBot_Timers_Set("SKINS","SetSkinText")
    end
end

function HealBot_Options_StateTextHorOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_StateTextHorOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "SOFFSET2", hb_lVars["Frame"]) ~= val then
        hbv_Skins_SetFrameVar(val, "BarText", "SOFFSET2", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, false, true)
        HealBot_Timers_Set("SKINS","SetSkinText")
    end
end

function HealBot_Options_TextOutLine_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_TextOutLine_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "OUTLINE", hb_lVars["Frame"]) ~= val then
        hbv_Skins_SetFrameVar(val, "BarText", "OUTLINE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " ..HealBot_Options_FontOutline_List[hbv_Skins_GetFrameVar("BarText", "OUTLINE", hb_lVars["Frame"])]);
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
    end
end

function HealBot_Options_StateTextOutLine_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_StateTextOutLine_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "SOUTLINE", hb_lVars["Frame"]) ~= val then
        hbv_Skins_SetFrameVar(val, "BarText", "SOUTLINE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " ..HealBot_Options_FontOutline_List[hbv_Skins_GetFrameVar("BarText", "SOUTLINE", hb_lVars["Frame"])]);
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
    end
end

function HealBot_Options_AuxTextOutLine_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AuxTextOutLine_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Aux_GetBarTextVar("OUTLINE", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]) ~= val then
        hbv_Aux_SetBarTextVar(val, "OUTLINE", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " ..HealBot_Options_FontOutline_List[hbv_Aux_GetBarTextVar("OUTLINE", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])]);
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
    end
end

function HealBot_Options_HealthTextOutLine_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HealthTextOutLine_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "HOUTLINE", hb_lVars["Frame"]) ~= val then
        hbv_Skins_SetFrameVar(val, "BarText", "HOUTLINE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " ..HealBot_Options_FontOutline_List[hbv_Skins_GetFrameVar("BarText", "HOUTLINE", hb_lVars["Frame"])]);
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
    end
end

function HealBot_Options_AggroTextOutLine_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AggroTextOutLine_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "AOUTLINE", hb_lVars["Frame"]) ~= val then
        hbv_Skins_SetFrameVar(val, "BarText", "AOUTLINE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " ..HealBot_Options_FontOutline_List[hbv_Skins_GetFrameVar("BarText", "AOUTLINE", hb_lVars["Frame"])]);
        HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
    end
end

function HealBot_Options_MaxChars_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_MaxChars_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "MAXCHARS", hb_lVars["Frame"]) ~= val then
        local g=_G[self:GetName().."Text"]
        if val == 0 then
            g:SetText(self.text .. ": "..HEALBOT_WORD_AUTO)
        else
            g:SetText(self.text .. ": ".. val)
        end
        hbv_Skins_SetFrameVar(val, "BarText", "MAXCHARS", hb_lVars["Frame"])
        HealBot_Text_setTextLen(hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","TextUpdateNames")
    end
end

function HealBot_Options_AuxMaxChars_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AuxMaxChars_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Aux_GetBarTextVar("MAXCHARS", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]) ~= val then
        local g=_G[self:GetName().."Text"]
        if val == 0 then
            g:SetText(self.text .. ": "..HEALBOT_WORD_AUTO)
        else
            g:SetText(self.text .. ": ".. val)
        end
        hbv_Aux_SetBarTextVar(val, "MAXCHARS", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])
        HealBot_Text_setTextLen(hb_lVars["Frame"])
        HealBot_Options_framesChanged(false, false, false, true)
        HealBot_Timers_Set("SKINS","SetSkinText")
        HealBot_Timers_Set("AUX","UpdateAllAuxByType",true)
    end
end

function HealBot_Options_HealthMaxChars_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HealthMaxChars_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarText", "HMAXCHARS", hb_lVars["Frame"]) ~= val then
        local g=_G[self:GetName().."Text"]
        if val == 0 then
            g:SetText(self.text .. ": "..HEALBOT_WORD_AUTO)
        else
            g:SetText(self.text .. ": ".. val)
        end
        hbv_Skins_SetFrameVar(val, "BarText", "HMAXCHARS", hb_lVars["Frame"])
        HealBot_Text_setTextLen(hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","TextUpdateHealth")
    end
end

function HealBot_Options_ActionAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionAlpha_OnValueChanged")
    hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "Frame", "BACKA", hb_lVars["Frame"])
end

function HealBot_Options_BarAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BarAlpha_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarCol", "HA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarCol", "HA", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","SkinsFormat")
    end
end

function HealBot_Options_HeadWidthS_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HeadWidthS_OnValueChanged")
    if hbv_Skins_GetFrameVar("HeadBar", "WIDTH", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "HeadBar", "WIDTH", hb_lVars["Frame"])
        HealBot_Options_framesChanged(true)
    end
end

function HealBot_Options_HeadHightS_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HeadHightS_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("HeadBar", "HEIGHT", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "HeadBar", "HEIGHT", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true)
    end
end

function HealBot_Options_BarAlphaInHeal_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BarAlphaInHeal_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarIACol", "IA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarIACol", "IA", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","SkinsFormat")
    end
end

function HealBot_Options_BarAlphaAbsorb_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BarAlphaAbsorb_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarIACol", "AA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarIACol", "AA", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","SkinsFormat")
    end
end

function HealBot_Options_BarAlphaBackGround_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BarAlphaBackGround_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarCol", "BA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarCol", "BA", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","SkinsFormat")
        HealBot_Timers_Set("SKINS","UpdateBackground")
        HealBot_Timers_Set("SKINS","ZeroHiddenButtons")
    end
end

function HealBot_Options_BarAlphaBorder_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BarAlphaBorder_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarCol", "BORA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarCol", "BORA", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","SkinsFormat")
        HealBot_Timers_Set("SKINS","UpdateBackground")
    end
end

function HealBot_Options_NameTextAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_NameTextAlpha_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarTextCol", "NCA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "NCA", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    end
end

function HealBot_Options_StateTextAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_StateTextAlpha_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarTextCol", "SCA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "SCA", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    end
end

function HealBot_Options_AuxTextAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AuxTextAlpha_OnValueChanged")
    if hbv_Aux_GetBarTextVar("COLA", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Aux_SetBarTextVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "COLA", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_Timers_Set("AUX","ResetTextButtons")
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_AuxTextDisAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AuxTextDisAlpha_OnValueChanged")
    if hbv_Aux_GetBarTextVar("COLDA", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Aux_SetBarTextVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "COLDA", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_Timers_Set("AUX","ResetTextButtons")
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_AuxTextOORAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AuxTextOORAlpha_OnValueChanged")
    if hbv_Aux_GetBarTextVar("COLOA", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Aux_SetBarTextVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "COLOA", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_Timers_Set("AUX","ResetTextButtons")
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_HealthTextAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HealthTextAlpha_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarTextCol", "HCA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "HCA", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    end
end

function HealBot_Options_AggroTextAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AggroTextAlpha_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarTextCol", "ACA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "ACA", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    end
end

function HealBot_Options_NameTextDisAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_NameTextDisAlpha_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarTextCol", "NCDA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "NCDA", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    end
end

function HealBot_Options_NameTextOORAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_NameTextOORAlpha_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarTextCol", "NCOA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "NCOA", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    end
end

function HealBot_Options_StateTextDisAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_StateTextDisAlpha_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarTextCol", "SCDA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "SCDA", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    end
end

function HealBot_Options_StateTextOORAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_StateTextOORAlpha_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarTextCol", "SCOA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "SCOA", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    end
end

function HealBot_Options_HealthTextDisAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HealthTextDisAlpha_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarTextCol", "HCDA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "HCDA", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    end
end

function HealBot_Options_HealthTextOORAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HealthTextOORAlpha_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarTextCol", "HCOA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "HCOA", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    end
end

function HealBot_Options_AggroTextDisAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AggroTextDisAlpha_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarTextCol", "ACDA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "ACDA", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    end
end

function HealBot_Options_AggroTextOORAlpha_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AggroTextOORAlpha_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarTextCol", "ACOA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "ACOA", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    end
end

function HealBot_Options_NameTextColourDebuff_OnClick(self)
      --HealBot_setCall("HealBot_Options_NameTextColourDebuff_OnClick")
    if hbv_Skins_GetFrameBoolean("BarTextCol", "NDEBUFF", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarTextCol", "NDEBUFF", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    end
end

function HealBot_Options_HealthTextColourDebuff_OnClick(self)
      --HealBot_setCall("HealBot_Options_HealthTextColourDebuff_OnClick")
    if hbv_Skins_GetFrameBoolean("BarTextCol", "HDEBUFF", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarTextCol", "HDEBUFF", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    end
end

function HealBot_Options_BarOutlineBackGround_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BarOutlineBackGround_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarCol", "BOUT", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "BarCol", "BOUT", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Panel_SkinResetFrame(hb_lVars["Frame"])
        HealBot_Options_framesChanged(true)
        HealBot_Timers_Set("OOC","UpdateEnemyFrames")
    end
end

function HealBot_Options_BarSizeBorder_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BarSizeBorder_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("BarCol", "BORSIZE", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "BarCol", "BORSIZE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true)
    end
end

function HealBot_Options_BarAlphaDis_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BarAlphaDis_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarCol", "DISA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarCol", "DISA", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","SkinsFormat")
        HealBot_Timers_Set("AURA","UpdateAllIcons")
    end
end

function HealBot_Options_BarAlphaEor_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BarAlphaEor_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarCol", "ORA", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarCol", "ORA", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","SkinsFormat")
    end
end

function HealBot_Options_TipMaxButtons_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_TipMaxButtons_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        HealBot_Globals.Tooltip_MaxButtons=val;
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
    end
end

function HealBot_Options_TooltipHeaderFontSize_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_TooltipHeaderFontSize_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        HealBot_Globals.Tooltip_HeaderFontSize=val;
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val)
        HealBot_Timers_Set("LAST","LoadTips")
    end
end

function HealBot_Options_TooltipDetailFontSize_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_TooltipDetailFontSize_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        HealBot_Globals.Tooltip_DetailFontSize=val;
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val)
        HealBot_Timers_Set("LAST","LoadTips")
    end
end

function HealBot_Options_Tooltip_ShowCustomAnchor(self)
      --HealBot_setCall("HealBot_Options_Tooltip_ShowCustomAnchor")
    if HealBot_Data["TIPUSE"] then
        HealBot_Tooltip_ShowCustomAnchor()
    end
end

function HealBot_Options_ClassColours()
      --HealBot_setCall("HealBot_Options_ClassColours")
    StaticPopupDialogs["HEALBOT_OPTIONS_CLASSCOL"]={
        text=HEALBOT_OPTIONS_WARN_CLASSCOL,
        button1=CLOSE,
        timeout=0,
        whileDead=1,
        hideOnEscape=1
    };
    StaticPopup_Show("HEALBOT_OPTIONS_CLASSCOL");
end

local HealBot_ColourObjWaiting, HealBot_ColourObjWaitingExtra=nil,nil
function HealBot_OverrideColorpick_OnClick(SkinType)
      --HealBot_setCall("HealBot_OverrideColorpick_OnClick")
    HealBot_ColourObjWaiting=SkinType;

    if SkinType == "OverrideRoleTank" then
        HealBot_UseColourPick(hbv_Skins_GetRoleCol("TANK", 2))
    elseif SkinType == "OverrideRoleHeal" then
        HealBot_UseColourPick(hbv_Skins_GetRoleCol("HEALER", 2))
    elseif SkinType == "OverrideRoleDPS" then
        HealBot_UseColourPick(hbv_Skins_GetRoleCol("DAMAGER", 2))
    elseif SkinType == "OverridePowerAstral" then
        HealBot_UseColourPick(hbv_Skins_GetPowerCol("LUNAR_POWER", 2))
    elseif SkinType == "OverridePowerEnergy" then
        HealBot_UseColourPick(hbv_Skins_GetPowerCol("ENERGY", 2))
    elseif SkinType == "OverridePowerFocus" then
        HealBot_UseColourPick(hbv_Skins_GetPowerCol("FOCUS", 2))
    elseif SkinType == "OverridePowerFury" then
        HealBot_UseColourPick(hbv_Skins_GetPowerCol("FURY", 2))
    elseif SkinType == "OverridePowerMana" then
        HealBot_UseColourPick(hbv_Skins_GetPowerCol("MANA", 2))
    elseif SkinType == "OverridePowerRage" then
        HealBot_UseColourPick(hbv_Skins_GetPowerCol("RAGE", 2))
    elseif SkinType == "OverridePowerRunic" then
        HealBot_UseColourPick(hbv_Skins_GetPowerCol("RUNIC_POWER", 2))
    elseif SkinType == "OverrideClassDeathKnight" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("DEAT", 2))
    elseif SkinType == "OverrideClassDemonHunter" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("DEMO", 2))
    elseif SkinType == "OverrideClassDruid" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("DRUI", 2))
    elseif SkinType == "OverrideClassEvoker" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("EVOK", 2))
    elseif SkinType == "OverrideClassHunter" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("HUNT", 2))
    elseif SkinType == "OverrideClassMage" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("MAGE", 2))
    elseif SkinType == "OverrideClassMonk" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("MONK", 2))
    elseif SkinType == "OverrideClassPaladin" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("PALA", 2))
    elseif SkinType == "OverrideClassPriest" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("PRIE", 2))
    elseif SkinType == "OverrideClassRogue" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("ROGU", 2))
    elseif SkinType == "OverrideClassShaman" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("SHAM", 2))
    elseif SkinType == "OverrideClassWarlock" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("WARL", 2))
    elseif SkinType == "OverrideClassWarrior" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("WARR", 2))
    elseif SkinType == "OverrideAdaptiveRecentHeals" then
        HealBot_UseColourPick(HealBot_Globals.OverrideAdaptiveCol["RecentHeals"].R,
                              HealBot_Globals.OverrideAdaptiveCol["RecentHeals"].G,
                              HealBot_Globals.OverrideAdaptiveCol["RecentHeals"].B)
    elseif SkinType == "OverrideAdaptiveThreat" then
        HealBot_UseColourPick(HealBot_Globals.OverrideAdaptiveCol["Threat"].R,
                              HealBot_Globals.OverrideAdaptiveCol["Threat"].G,
                              HealBot_Globals.OverrideAdaptiveCol["Threat"].B)
    elseif SkinType == "OverrideAdaptiveAggro" then
        HealBot_UseColourPick(HealBot_Globals.OverrideAdaptiveCol["Aggro"].R,
                              HealBot_Globals.OverrideAdaptiveCol["Aggro"].G,
                              HealBot_Globals.OverrideAdaptiveCol["Aggro"].B)
    elseif SkinType == "OverrideAdaptiveHighlight" then
        HealBot_UseColourPick(HealBot_Globals.OverrideAdaptiveCol["Highlight"].R,
                              HealBot_Globals.OverrideAdaptiveCol["Highlight"].G,
                              HealBot_Globals.OverrideAdaptiveCol["Highlight"].B)
    elseif SkinType == "OverrideAdaptiveTarget" then
        HealBot_UseColourPick(HealBot_Globals.OverrideAdaptiveCol["Target"].R,
                              HealBot_Globals.OverrideAdaptiveCol["Target"].G,
                              HealBot_Globals.OverrideAdaptiveCol["Target"].B)
    elseif SkinType == "OverrideAdaptiveOOR" then
        HealBot_UseColourPick(HealBot_Globals.OverrideAdaptiveCol["OOR"].R,
                              HealBot_Globals.OverrideAdaptiveCol["OOR"].G,
                              HealBot_Globals.OverrideAdaptiveCol["OOR"].B)
    elseif SkinType == "OverrideAdaptiveOverheals" then
        HealBot_UseColourPick(HealBot_Globals.OverrideAdaptiveCol["Overheals"].R,
                              HealBot_Globals.OverrideAdaptiveCol["Overheals"].G,
                              HealBot_Globals.OverrideAdaptiveCol["Overheals"].B)
    elseif SkinType == "OverrideAdaptiveAbsorbs" then
        HealBot_UseColourPick(HealBot_Globals.OverrideAdaptiveCol["Absorbs"].R,
                              HealBot_Globals.OverrideAdaptiveCol["Absorbs"].G,
                              HealBot_Globals.OverrideAdaptiveCol["Absorbs"].B)
    elseif SkinType == "SkinAdaptiveRecentHeals" then
        HealBot_UseColourPick(hbv_Skins_GetColVar("AdaptiveCol", "RecentHeals", "R"),
                              hbv_Skins_GetColVar("AdaptiveCol", "RecentHeals", "G"),
                              hbv_Skins_GetColVar("AdaptiveCol", "RecentHeals", "B"))
    elseif SkinType == "SkinAdaptiveThreat" then
        HealBot_UseColourPick(hbv_Skins_GetColVar("AdaptiveCol", "Threat", "R"),
                              hbv_Skins_GetColVar("AdaptiveCol", "Threat", "G"),
                              hbv_Skins_GetColVar("AdaptiveCol", "Threat", "B"))
    elseif SkinType == "SkinAdaptiveAggro" then
        HealBot_UseColourPick(hbv_Skins_GetColVar("AdaptiveCol", "Aggro", "R"),
                              hbv_Skins_GetColVar("AdaptiveCol", "Aggro", "G"),
                              hbv_Skins_GetColVar("AdaptiveCol", "Aggro", "B"))
    elseif SkinType == "SkinAdaptiveHighlight" then
        HealBot_UseColourPick(hbv_Skins_GetColVar("AdaptiveCol", "Highlight", "R"),
                              hbv_Skins_GetColVar("AdaptiveCol", "Highlight", "G"),
                              hbv_Skins_GetColVar("AdaptiveCol", "Highlight", "B"))
    elseif SkinType == "SkinAdaptiveTarget" then
        HealBot_UseColourPick(hbv_Skins_GetColVar("AdaptiveCol", "Target", "R"),
                              hbv_Skins_GetColVar("AdaptiveCol", "Target", "G"),
                              hbv_Skins_GetColVar("AdaptiveCol", "Target", "B"))
    elseif SkinType == "SkinAdaptiveOOR" then
        HealBot_UseColourPick(hbv_Skins_GetColVar("AdaptiveCol", "OOR", "R"),
                              hbv_Skins_GetColVar("AdaptiveCol", "OOR", "G"),
                              hbv_Skins_GetColVar("AdaptiveCol", "OOR", "B"))
    elseif SkinType == "SkinAdaptiveOverheals" then
        HealBot_UseColourPick(hbv_Skins_GetColVar("AdaptiveCol", "Overheals", "R"),
                              hbv_Skins_GetColVar("AdaptiveCol", "Overheals", "G"),
                              hbv_Skins_GetColVar("AdaptiveCol", "Overheals", "B"))
    elseif SkinType == "SkinAdaptiveAbsorbs" then
        HealBot_UseColourPick(hbv_Skins_GetColVar("AdaptiveCol", "Absorbs", "R"),
                              hbv_Skins_GetColVar("AdaptiveCol", "Absorbs", "G"),
                              hbv_Skins_GetColVar("AdaptiveCol", "Absorbs", "B"))
    end
end

function HealBot_SkinColorpick_OnClick(SkinType)
      --HealBot_setCall("HealBot_SkinColorpick_OnClick")
    HealBot_ColourObjWaiting=SkinType;

    if SkinType == "Back" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("Frame", "BACKR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("Frame", "BACKG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("Frame", "BACKB", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("Frame", "BACKA", hb_lVars["Frame"]))
    elseif SkinType == "Bor" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("Frame", "BORDERR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("Frame", "BORDERG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("Frame", "BORDERB", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("Frame", "BORDERA", hb_lVars["Frame"]))
    elseif SkinType == "AliasT" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("FrameAlias", "R", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("FrameAlias", "G", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("FrameAlias", "B", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("FrameAlias", "A", hb_lVars["Frame"]))
    elseif SkinType == "Alias" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("FrameAliasBar", "R", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("FrameAliasBar", "G", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("FrameAliasBar", "B", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("FrameAliasBar", "A", hb_lVars["Frame"]))
    elseif SkinType == "CustomAuxBar" then
        HealBot_UseColourPick(hbv_Aux_GetBarVar("R", hb_lVars["Frame"], hb_lVars["AuxBar"]),
                              hbv_Aux_GetBarVar("G", hb_lVars["Frame"], hb_lVars["AuxBar"]),
                              hbv_Aux_GetBarVar("B", hb_lVars["Frame"], hb_lVars["AuxBar"]))
    elseif SkinType == "HeadB" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("HeadBar", "R", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("HeadBar", "G", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("HeadBar", "B", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("HeadBar", "A", hb_lVars["Frame"]))
    elseif SkinType == "HeadT" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("HeadText", "R", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("HeadText", "G", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("HeadText", "B", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("HeadText", "A", hb_lVars["Frame"]))
    elseif SkinType == "ActionIconsAlertGlow" then
        HealBot_UseColourPick(hbv_ActionIcons_GetColData("AlertGlowCol", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
    elseif SkinType == "ActionIconsCDText" then
        HealBot_UseColourPick(hbv_ActionIcons_GetColVars("FONTCOL", hb_lVars["Frame"]))
    elseif SkinType == "ActionIconsCountText" then
        HealBot_UseColourPick(hbv_ActionIcons_GetColVars("FONTCOUNTCOL", hb_lVars["Frame"]))
    elseif SkinType == "RoleTank" then
        HealBot_UseColourPick(hbv_Skins_GetRoleCol("TANK", 1))
    elseif SkinType == "RoleHeal" then
        HealBot_UseColourPick(hbv_Skins_GetRoleCol("HEALER", 1))
    elseif SkinType == "RoleDPS" then
        HealBot_UseColourPick(hbv_Skins_GetRoleCol("DAMAGER", 1))
    elseif SkinType == "PowerAstral" then
        HealBot_UseColourPick(hbv_Skins_GetPowerCol("LUNAR_POWER", 1))
    elseif SkinType == "PowerEnergy" then
        HealBot_UseColourPick(hbv_Skins_GetPowerCol("ENERGY", 1))
    elseif SkinType == "PowerFocus" then
        HealBot_UseColourPick(hbv_Skins_GetPowerCol("FOCUS", 1))
    elseif SkinType == "PowerFury" then
        HealBot_UseColourPick(hbv_Skins_GetPowerCol("FURY", 1))
    elseif SkinType == "PowerMana" then
        HealBot_UseColourPick(hbv_Skins_GetPowerCol("MANA", 1))
    elseif SkinType == "PowerRage" then
        HealBot_UseColourPick(hbv_Skins_GetPowerCol("RAGE", 1))
    elseif SkinType == "PowerRunic" then
        HealBot_UseColourPick(hbv_Skins_GetPowerCol("RUNIC_POWER", 1))
    elseif SkinType == "ClassDeathKnight" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("DEAT", 1))
    elseif SkinType == "ClassDemonHunter" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("DEMO", 1))
    elseif SkinType == "ClassDruid" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("DRUI", 1))
    elseif SkinType == "ClassEvoker" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("EVOK", 1))
    elseif SkinType == "ClassHunter" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("HUNT", 1))
    elseif SkinType == "ClassMage" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("MAGE", 1))
    elseif SkinType == "ClassMonk" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("MONK", 1))
    elseif SkinType == "ClassPaladin" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("PALA", 1))
    elseif SkinType == "ClassPriest" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("PRIE", 1))
    elseif SkinType == "ClassRogue" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("ROGU", 1))
    elseif SkinType == "ClassShaman" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("SHAM", 1))
    elseif SkinType == "ClassWarlock" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("WARL", 1))
    elseif SkinType == "ClassWarrior" then
        HealBot_UseColourPick(hbv_Skins_GetClassCol("WARR", 1))
    elseif SkinType == "CustomBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarCol", "HR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "HG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "HB", hb_lVars["Frame"]))
    elseif SkinType == "CustomCriticalBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarCol", "HCR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "HCG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "HCB", hb_lVars["Frame"]))
    elseif SkinType == "CustomInjuredBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarCol", "HIR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "HIG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "HIB", hb_lVars["Frame"]))
    elseif SkinType == "CustomEnemyBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarCol", "HRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "HGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "HBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomCriticalEnemyBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarCol", "HCRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "HCGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "HCBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomInjuredEnemyBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarCol", "HIRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "HIGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "HIBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomNameText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "NCR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "NCG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "NCB", hb_lVars["Frame"]))
    elseif SkinType == "CustomNameInjuredText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "NICR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "NICG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "NICB", hb_lVars["Frame"]))
    elseif SkinType == "CustomNameCriticalText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "NCCR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "NCCG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "NCCB", hb_lVars["Frame"]))
    elseif SkinType == "CustomNameEnemyText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "NCRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "NCGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "NCBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomNameInjuredEnemyText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "NICRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "NICGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "NICBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomNameCriticalEnemyText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "NCCRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "NCCGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "NCCBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomStateText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "SCR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "SCG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "SCB", hb_lVars["Frame"]))
    elseif SkinType == "CustomStateInjuredText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "SICR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "SICG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "SICB", hb_lVars["Frame"]))
    elseif SkinType == "CustomStateCriticalText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "SCCR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "SCCG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "SCCB", hb_lVars["Frame"]))
    elseif SkinType == "CustomStateEnemyText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "SCRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "SCGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "SCBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomStateInjuredEnemyText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "SICRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "SICGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "SICBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomStateCriticalEnemyText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "SCCRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "SCCGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "SCCBE", hb_lVars["Frame"]))
    elseif SkinType == "DeadStateText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "SDCR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "SDCG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "SDCB", hb_lVars["Frame"]))
    elseif SkinType == "DeadNameText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "NDCR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "NDCG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "NDCB", hb_lVars["Frame"]))
    elseif SkinType == "ResStateText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "SRCR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "SRCG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "SRCB", hb_lVars["Frame"]))
    elseif SkinType == "ResNameText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "NRCR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "NRCG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "NRCB", hb_lVars["Frame"]))
    elseif SkinType == "SummonStateText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "SSCR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "SSCG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "SSCB", hb_lVars["Frame"]))
    elseif SkinType == "SummonNameText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "NSCR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "NSCG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "NSCB", hb_lVars["Frame"]))
    elseif SkinType == "CustomEmergCrit" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("Emerg", "CR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("Emerg", "CG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("Emerg", "CB", hb_lVars["Frame"]))
    elseif SkinType == "CustomEmergInj" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("Emerg", "IR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("Emerg", "IG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("Emerg", "IB", hb_lVars["Frame"]))
    elseif SkinType == "CustomEmergHealthy" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("Emerg", "HR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("Emerg", "HG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("Emerg", "HB", hb_lVars["Frame"]))
    elseif SkinType == "CustomOverHealText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "OCR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "OCG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "OCB", hb_lVars["Frame"]))
    elseif SkinType == "CustomInHealText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "ICR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "ICG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "ICB", hb_lVars["Frame"]))
    elseif SkinType == "CustomExtraHealthText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "HECR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "HECG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "HECB", hb_lVars["Frame"]))
    elseif SkinType == "CustomAggroText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "ACR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "ACG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "ACB", hb_lVars["Frame"]))
    elseif SkinType == "CustomAuxText" then
        HealBot_UseColourPick(hbv_Aux_GetBarTextVar("COLR", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]),
                              hbv_Aux_GetBarTextVar("COLG", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]),
                              hbv_Aux_GetBarTextVar("COLB", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]))
    elseif SkinType == "CustomHealthText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "HCR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "HCG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "HCB", hb_lVars["Frame"]))
    elseif SkinType == "CustomHealthInjuredText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "HICR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "HICG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "HICB", hb_lVars["Frame"]))
    elseif SkinType == "CustomHealthCriticalText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "HCCR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "HCCG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "HCCB", hb_lVars["Frame"]))
    elseif SkinType == "CustomHealthEnemyText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "HCRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "HCGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "HCBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomHealthInjuredEnemyText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "HICRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "HICGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "HICBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomHealthCriticalEnemyText" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarTextCol", "HCCRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "HCCGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarTextCol", "HCCBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomBackBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarCol", "BR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BB", hb_lVars["Frame"]))
    elseif SkinType == "CustomBackInjuredBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarCol", "BIR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BIG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BIB", hb_lVars["Frame"]))
    elseif SkinType == "CustomBackCriticalBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarCol", "BCR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BCG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BCB", hb_lVars["Frame"]))
    elseif SkinType == "CustomBackEnemyBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarCol", "BRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomBackInjuredEnemyBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarCol", "BIRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BIGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BIBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomBackCriticalEnemyBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarCol", "BCRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BCGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BCBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomIHBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarIACol", "IR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "IG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "IB", hb_lVars["Frame"]))
    elseif SkinType == "CustomIHInjuredBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarIACol", "IIR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "IIG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "IIB", hb_lVars["Frame"]))
    elseif SkinType == "CustomIHCriticalBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarIACol", "ICR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "ICG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "ICB", hb_lVars["Frame"]))
    elseif SkinType == "CustomIHEnemyBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarIACol", "IRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "IGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "IBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomIHInjuredEnemyBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarIACol", "IIRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "IIGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "IIBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomIHCriticalEnemyBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarIACol", "ICRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "ICGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "ICBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomAbsorbBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarIACol", "AR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "AG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "AB", hb_lVars["Frame"]))
    elseif SkinType == "CustomAbsorbInjuredBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarIACol", "AIR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "AIG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "AIB", hb_lVars["Frame"]))
    elseif SkinType == "CustomAbsorbCriticalBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarIACol", "ACR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "ACG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "ACB", hb_lVars["Frame"]))
    elseif SkinType == "CustomAbsorbEnemyBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarIACol", "ARE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "AGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "ABE", hb_lVars["Frame"]))
    elseif SkinType == "CustomAbsorbInjuredEnemyBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarIACol", "AIRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "AIGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "AIBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomAbsorbCriticalEnemyBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarIACol", "ACRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "ACGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarIACol", "ACBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomBorderBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarCol", "BORR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BORG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BORB", hb_lVars["Frame"]))
    elseif SkinType == "CustomBorderInjuredBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarCol", "BORIR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BORIG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BORIB", hb_lVars["Frame"]))
    elseif SkinType == "CustomBorderCriticalBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarCol", "BORCR", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BORCG", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BORCB", hb_lVars["Frame"]))
    elseif SkinType == "CustomBorderEnemyBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarCol", "BORRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BORGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BORBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomBorderInjuredEnemyBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarCol", "BORIRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BORIGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BORIBE", hb_lVars["Frame"]))
    elseif SkinType == "CustomBorderCriticalEnemyBar" then
        HealBot_UseColourPick(hbv_Skins_GetFrameVar("BarCol", "BORCRE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BORCGE", hb_lVars["Frame"]),
                              hbv_Skins_GetFrameVar("BarCol", "BORCBE", hb_lVars["Frame"]))
    end
end

function HealBot_BuffColorpick_OnClick(BuffID,id)
      --HealBot_setCall("HealBot_BuffColorpick_OnClick")
    HealBot_ColourObjWaiting=BuffID;
    local buffbarcolrClass=HealBot_Config_Buffs.HealBotBuffColR or 1
    local buffbarcolgClass=HealBot_Config_Buffs.HealBotBuffColG or 1
    local buffbarcolbClass=HealBot_Config_Buffs.HealBotBuffColB or 1
    HealBot_UseColourPick(buffbarcolrClass[id],
                          buffbarcolgClass[id],
                          buffbarcolbClass[id]);
end

function HealBot_SetSkinColours()
      --HealBot_setCall("HealBot_SetSkinColours")
    HealBot_Timers_Set("SKINS","UpdateTextButtons")
    HealBot_Options_SetBarsTextColour()
    HealBot_HeadTextColorpickt:SetTextColor(
        hbv_Skins_GetFrameVar("HeadText", "R", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("HeadText", "G", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("HeadText", "B", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("HeadText", "A", hb_lVars["Frame"]))
    HealBot_AuxBarCustomColour:SetStatusBarColor(
        hbv_Aux_GetBarVar("R", hb_lVars["Frame"], hb_lVars["AuxBar"]),
        hbv_Aux_GetBarVar("G", hb_lVars["Frame"], hb_lVars["AuxBar"]),
        hbv_Aux_GetBarVar("B", hb_lVars["Frame"], hb_lVars["AuxBar"]));
    HealBot_HeadBarColorpick:SetStatusBarColor(
        hbv_Skins_GetFrameVar("HeadBar", "R", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("HeadBar", "G", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("HeadBar", "B", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("HeadBar", "A", hb_lVars["Frame"]))
    HealBot_HeadTextColorpick:SetStatusBarColor(
        hbv_Skins_GetFrameVar("HeadBar", "R", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("HeadBar", "G", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("HeadBar", "B", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("HeadBar", "A", hb_lVars["Frame"]))
    HealBot_FrameAliasColorpick:SetStatusBarColor(
        hbv_Skins_GetFrameVar("FrameAliasBar", "R", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("FrameAliasBar", "G", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("FrameAliasBar", "B", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("FrameAliasBar", "A", hb_lVars["Frame"]))
    HealBot_FrameAliasTextColorpick:SetStatusBarColor(
        hbv_Skins_GetFrameVar("FrameAliasBar", "R", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("FrameAliasBar", "G", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("FrameAliasBar", "B", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("FrameAliasBar", "A", hb_lVars["Frame"]))
    HealBot_BarCustomHealthColourHealthy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarCol", "HR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "HG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "HB", hb_lVars["Frame"]));
    HealBot_BarCustomHealthColourCritical:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarCol", "HCR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "HCG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "HCB", hb_lVars["Frame"]));
    HealBot_BarCustomHealthColourInjured:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarCol", "HIR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "HIG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "HIB", hb_lVars["Frame"]));
    HealBot_BarCustomHealthColourHealthyEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarCol", "HRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "HGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "HBE", hb_lVars["Frame"]));
    HealBot_BarCustomHealthColourCriticalEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarCol", "HCRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "HCGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "HCBE", hb_lVars["Frame"]));
    HealBot_BarCustomHealthColourInjuredEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarCol", "HIRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "HIGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "HIBE", hb_lVars["Frame"]));
    HealBot_BarCustomHealthBackColourHealthy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarCol", "BR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BB", hb_lVars["Frame"]));
    HealBot_BarCustomHealthBackColourInjured:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarCol", "BIR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BIG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BIB", hb_lVars["Frame"]));
    HealBot_BarCustomHealthBackColourCritical:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarCol", "BCR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BCG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BCB", hb_lVars["Frame"]));
    HealBot_BarCustomHealthBackColourHealthyEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarCol", "BRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BBE", hb_lVars["Frame"]));
    HealBot_BarCustomHealthBackColourInjuredEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarCol", "BIRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BIGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BIBE", hb_lVars["Frame"]));
    HealBot_BarCustomHealthBackColourCriticalEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarCol", "BCRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BCGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BCBE", hb_lVars["Frame"]));
    HealBot_BarCustomBorderColourHealthy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarCol", "BORR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BORG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BORB", hb_lVars["Frame"]));
    HealBot_BarCustomBorderColourInjured:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarCol", "BORIR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BORIG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BORIB", hb_lVars["Frame"]));
    HealBot_BarCustomBorderColourCritical:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarCol", "BORCR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BORCG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BORCB", hb_lVars["Frame"]));
    HealBot_BarCustomBorderColourHealthyEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarCol", "BORRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BORGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BORBE", hb_lVars["Frame"]));
    HealBot_BarCustomBorderColourInjuredEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarCol", "BORIRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BORIGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BORIBE", hb_lVars["Frame"]));
    HealBot_BarCustomBorderColourCriticalEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarCol", "BORCRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BORCGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarCol", "BORCBE", hb_lVars["Frame"]));
    HealBot_BarCustomIHColourHealthy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarIACol", "IR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "IG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "IB", hb_lVars["Frame"]))
    HealBot_BarCustomIHColourInjured:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarIACol", "IIR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "IIG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "IIB", hb_lVars["Frame"]))
    HealBot_BarCustomIHColourCritical:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarIACol", "ICR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "ICG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "ICB", hb_lVars["Frame"]))
    HealBot_BarCustomIHColourHealthyEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarIACol", "IRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "IGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "IBE", hb_lVars["Frame"]))
    HealBot_BarCustomIHColourInjuredEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarIACol", "IIRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "IIGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "IIBE", hb_lVars["Frame"]))
    HealBot_BarCustomIHColourCriticalEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarIACol", "ICRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "ICGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "ICBE", hb_lVars["Frame"]))
    HealBot_BarCustomAbsorbColourHealthy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarIACol", "AR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "AG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "AB", hb_lVars["Frame"]))
    HealBot_BarCustomAbsorbColourInjured:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarIACol", "AIR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "AIG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "AIB", hb_lVars["Frame"]))
    HealBot_BarCustomAbsorbColourCritical:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarIACol", "ACR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "ACG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "ACB", hb_lVars["Frame"]))
    HealBot_BarCustomAbsorbColourHealthyEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarIACol", "ARE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "AGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "ABE", hb_lVars["Frame"]))
    HealBot_BarCustomAbsorbColourInjuredEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarIACol", "AIRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "AIGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "AIBE", hb_lVars["Frame"]))
    HealBot_BarCustomAbsorbColourCriticalEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarIACol", "ACRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "ACGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarIACol", "ACBE", hb_lVars["Frame"]))
    HealBot_EmergCustomColCrit:SetStatusBarColor(
        hbv_Skins_GetFrameVar("Emerg", "CR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("Emerg", "CG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("Emerg", "CB", hb_lVars["Frame"]))
    HealBot_EmergCustomColInj:SetStatusBarColor(
        hbv_Skins_GetFrameVar("Emerg", "IR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("Emerg", "IG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("Emerg", "IB", hb_lVars["Frame"]))
    HealBot_EmergCustomColHealthy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("Emerg", "HR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("Emerg", "HG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("Emerg", "HB", hb_lVars["Frame"]))
    HealBot_NameTextCustomColourHealthy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "NCR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NCG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NCB", hb_lVars["Frame"]))
    HealBot_NameTextCustomColourInjured:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "NICR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NICG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NICB", hb_lVars["Frame"]))
    HealBot_NameTextCustomColourCritical:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "NCCR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NCCG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NCCB", hb_lVars["Frame"]))
    HealBot_NameTextCustomColourHealthyEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "NCRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NCGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NCBE", hb_lVars["Frame"]))
    HealBot_NameTextCustomColourInjuredEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "NICRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NICGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NICBE", hb_lVars["Frame"]))
    HealBot_NameTextCustomColourCriticalEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "NCCRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NCCGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NCCBE", hb_lVars["Frame"]))
    HealBot_HealthTextCustomColourHealthy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "HCR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "HCG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "HCB", hb_lVars["Frame"]))
    HealBot_HealthTextCustomColourInjured:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "HICR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "HICG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "HICB", hb_lVars["Frame"]))
    HealBot_HealthTextCustomColourCritical:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "HCCR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "HCCG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "HCCB", hb_lVars["Frame"]))
    HealBot_HealthTextCustomColourHealthyEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "HCRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "HCGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "HCBE", hb_lVars["Frame"]))
    HealBot_HealthTextCustomColourInjuredEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "HICRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "HICGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "HICBE", hb_lVars["Frame"]))
    HealBot_HealthTextCustomColourCriticalEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "HCCRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "HCCGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "HCCBE", hb_lVars["Frame"]))
    HealBot_AggroTextCustomColour:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "ACR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "ACG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "ACB", hb_lVars["Frame"]))
    HealBot_Timers_Set("SKINS","ResetFrameAlias")
    HealBot_Options_SetFrameCols()
end

function HealBot_Options_SetFrameCols()
      --HealBot_setCall("HealBot_Options_SetFrameCols")
    HealBot_BackgroundColorpick:SetStatusBarColor(
        hbv_Skins_GetFrameVar("Frame", "BACKR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("Frame", "BACKG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("Frame", "BACKB", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("Frame", "BACKA", hb_lVars["Frame"]))
    HealBot_BorderColorpick:SetStatusBarColor(
        hbv_Skins_GetFrameVar("Frame", "BORDERR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("Frame", "BORDERG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("Frame", "BORDERB", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("Frame", "BORDERA", hb_lVars["Frame"]))
    HealBot_FrameAliasTextColorpickt:SetTextColor(
        hbv_Skins_GetFrameVar("FrameAlias", "R", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("FrameAlias", "G", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("FrameAlias", "B", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("FrameAlias", "A", hb_lVars["Frame"]))
    HealBot_Action_SetFrameCols(hb_lVars["Frame"])
end

function HealBot_Options_SetBarsStateTextColour()
      --HealBot_setCall("HealBot_Options_SetBarsStateTextColour")
    HealBot_StateTextCustomColourHealthy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "SCR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SCG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SCB", hb_lVars["Frame"]), 1)
    HealBot_StateTextCustomColourInjured:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "SICR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SICG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SICB", hb_lVars["Frame"]), 1)
    HealBot_StateTextCustomColourCritical:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "SCCR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SCCG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SCCB", hb_lVars["Frame"]), 1)
    HealBot_StateTextCustomColourHealthyEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "SCRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SCGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SCBE", hb_lVars["Frame"]), 1)
    HealBot_StateTextCustomColourInjuredEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "SICRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SICGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SICBE", hb_lVars["Frame"]), 1)
    HealBot_StateTextCustomColourCriticalEnemy:SetStatusBarColor(
        hbv_Skins_GetFrameVar("BarTextCol", "SCCRE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SCCGE", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SCCBE", hb_lVars["Frame"]), 1)
    HealBot_StateTextSummonColourt:SetTextColor(
        hbv_Skins_GetFrameVar("BarTextCol", "SSCR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SSCG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SSCB", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SCA", hb_lVars["Frame"]))
    HealBot_StateTextDeadColourt:SetTextColor(
        hbv_Skins_GetFrameVar("BarTextCol", "SDCR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SDCG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SDCB", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SCA", hb_lVars["Frame"]))
    HealBot_StateTextResColourt:SetTextColor(
        hbv_Skins_GetFrameVar("BarTextCol", "SRCR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SRCG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SRCB", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "SCA", hb_lVars["Frame"]))
    if hbv_Skins_GetFrameVar("BarCol", "HLTH", hb_lVars["Frame"]) == 1 then
        HealBot_StateTextSummonCol:SetStatusBarColor(0, 1, 0, 1);
    elseif hbv_Skins_GetFrameVar("BarCol", "HLTH", hb_lVars["Frame"]) == 2 then
        local sbR, sbG, sbB=HealBot_Action_ClassColour("player")
        HealBot_StateTextSummonCol:SetStatusBarColor(sbR, sbG, sbB, 1);
    else
        HealBot_StateTextSummonCol:SetStatusBarColor(
            hbv_Skins_GetFrameVar("BarCol", "HR", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HG", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HB", hb_lVars["Frame"]), 1);
    end
end

function HealBot_Options_SetBarsTextColour()
      --HealBot_setCall("HealBot_Options_SetBarsTextColour")
    HealBot_NameTextDeadColourt:SetTextColor(
        hbv_Skins_GetFrameVar("BarTextCol", "NDCR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NDCG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NDCB", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NCA", hb_lVars["Frame"]))
    HealBot_NameTextResColourt:SetTextColor(
        hbv_Skins_GetFrameVar("BarTextCol", "NRCR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NRCG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NRCB", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NCA", hb_lVars["Frame"]))
    HealBot_NameTextSummonColourt:SetTextColor(
        hbv_Skins_GetFrameVar("BarTextCol", "NSCR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NSCG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NSCB", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "NCA", hb_lVars["Frame"]))
    HealBot_ExtraOverHealCustomColourt:SetTextColor(
        hbv_Skins_GetFrameVar("BarTextCol", "OCR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "OCG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "OCB", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "HCA", hb_lVars["Frame"]))
    HealBot_ExtraInHealCustomColourt:SetTextColor(
        hbv_Skins_GetFrameVar("BarTextCol", "ICR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "ICG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "ICB", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "HCA", hb_lVars["Frame"]))
    HealBot_ExtraHealthCustomColourt:SetTextColor(
        hbv_Skins_GetFrameVar("BarTextCol", "HECR", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "HECG", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "HECB", hb_lVars["Frame"]),
        hbv_Skins_GetFrameVar("BarTextCol", "HCA", hb_lVars["Frame"]))
    HealBot_AuxTextCustomColourt:SetTextColor(
        hbv_Aux_GetBarTextVar("COLR", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]),
        hbv_Aux_GetBarTextVar("COLG", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]),
        hbv_Aux_GetBarTextVar("COLB", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]),
        hbv_Aux_GetBarTextVar("COLA", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]))
    if hbv_Skins_GetFrameVar("BarCol", "HLTH", hb_lVars["Frame"]) == 1 then
        HealBot_StateTextSummonCol:SetStatusBarColor(0, 1, 0);
        HealBot_NameTextSummonCol:SetStatusBarColor(0, 1, 0);
        HealBot_ExtraOverHealCustomColour:SetStatusBarColor(0, 1, 0);
        HealBot_ExtraInHealCustomColour:SetStatusBarColor(0, 1, 0);
        HealBot_ExtraHealthCustomColour:SetStatusBarColor(0, 1, 0)
        HealBot_TextHealthyCustomColour:SetStatusBarColor(0, 1, 0);
        HealBot_TextInjuredCustomColour:SetStatusBarColor(0, 1, 0);
        HealBot_TextCriticalCustomColour:SetStatusBarColor(0, 1, 0);
        HealBot_TextHealthyCustomColourEnemy:SetStatusBarColor(0, 1, 0);
        HealBot_TextInjuredCustomColourEnemy:SetStatusBarColor(0, 1, 0);
        HealBot_TextCriticalCustomColourEnemy:SetStatusBarColor(0, 1, 0);
    elseif hbv_Skins_GetFrameVar("BarCol", "HLTH", hb_lVars["Frame"]) == 3 then
        HealBot_TextHealthyCustomColour:SetStatusBarColor(
            hbv_Skins_GetFrameVar("BarCol", "HR", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HG", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HB", hb_lVars["Frame"]))
        HealBot_TextInjuredCustomColour:SetStatusBarColor(
            hbv_Skins_GetFrameVar("BarCol", "HR", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HG", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HB", hb_lVars["Frame"]))
        HealBot_TextCriticalCustomColour:SetStatusBarColor(
            hbv_Skins_GetFrameVar("BarCol", "HR", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HG", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HB", hb_lVars["Frame"]))
        HealBot_TextHealthyCustomColourEnemy:SetStatusBarColor(
            hbv_Skins_GetFrameVar("BarCol", "HRE", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HGE", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HBE", hb_lVars["Frame"]))
        HealBot_TextInjuredCustomColourEnemy:SetStatusBarColor(
            hbv_Skins_GetFrameVar("BarCol", "HRE", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HGE", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HBE", hb_lVars["Frame"]))
        HealBot_TextCriticalCustomColourEnemy:SetStatusBarColor(
            hbv_Skins_GetFrameVar("BarCol", "HRE", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HGE", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HBE", hb_lVars["Frame"]))
        HealBot_StateTextSummonCol:SetStatusBarColor(
            hbv_Skins_GetFrameVar("BarCol", "HR", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HG", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HB", hb_lVars["Frame"]))
        HealBot_NameTextSummonCol:SetStatusBarColor(
            hbv_Skins_GetFrameVar("BarCol", "HR", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HG", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HB", hb_lVars["Frame"]))
        HealBot_ExtraOverHealCustomColour:SetStatusBarColor(
            hbv_Skins_GetFrameVar("BarCol", "HR", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HG", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HB", hb_lVars["Frame"]))
        HealBot_ExtraHealthCustomColour:SetStatusBarColor(
            hbv_Skins_GetFrameVar("BarCol", "HR", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HG", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HB", hb_lVars["Frame"]))
        HealBot_ExtraInHealCustomColour:SetStatusBarColor(
            hbv_Skins_GetFrameVar("BarCol", "HR", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HG", hb_lVars["Frame"]),
            hbv_Skins_GetFrameVar("BarCol", "HB", hb_lVars["Frame"]))
    else
        local sbR, sbG, sbB=HealBot_Action_ClassColour("player")
        HealBot_StateTextSummonCol:SetStatusBarColor(sbR, sbG, sbB);
        HealBot_NameTextSummonCol:SetStatusBarColor(sbR, sbG, sbB);
        HealBot_ExtraHealthCustomColour:SetStatusBarColor(sbR, sbG, sbB);
        HealBot_ExtraOverHealCustomColour:SetStatusBarColor(sbR, sbG, sbB);
        HealBot_ExtraInHealCustomColour:SetStatusBarColor(sbR, sbG, sbB);
        HealBot_TextHealthyCustomColour:SetStatusBarColor(sbR, sbG, sbB);
        HealBot_TextInjuredCustomColour:SetStatusBarColor(sbR, sbG, sbB);
        HealBot_TextCriticalCustomColour:SetStatusBarColor(sbR, sbG, sbB);
        HealBot_TextHealthyCustomColourEnemy:SetStatusBarColor(sbR, sbG, sbB);
        HealBot_TextInjuredCustomColourEnemy:SetStatusBarColor(sbR, sbG, sbB);
        HealBot_TextCriticalCustomColourEnemy:SetStatusBarColor(sbR, sbG, sbB);
    end
    HealBot_NameTextDeadCol:SetStatusBarColor(0.4, 0.4, 0.4, 0.2)
    HealBot_NameTextResCol:SetStatusBarColor(0.4, 0.4, 0.4, 0.2)
    HealBot_AuxTextCustomColour:SetStatusBarColor(0.8,0.7,0.1)
    HealBot_StateTextDeadCol:SetStatusBarColor(0.4, 0.4, 0.4, 0.2)
    HealBot_StateTextResCol:SetStatusBarColor(0.4, 0.4, 0.4, 0.2)
    HealBot_Options_SetBarsStateTextColour()
end

function HealBot_Options_AlertLevelIC_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AlertLevelIC_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarVisibility", "ALERTIC", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarVisibility", "ALERTIC", hb_lVars["Frame"])
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_Options_framesChanged(true)
    end
end

function HealBot_Options_AlertLevelOC_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AlertLevelOC_OnValueChanged")
    if hbv_Skins_GetFrameVar("BarVisibility", "ALERTOC", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
        hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarVisibility", "ALERTOC", hb_lVars["Frame"])
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_Options_framesChanged(true)
    end
end

function HealBot_Options_OptionsOpacityAdj_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_OptionsOpacityAdj_OnValueChanged")
    local val=HealBot_Util_Round(self:GetValue())
    if HealBot_Globals.OptionsOpacityAdj~=val then
        HealBot_Globals.OptionsOpacityAdj=val
        HealBot_Timers_Set("LAST","OptionsMainPanel")
    end
end

function HealBot_Options_BuffTimer_OnValueChanged(self,bufftype)
      --HealBot_setCall("HealBot_Options_BuffTimer_OnValueChanged")
    --local val=HealBot_Util_Round(self:GetValue(), -1)
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        if bufftype == "SHORT" then
            HealBot_Config_Buffs.ShortBuffTimer=val;
        else
            HealBot_Config_Buffs.LongBuffTimer=val;
        end
        local mins,secs=HealBot_ReturnMinsSecs(val)
        local g=nil
        if mins<1 then
            g=_G[self:GetName()]
            HealBot_Options_SetText(g,self.text .. ": " .. secs .." secs")
        else
            g=_G[self:GetName()]
            HealBot_Options_SetText(g,self.text .. ": " .. mins ..":".. secs .." mins")
        end
        HealBot_Timers_Set("AURA","CheckBuffs")
    end
end

function HealBot_ReturnMinsSecs(s)
      --HealBot_setCall("HealBot_ReturnMinsSecs")
    local mins=floor(s/60)
    local secs=floor(s-(mins*60))
  --  mins=mins+1
    if secs<10 then secs="0"..secs end
    return mins,secs
end

hb_lVars["FluidFreqAdj"]=0.0225
hb_lVars["FlashFreqAdj"]=0.05
function HealBot_Options_PerfPlugin_adj(fluidAdj, flashAdj, cpuAdj)
      --HealBot_setCall("HealBot_Options_PerfPlugin_adj")

    --local fluidVals={[7]=0.01,  [6]=0.014, [5]=0.017, [4]=0.02,  [3]=0.024, [2]=0.027, [1]=0.03}
    --local flashVals={[7]=0.04,  [6]=0.044, [5]=0.047, [4]=0.05,  [3]=0.055, [2]=0.06,  [1]=0.07}
    --local timedVals={[7]=0.014, [6]=0.017, [5]=0.022, [4]=0.025, [3]=0.03,  [2]=0.035, [1]=0.05}
    local fluidVals={[15]=0.005,  [14]=0.0075, [13]=0.01,   [12]=0.0125, [11]=0.015,  [10]=0.0175, [9]=0.02,   [8]=0.0225, [7]=0.025, [6]=0.0275, [5]=0.03,   [4]=0.0325, [3]=0.035,  [2]=0.0375, [1]=0.04}
    local flashVals={[15]=0.03,   [14]=0.0335, [13]=0.037,  [12]=0.04,   [11]=0.0425, [10]=0.045,  [9]=0.0475, [8]=0.05,   [7]=0.055, [6]=0.06,   [5]=0.065,  [4]=0.07,   [3]=0.08,   [2]=0.09,   [1]=0.1}
    local timedVals={[15]=0.0125, [14]=0.015,  [13]=0.0175, [12]=0.02,   [11]=0.0225, [10]=0.025,  [9]=0.0275, [8]=0.03,   [7]=0.0325, [6]=0.035, [5]=0.0375, [4]=0.04,   [3]=0.0425, [2]=0.045,  [1]=0.05}
    hb_lVars["FluidFreqAdj"]=fluidVals[fluidAdj]
    hb_lVars["FlashFreqAdj"]=flashVals[flashAdj]

    local hbCPU=(cpuAdj-15)*2
    HealBot_PerfPlugin_adj(hbCPU)
    HealBot_Timers_Set("LAST","BarFreqVars")
    HealBot_Aux_AdjUpdateTimedFreq(timedVals[fluidAdj])
end

hb_lVars["hotBarHlth"]=0
hb_lVars["hotBarDebuff"]=0
hb_lVars["hotBarDimming"]=4
function HealBot_Options_BarFreq_setVars()
      --HealBot_setCall("HealBot_Options_BarFreq_setVars")
    local flashFreqUpd=0
    local flashFreq=0.02
    local smoothAdj=9
    local fluidFreq=0
    local hotBarHlth=0
    local hotBarDebuff=0
    local hotBarDimming=4
    local hazardFreq=0.3
    local hazardMinAlpha=0.25
    local grpHealthRange=1
    local grpHealthMinUnits=5
    local grpHealthThreshold=700
    local grpHealthDiming=0
    if HealBot_Globals.OverrideEffects["USE"] == 1 then
        hazardFreq=hbv_Skins_GetVar("General", "HAZARDFREQ")
        hazardMinAlpha=hbv_Skins_GetVar("General", "HAZARDMINALPHA")
    else
        hazardFreq=HealBot_Globals.OverrideEffects["HAZARDFREQ"] or 0.3
        hazardMinAlpha=HealBot_Globals.OverrideEffects["HAZARDMINALPHA"] or 0.25
    end
    if HealBot_Globals.OverrideEffects["USEBARS"] == 1 then
        flashFreqUpd=0.075+(hbv_Skins_GetVar("General", "OFREQ")*0.25)
        fluidFreq=HealBot_Util_Round(hb_lVars["FluidFreqAdj"]-(hbv_Skins_GetVar("General", "FLUIDFREQ")/1500),4)
        smoothAdj=9-ceil(hbv_Skins_GetVar("General", "FLUIDFREQ")/2)
        hotBarHlth=hbv_Skins_GetVar("General", "HOTBARHLTH")*10
        hotBarDebuff=hbv_Skins_GetVar("General", "HOTBARDEBUFF")-1
        hotBarDimming=hbv_Skins_GetVar("General", "HBDIMMING")
        grpHealthRange=hbv_Skins_GetVar("General", "GHRANGE")-2
        grpHealthMinUnits=hbv_Skins_GetVar("General", "GHMINUNITS")
        grpHealthThreshold=hbv_Skins_GetVar("General", "GHTHRESHOLD")*10
        grpHealthDiming=hbv_Skins_GetVar("General", "GHDIMMING")
    else
        flashFreqUpd=0.075+(HealBot_Globals.OverrideEffects["OFREQ"]*0.25)
        fluidFreq=HealBot_Util_Round(hb_lVars["FluidFreqAdj"]-(HealBot_Globals.OverrideEffects["FLUIDFREQ"]/1500),4)
        smoothAdj=9-ceil(HealBot_Globals.OverrideEffects["FLUIDFREQ"]/2)
        hotBarHlth=HealBot_Globals.OverrideEffects["HOTBARHLTH"]*10
        hotBarDebuff=HealBot_Globals.OverrideEffects["HOTBARDEBUFF"]-1
        hotBarDimming=HealBot_Globals.OverrideEffects["HBDIMMING"]
        grpHealthRange=HealBot_Globals.OverrideEffects["GHRANGE"]-2
        grpHealthMinUnits=HealBot_Globals.OverrideEffects["GHMINUNITS"]
        grpHealthThreshold=HealBot_Globals.OverrideEffects["GHTHRESHOLD"]*10
        grpHealthDiming=HealBot_Globals.OverrideEffects["GHDIMMING"]
    end
    flashFreq=HealBot_Util_Round(hb_lVars["FlashFreqAdj"]-(flashFreqUpd/4),4)
    hazardFreq=hazardFreq-0.05
    if fluidFreq<0.01 then fluidFreq=0.01 end
    if flashFreq<0.01 then flashFreq=0.01 end
    if hazardFreq<0.1 then hazardFreq=0.1 end
    if smoothAdj<2 then smoothAdj=2 end

    HealBot_Action_setLuVars("FluidBarFreq", fluidFreq)
    HealBot_Aux_setLuVars("AuxFluidBarFreq", fluidFreq)

    HealBot_Aux_setLuVars("AuxFluidBarOpacityUpdate", HealBot_Util_Round(flashFreqUpd/2.5,2))
    HealBot_Aux_setLuVars("AuxFluidBarOpacityFreq", flashFreq)

    HealBot_Action_setLuVars("FluidBarSmoothAdj", smoothAdj)
    HealBot_Aux_setLuVars("FluidBarSmoothAdj", smoothAdj)
    HealBot_Action_setLuVars("HotBarsHealth", hotBarHlth)
    HealBot_Aura_setLuVars("HotBarDebuff", hotBarDebuff)
    HealBot_Action_setLuVars("HotBarDimming", hotBarDimming)
    HealBot_Action_setLuVars("HazardFreq", hazardFreq)
    HealBot_Action_setLuVars("HazardMinAlpha", hazardMinAlpha)
    HealBot_Action_SetGroupHealthVars(grpHealthDiming, grpHealthThreshold, grpHealthMinUnits, grpHealthRange)
    HealBot_ActionIcons_setLuVars("HazardFreq", hazardFreq)
    HealBot_ActionIcons_setLuVars("HazardMinAlpha", hazardMinAlpha)

    if hb_lVars["hotBarHlth"]~=hotBarHlth or hb_lVars["hotBarDebuff"]~=hotBarDebuff or hb_lVars["hotBarDimming"]~=hotBarDimming then
        hb_lVars["hotBarHlth"]=hotBarHlth
        hb_lVars["hotBarDebuff"]=hotBarDebuff
        hb_lVars["hotBarDimming"]=hotBarDimming
        HealBot_Timers_Set("AURA","UpdateAllHotBars")
        HealBot_Timers_Set("LAST","ResetUnitStatus")
    end
    HealBot_Debug_PerfUpdate("FluidFreq", fluidFreq)
    HealBot_Debug_PerfUpdate("FlashFreq", flashFreq)
end

function HealBot_Options_OverrideHealthDropPct_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_OverrideHealthDropPct_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif HealBot_Globals.OverrideEffects["HEALTHDROPPCT"]~=val then
        HealBot_Globals.OverrideEffects["HEALTHDROPPCT"]=val;
        HealBot_Options_SetText(HealBot_Options_OverrideHealthDropPct, HEALBOT_OPTION_HEALTHDROPPCT..floor(val/10).."%")
        HealBot_Timers_Set("SKINS","FluidFlashInUse")
    end
end

function HealBot_Options_OverrideHotBarHealthThres_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_OverrideHotBarHealthThres_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif HealBot_Globals.OverrideEffects["HOTBARHLTH"]~=val then
        HealBot_Globals.OverrideEffects["HOTBARHLTH"]=val;
        HealBot_Options_SetText(HealBot_Options_OverrideHotBarHealthThres, HEALBOT_OPTION_HOTBARHEALTHPCT..val.."%")
        HealBot_Timers_Set("LAST","BarFreqVars")
    end
end

function HealBot_Options_OverrideGroupHealthMinUnits_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_OverrideHotBarHealthThres_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif HealBot_Globals.OverrideEffects["GHMINUNITS"]~=val then
        HealBot_Globals.OverrideEffects["GHMINUNITS"]=val;
        HealBot_Options_SetText(HealBot_Options_OverrideGroupHealthMinUnits, HEALBOT_OPTIONS_MINUNITS.." "..val)
        HealBot_Timers_Set("LAST","BarFreqVars")
    end
end

function HealBot_Options_OverrideGroupHealthThres_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_OverrideHotBarHealthThres_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif HealBot_Globals.OverrideEffects["GHTHRESHOLD"]~=val then
        HealBot_Globals.OverrideEffects["GHTHRESHOLD"]=val;
        HealBot_Options_SetText(HealBot_Options_OverrideGroupHealthThres, HEALBOT_PLUGIN_AURAWATCHHEALTHBELOW.." "..val.."%")
        HealBot_Timers_Set("LAST","BarFreqVars")
    end
end

function HealBot_Options_OverrideHealthDropSpeed_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_OverrideHealthDropSpeed_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif HealBot_Globals.OverrideEffects["HEALTHDROPTIME"]~=val then
        HealBot_Globals.OverrideEffects["HEALTHDROPTIME"]=val;
        HealBot_Options_SetText(HealBot_Options_OverrideHealthDropSpeed, HEALBOT_OPTION_HEALTHDROPSPEED..": "..HealBot_Globals.OverrideEffects["HEALTHDROPTIME"].." "..HEALBOT_WORDS_SEC)
        HealBot_Timers_Set("SKINS","FluidFlashInUse")
    end
end

function HealBot_Options_OverrideHealthDropCancel_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_OverrideHealthDropCancel_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif HealBot_Globals.OverrideEffects["HEALTHDROPCANCEL"]~=val then
        HealBot_Globals.OverrideEffects["HEALTHDROPCANCEL"]=val;
        HealBot_Options_SetText(HealBot_Options_OverrideHealthDropCancel, HEALBOT_OPTION_HEALTHDROPCANCEL..": "..floor(HealBot_Globals.OverrideEffects["HEALTHDROPCANCEL"]/10).."%")
        HealBot_Timers_Set("SKINS","FluidFlashInUse")
    end
end

function HealBot_Options_HealthDropPct_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HealthDropPct_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetVar("General", "HEALTHDROPPCT")~=val then
        hbv_Skins_SetVar(val, "General", "HEALTHDROPPCT")
        HealBot_Options_SetText(HealBot_Options_HealthDropPct, HEALBOT_OPTION_HEALTHDROPPCT..floor(val/10).."%")
        HealBot_Timers_Set("SKINS","FluidFlashInUse")
    end
end

function HealBot_Options_HealthDropSpeed_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HealthDropSpeed_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetVar("General", "HEALTHDROPTIME")~=val then
        hbv_Skins_SetVar(val, "General", "HEALTHDROPTIME")
        HealBot_Options_SetText(HealBot_Options_HealthDropSpeed, HEALBOT_OPTION_HEALTHDROPSPEED..": "..val.." "..HEALBOT_WORDS_SEC)
        HealBot_Timers_Set("SKINS","FluidFlashInUse")
    end
end

function HealBot_Options_HealthDropCancel_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HealthDropCancel_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetVar("General", "HEALTHDROPCANCEL")~=val then
        hbv_Skins_SetVar(val, "General", "HEALTHDROPCANCEL")
        HealBot_Options_SetText(HealBot_Options_HealthDropCancel, HEALBOT_OPTION_HEALTHDROPCANCEL..": "..floor(val/10).."%")
        HealBot_Timers_Set("SKINS","FluidFlashInUse")
    end
end

function HealBot_Options_OverrideBarFreq_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_OverrideBarFreq_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif HealBot_Globals.OverrideEffects["FLUIDFREQ"]~=val then
        HealBot_Globals.OverrideEffects["FLUIDFREQ"]=val;
        HealBot_Timers_Set("LAST","BarFreqVars")
    end
end

function HealBot_Options_BarFreq_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BarFreq_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetVar("General", "FLUIDFREQ")~=val then
        hbv_Skins_SetVar(val, "General", "FLUIDFREQ")
        HealBot_Timers_Set("LAST","BarFreqVars")
    end
end

function HealBot_Options_HotBarHealthThres_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HotBarHealthThres_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetVar("General", "HOTBARHLTH")~=val then
        hbv_Skins_SetVar(val, "General", "HOTBARHLTH")
        HealBot_Options_SetText(HealBot_Options_HotBarHealthThres, HEALBOT_OPTION_HOTBARHEALTHPCT..val.."%")
        HealBot_Timers_Set("LAST","BarFreqVars")
    end
end

function HealBot_Options_GroupHealthMinUnits_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HotBarHealthThres_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetVar("General", "GHMINUNITS")~=val then
        hbv_Skins_SetVar(val, "General", "GHMINUNITS")
        HealBot_Options_SetText(HealBot_Options_GroupHealthMinUnits, HEALBOT_OPTIONS_MINUNITS.." "..val)
        HealBot_Timers_Set("LAST","BarFreqVars")
    end
end

function HealBot_Options_GroupHealthThres_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_HotBarHealthThres_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetVar("General", "GHTHRESHOLD")~=val then
        hbv_Skins_SetVar(val, "General", "GHTHRESHOLD")
        HealBot_Options_SetText(HealBot_Options_GroupHealthThres, HEALBOT_PLUGIN_AURAWATCHHEALTHBELOW.." "..val.."%")
        HealBot_Timers_Set("LAST","BarFreqVars")
    end
end

function HealBot_Options_NumTestTanks_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_NumTestTanks_OnValueChanged")
    local v=floor(self:GetValue()+0.5)
    if v~=self:GetValue() then
        self:SetValue(v)
    elseif HealBot_Globals.TestBars["TANKS"]~=v then
        HealBot_Globals.TestBars["TANKS"]=v;
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. v);
        HealBot_Panel_resetTestCols()
        HealBot_Options_framesChanged(true, true, true, true, true)
    end
end

function HealBot_Options_NumberTestHealers_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_NumberTestHealers_OnValueChanged")
    local v=floor(self:GetValue()+0.5)
    if v~=self:GetValue() then
        self:SetValue(v)
    elseif HealBot_Globals.TestBars["HEALERS"]~=v then
        HealBot_Globals.TestBars["HEALERS"]=v;
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. v);
        HealBot_Panel_resetTestCols()
        HealBot_Options_framesChanged(true, true, true, true, true)
    end
end

function HealBot_Options_NumTestMyTargets_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_NumTestMyTargets_OnValueChanged")
    local v=floor(self:GetValue()+0.5)
    if v~=self:GetValue() then
        self:SetValue(v)
    elseif HealBot_Globals.TestBars["TARGETS"]~=v then
        HealBot_Globals.TestBars["TARGETS"]=v;
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. v);
        HealBot_Panel_resetTestCols()
        HealBot_Options_framesChanged(true, true, true, true, true)
    end
end

function HealBot_Options_NumTestPets_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_NumTestPets_OnValueChanged")
    local v=floor(self:GetValue()+0.5)
    if v~=self:GetValue() then
        self:SetValue(v)
    elseif HealBot_Globals.TestBars["PETS"]~=v then
        HealBot_Globals.TestBars["PETS"]=v;
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. v);
        HealBot_Panel_resetTestCols()
        HealBot_Options_framesChanged(true, true, true, true, true)
    end
end

function HealBot_Options_NumberTestEnemy_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_NumberTestEnemy_OnValueChanged")
    local v=floor(self:GetValue()+0.5)
    if v~=self:GetValue() then
        self:SetValue(v)
    elseif HealBot_Globals.TestBars["ENEMY"]~=v then
        HealBot_Globals.TestBars["ENEMY"]=v;
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. v);
        HealBot_Panel_resetTestCols()
        HealBot_Options_framesChanged(true, true, true, true, true)
    end
end

function HealBot_Options_IgnoreDebuffsDuration_setAura()
      --HealBot_setCall("HealBot_Options_IgnoreDebuffsDuration_setAura")
    if HealBot_Config_Cures.IgnoreOnCooldownDebuffs then
        HealBot_Aura_setLuVars("IgnoreFastDurDebuffsSecs", HealBot_Config_Cures.IgnoreFastDurDebuffsSecs/2)
    else
        HealBot_Aura_setLuVars("IgnoreFastDurDebuffsSecs", -1)
    end
end

function HealBot_Options_IgnoreDebuffsDuration_OnClick(self)
      --HealBot_setCall("HealBot_Options_IgnoreDebuffsDuration_OnClick")
    if HealBot_Config_Cures.IgnoreFastDurDebuffs~=self:GetChecked() then
        HealBot_Config_Cures.IgnoreFastDurDebuffs=self:GetChecked()
        HealBot_Options_IgnoreDebuffsDuration_setAura()
    end
end

function HealBot_Options_IgnoreDebuffsCoolDown_OnClick(self)
      --HealBot_setCall("HealBot_Options_IgnoreDebuffsCoolDown_OnClick")
    if HealBot_Config_Cures.IgnoreOnCooldownDebuffs~=self:GetChecked() then
        HealBot_Config_Cures.IgnoreOnCooldownDebuffs=self:GetChecked()
        HealBot_Aura_resetSpellCD()
        HealBot_Timers_Set("AURA","ResetDebuffCache")
    end
end

function HealBot_Options_IgnoreDebuffsFriend_OnClick(self)
      --HealBot_setCall("HealBot_Options_IgnoreDebuffsFriend_OnClick")
    if HealBot_Config_Cures.IgnoreFriendDebuffs~=self:GetChecked() then
        HealBot_Config_Cures.IgnoreFriendDebuffs=self:GetChecked()
        HealBot_Timers_Set("AURA","ResetDebuffCache")
    end
end

function HealBot_Options_IgnoreCannotDispell_OnClick(self)
      --HealBot_setCall("HealBot_Options_IgnoreDebuffsFriend_OnClick")
    if HealBot_Config_Cures.IgnoreCannotDispell~=self:GetChecked() then
        HealBot_Config_Cures.IgnoreCannotDispell=self:GetChecked()
        HealBot_Timers_Set("AURA","ResetDebuffCache")
    end
end

function HealBot_Options_IgnoreDebuffsDurationSecs_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_IgnoreDebuffsDurationSecs_OnValueChanged")
    local v=floor(self:GetValue()+0.5)
    if v~=self:GetValue() then
        self:SetValue(v)
    elseif HealBot_Config_Cures.IgnoreFastDurDebuffsSecs~=v then
        HealBot_Config_Cures.IgnoreFastDurDebuffsSecs=v;
        local g=_G[self:GetName()]
        HealBot_Options_SetText(g, self.text .. ": " .. (v/2) .." Seconds")
        HealBot_Options_IgnoreDebuffsDuration_setAura()
    end
end

function HealBot_Options_OverrideCastNotifyResOnly_OnClick(self)
      --HealBot_setCall("HealBot_Options_OverrideCastNotifyResOnly_OnClick")
    if HealBot_Globals.OverrideChat["RESONLY"]~=self:GetChecked() then
        HealBot_Globals.OverrideChat["RESONLY"]=self:GetChecked()
        HealBot_Timers_Set("CHAT","SetChat")
    end
end

function HealBot_Options_CastNotifyResOnly_OnClick(self)
      --HealBot_setCall("HealBot_Options_CastNotifyResOnly_OnClick")
    if hbv_Skins_GetBoolean("Chat", "RESONLY")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Chat", "RESONLY")
        HealBot_Timers_Set("CHAT","SetChat")
    end
end

function HealBot_Options_BarNumGroupPerCol_OnClick(self)
      --HealBot_setCall("HealBot_Options_BarNumGroupPerCol_OnClick")
    if hbv_Skins_GetFrameBoolean("HealBar", "GRPCOLS", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "HealBar", "GRPCOLS", hb_lVars["Frame"])
        HealBot_Options_BarNumColsSText:SetText(HealBot_Options_SetNoColsText() .. ": " .. hbv_Skins_GetFrameVar("HealBar", "NUMCOLS", hb_lVars["Frame"]))
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_ShowPowerCounter_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowPowerCounter_OnClick")
    if self:GetChecked()~=hbv_Skins_GetFrameBoolean("HealBar", "POWERCNT", hb_lVars["Frame"]) then
        hbv_Skins_SetFrameVar(self:GetChecked(), "HealBar", "POWERCNT", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","PowerIndicator")
        HealBot_Options_framesChanged(false, false, true)
    end
end

function HealBot_Options_ShowTooltipMyBuffs_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipMyBuffs_OnClick")
    HealBot_Globals.Tooltip_ShowMyBuffs=self:GetChecked()
end

function HealBot_Options_ShowTooltipGuild_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipGuild_OnClick")
    HealBot_Globals.Tooltip_ShowGuild=self:GetChecked()
end

function HealBot_Options_ShowTooltipGuildTitle_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipGuild_OnClick")
    HealBot_Globals.Tooltip_ShowGuildTitle=self:GetChecked()
end

function HealBot_Options_ShowTooltipGuildRank_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipGuild_OnClick")
    HealBot_Globals.Tooltip_ShowGuildRank=self:GetChecked()
end

function HealBot_Options_ShowTooltipTitle_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipTitle_OnClick")
    HealBot_Globals.Tooltip_ShowTitle=self:GetChecked()
end

function HealBot_Options_ShowTooltipRequiredBuffs_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipRequiredBuffs_OnClick")
    HealBot_Globals.Tooltip_ShowRequiredBuffs=self:GetChecked()
end

function HealBot_Options_ShowTooltipDebuffs_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipDebuffs_OnClick")
    HealBot_Globals.Tooltip_ShowDebuffs=self:GetChecked()
end

function HealBot_Options_ShowTooltipLevel_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipLevel_OnClick")
    HealBot_Globals.Tooltip_ShowLevel=self:GetChecked()
    HealBot_Timers_Set("LAST","LoadTips")
end

function HealBot_Options_ShowTooltipSpec_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipSpec_OnClick")
    HealBot_Globals.Tooltip_ShowSpec=self:GetChecked()
    HealBot_Timers_Set("LAST","LoadTips")
end

function HealBot_Options_ShowTooltipHealthLine_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipHealthLine_OnClick")
    HealBot_Globals.Tooltip_ShowHealth=self:GetChecked()
    HealBot_Timers_Set("LAST","LoadTips")
end

function HealBot_Options_ShowTooltipManaLine_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipManaLine_OnClick")
    HealBot_Globals.Tooltip_ShowMana=self:GetChecked()
    HealBot_Timers_Set("LAST","LoadTips")
end

function HealBot_Options_ShowTooltipRanks_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipRanks_OnClick")
    HealBot_Globals.Tooltip_ShowRank=self:GetChecked()
    HealBot_Timers_Set("LAST","LoadTips")
end

function HealBot_Options_UseGameTooltip_OnClick(self)
      --HealBot_setCall("HealBot_Options_UseGameTooltip_OnClick")
    if HealBot_Globals.Tooltip_UseGameTooltip~=self:GetChecked() then
        HealBot_Globals.Tooltip_UseGameTooltip=self:GetChecked()
        HealBot_Globals.Tooltip_UseGameTooltip=self:GetChecked()
        HealBot_Options_SetTooltipState()
        if hb_lVars["TIPLOADED"] and hb_lVars["OPTIONSTIPVISIBLE"] then
            HealBot_Tooltip_Hide()
            HealBot_Tooltip_Init()
            HealBot_Options_Show_Help("TOOLTIPUSEGAME",true)
        end
    end
end

function HealBot_Options_ShowTooltipRoles_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipRoles_OnClick")
    HealBot_Globals.Tooltip_ShowRole=self:GetChecked()
    HealBot_Timers_Set("LAST","LoadTips")
end

function HealBot_Options_ShowTooltipHideRoleWhenRank_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipHideRoleWhenRank_OnClick")
    HealBot_Globals.Tooltip_HideRoleWhenRank=self:GetChecked()
    HealBot_Timers_Set("LAST","LoadTips")
end

function HealBot_EmergBarColBuff_OnClick(self)
      --HealBot_setCall("HealBot_EmergBarColBuff_OnClick")
    if hbv_Skins_GetFrameBoolean("Emerg", "BUFFBARCOL", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Emerg", "BUFFBARCOL", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","UpdateEmergBars")
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_Timers_Set("LAST","UpdateEmergIconGlow")
    end
end

function HealBot_EmergBarColBuffGlowMissing_OnClick(self)
      --HealBot_setCall("HealBot_EmergBarColBuffGlowMissing_OnClick")
    if hbv_Skins_GetFrameBoolean("Emerg", "BUFFGLOWONLYMISSING", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Emerg", "BUFFGLOWONLYMISSING", hb_lVars["Frame"])
        HealBot_Timers_Set("LAST","UpdateEmergIconGlow")
    end
end

function HealBot_EmergBarColDebuff_OnClick(self)
      --HealBot_setCall("HealBot_EmergBarColDebuff_OnClick")
    if hbv_Skins_GetFrameBoolean("Emerg", "DEBUFFBARCOL", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Emerg", "DEBUFFBARCOL", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","UpdateEmergBars")
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_Timers_Set("LAST","UpdateEmergIconGlow")
    end
end

function HealBot_EmergBarColDebuffGlowDispellable_OnClick(self)
      --HealBot_setCall("HealBot_EmergBarColDebuffGlowDispellable_OnClick")
    if hbv_Skins_GetFrameBoolean("Emerg", "DEBUFFGLOWONLYDISPEL", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Emerg", "DEBUFFGLOWONLYDISPEL", hb_lVars["Frame"])
        HealBot_Timers_Set("LAST","UpdateEmergIconGlow")
    end
end

function HealBot_Options_AbsorbShield_OnClick(self)
    if hbv_Skins_GetFrameBoolean("BarIACol", "OSHIELD", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarIACol", "OSHIELD", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","OverShield")
    end
end

function HealBot_Options_ShowClassOnBar_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowClassOnBar_OnClick")
    if hbv_Skins_GetFrameBoolean("BarText", "CLASSONBAR", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarText", "CLASSONBAR", hb_lVars["Frame"])
        HealBot_RaidTargetToggle(nil)
        HealBot_Timers_Set("AURA","ResetClassIconTexture")
        if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
            if hb_lVars["TestBarsOn"] then
                HealBot_Timers_Set("SKINS","UpdateTextButtons")
            else
                HealBot_Timers_Set("SKINS","TextUpdateNames")
            end
        end
    end
end

function HealBot_Options_ShowNameOnBar_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowNameOnBar_OnClick")
    if hbv_Skins_GetFrameBoolean("BarText", "NAMEONBAR", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarText", "NAMEONBAR", hb_lVars["Frame"])
        if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
            if hb_lVars["TestBarsOn"] then
                HealBot_Timers_Set("SKINS","UpdateTextButtons")
            else
                HealBot_Timers_Set("SKINS","TextUpdateNames")
            end
        end
    end
end

function HealBot_Options_NameTextDeadCol_OnClick(self)
      --HealBot_setCall("HealBot_Options_NameTextDeadCol_OnClick")
    if self:GetChecked()~=hbv_Skins_GetFrameBoolean("BarTextCol", "RIP", hb_lVars["Frame"]) then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarTextCol", "RIP", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","TextUpdateNames")
    end
end

function HealBot_Options_StateTextDeadCol_OnClick(self)
      --HealBot_setCall("HealBot_Options_StateTextDeadCol_OnClick")
    if self:GetChecked()~=hbv_Skins_GetFrameBoolean("BarTextCol", "SRIP", hb_lVars["Frame"]) then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarTextCol", "SRIP", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","TextUpdateState")
    end
end

function HealBot_Options_NameTextResCol_OnClick(self)
      --HealBot_setCall("HealBot_Options_NameTextResCol_OnClick")
    if self:GetChecked()~=hbv_Skins_GetFrameBoolean("BarTextCol", "RES", hb_lVars["Frame"]) then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarTextCol", "RES", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","TextUpdateNames")
    end
end

function HealBot_Options_StateTextResCol_OnClick(self)
      --HealBot_setCall("HealBot_Options_StateTextResCol_OnClick")
    if self:GetChecked()~=hbv_Skins_GetFrameBoolean("BarTextCol", "SRES", hb_lVars["Frame"]) then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarTextCol", "SRES", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","TextUpdateState")
    end
end

function HealBot_Options_NameTextSummonCol_OnClick(self)
      --HealBot_setCall("HealBot_Options_NameTextSummonCol_OnClick")
    if self:GetChecked()~=hbv_Skins_GetFrameBoolean("BarTextCol", "SUM", hb_lVars["Frame"]) then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarTextCol", "SUM", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","TextUpdateNames")
    end
end

function HealBot_Options_StateTextSummonCol_OnClick(self)
      --HealBot_setCall("HealBot_Options_StateTextSummonCol_OnClick")
    if self:GetChecked()~=hbv_Skins_GetFrameBoolean("BarTextCol", "SSUM", hb_lVars["Frame"]) then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarTextCol", "SSUM", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","TextUpdateState")
    end
end

function HealBot_Options_StateOnlyTooltip_OnClick(self)
      --HealBot_setCall("HealBot_Options_StateOnlyTooltip_OnClick")
    if self:GetChecked()~=hbv_Skins_GetFrameBoolean("BarText", "TAGSTATEONLYTIP", hb_lVars["Frame"]) then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarText", "TAGSTATEONLYTIP", hb_lVars["Frame"])
        if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
            if hb_lVars["TestBarsOn"] then
                HealBot_Timers_Set("SKINS","UpdateTextButtons")
            else
                HealBot_Timers_Set("SKINS","TextUpdateState")
            end
        end
    end
end

function HealBot_Options_HealthAnchor_Options()
      --HealBot_setCall("HealBot_Options_HealthAnchor_Options")
    if hbv_Skins_GetFrameVar("BarText", "HLTHTXTANCHOR", hb_lVars["Frame"]) == 4 then
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HealthFontName",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HealthFontHeight",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HealthFontOffset",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HealthTextHorOffset",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HealthMaxChars",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HealthTextOutLine",false)
        HealBot_Options_HealthTextColourDebuff:Hide()
        HealBot_Options_HealthTextDisAlpha:Hide()
        HealBot_Options_HealthTextAlpha:Hide()
        HealBot_HealthTextCustomColourHealthy:Hide()
        HealBot_HealthTextCustomColourInjured:Hide()
        HealBot_HealthTextCustomColourCritical:Hide()
        HealBot_HealthTextCustomColourHealthyEnemy:Hide()
        HealBot_HealthTextCustomColourInjuredEnemy:Hide()
        HealBot_HealthTextCustomColourCriticalEnemy:Hide()
        HealBot_HealthTextCustomColour:Hide()
        HealBot_Options_HealthTextColour:Hide()
        HealBot_Options_BarHealthCustomColour:Show()
        HealBot_ExtraHealthCustomColour:Show()
        HealBot_Options_SkinBarExtraHealthPresetColour:Show()
    else
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HealthFontName",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HealthFontHeight",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HealthFontOffset",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HealthTextHorOffset",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HealthMaxChars",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HealthTextOutLine",true)
        HealBot_Options_HealthTextColourDebuff:Show()
        HealBot_Options_HealthTextDisAlpha:Show()
        HealBot_Options_HealthTextAlpha:Show()
        HealBot_HealthTextCustomColourHealthy:Show()
        HealBot_HealthTextCustomColourInjured:Show()
        HealBot_HealthTextCustomColourCritical:Show()
        HealBot_HealthTextCustomColourHealthyEnemy:Show()
        HealBot_HealthTextCustomColourInjuredEnemy:Show()
        HealBot_HealthTextCustomColourCriticalEnemy:Show()
        HealBot_HealthTextCustomColour:Show()
        HealBot_Options_HealthTextColour:Show()
        HealBot_Options_BarHealthCustomColour:Hide()
        HealBot_ExtraHealthCustomColour:Hide()
        HealBot_Options_SkinBarExtraHealthPresetColour:Hide()
    end
end

function HealBot_Options_StateUseNameFontString_Options()
      --HealBot_setCall("HealBot_Options_StateUseNameFontString_Options")
    if hbv_Skins_GetFrameVar("BarText", "STATETXTANCHOR", hb_lVars["Frame"]) == 4 or
       hbv_Skins_GetFrameVar("BarText", "STATETXTANCHOR", hb_lVars["Frame"]) == 6 then
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_StateFontName",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_StateFontHeight",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_StateTextOutLine",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_StateFontOffset",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_StateTextHorOffset",false)
        HealBot_StateTextCustomColour:Hide()
        HealBot_Options_StateTextAlpha:Hide()
        HealBot_Options_StateTextDisAlpha:Hide()
        HealBot_StateTextDeadCol:Hide()
        HealBot_StateTextDeadColb:Hide()
        HealBot_Options_StateTextDeadCol:Hide()
        HealBot_Options_SkinStateDeadColPresetColour:Hide()
        HealBot_StateTextResCol:Hide()
        HealBot_StateTextResColb:Hide()
        HealBot_Options_StateTextResCol:Hide()
        HealBot_Options_SkinStateResColPresetColour:Hide()
        HealBot_StateTextSummonCol:Hide()
        HealBot_StateTextSummonColb:Hide()
        HealBot_Options_StateTextSummonCol:Hide()
        HealBot_Options_SkinStateSummonColPresetColour:Hide()
        HealBot_StateTextCustomColourHealthy:Hide()
        HealBot_StateTextCustomColourInjured:Hide()
        HealBot_StateTextCustomColourCritical:Hide()
        HealBot_StateTextCustomColourHealthyEnemy:Hide()
        HealBot_StateTextCustomColourInjuredEnemy:Hide()
        HealBot_StateTextCustomColourCriticalEnemy:Hide()
        HealBot_Options_StateTextColour:Hide()
        HealBot_Options_Skins_StateTextColNotAvail:Show()
    else
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_StateFontName",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_StateFontHeight",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_StateTextOutLine",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_StateFontOffset",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_StateTextHorOffset",true)
        HealBot_StateTextCustomColour:Show()
        HealBot_Options_StateTextAlpha:Show()
        HealBot_Options_StateTextDisAlpha:Show()
        HealBot_StateTextDeadCol:Show()
        HealBot_StateTextDeadColb:Show()
        HealBot_Options_StateTextDeadCol:Show()
        HealBot_Options_SkinStateDeadColPresetColour:Show()
        HealBot_StateTextResCol:Show()
        HealBot_StateTextResColb:Show()
        HealBot_Options_StateTextResCol:Show()
        HealBot_Options_SkinStateResColPresetColour:Show()
        HealBot_StateTextSummonCol:Show()
        HealBot_StateTextSummonColb:Show()
        HealBot_Options_StateTextSummonCol:Show()
        HealBot_Options_SkinStateSummonColPresetColour:Show()
        HealBot_StateTextCustomColourHealthy:Show()
        HealBot_StateTextCustomColourInjured:Show()
        HealBot_StateTextCustomColourCritical:Show()
        HealBot_StateTextCustomColourHealthyEnemy:Show()
        HealBot_StateTextCustomColourInjuredEnemy:Show()
        HealBot_StateTextCustomColourCriticalEnemy:Show()
        HealBot_Options_StateTextColour:Show()
        HealBot_Options_Skins_StateTextColNotAvail:Hide()
    end
    HealBot_Options_SetBarsStateTextColour()
    if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
        HealBot_Timers_Set("SKINS","TextUpdateState")
        if hb_lVars["TestBarsOn"] then
            HealBot_Timers_Set("SKINS","UpdateTextButtons")
        else
            HealBot_Timers_Set("SKINS","TextUpdateNames")
        end
    end
end

function HealBot_Options_libUTF8_OnClick(self)
      --HealBot_setCall("HealBot_Options_libUTF8_OnClick")
    if HealBot_Globals.useUTF8~=self:GetChecked() then
        HealBot_Globals.useUTF8=self:GetChecked()
        HealBot_Timers_Set("SKINS","TextUpdateNames")
    end
end

function HealBot_Options_UseStickyFrames_OnClick(self)
      --HealBot_setCall("HealBot_Options_UseStickyFrames_OnClick")
    if hbv_Skins_GetBoolean("General", "STICKYFRAME")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "General", "STICKYFRAME")
        if not self:GetChecked() then
            HealBot_Action_StickyFrameClearStuck()
            HealBot_Options_ActionAnchor_SetAlpha(hb_lVars["Frame"])
        end
        HealBot_Timers_FramesSetPoint()
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_NotInUseOpacity_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_NotInUseOpacity_OnValueChanged")
    local val=HealBot_Util_Round(self:GetValue(),1)
    val=val/10;
    if hbv_Skins_GetVar("General", "GLOBALDIMMING")~=val then
        hbv_Skins_SetVar(val, "General", "GLOBALDIMMING")
        HealBot_Timers_Set("SKINS","ResetGlobalDimming")
    end
end

function HealBot_Options_OverridePartyFrames_OnClick(self)
      --HealBot_setCall("HealBot_Options_OverridePartyFrames_OnClick")
    if HealBot_Globals.OverrideFrames["HIDEPARTYF"]~=self:GetChecked() then
        HealBot_Globals.OverrideFrames["HIDEPARTYF"]=self:GetChecked()
        HealBot_Options_SetFrames()
        HealBot_Timers_Set("OOC","TogglePartyFrames")
    end
end

function HealBot_Options_PartyFrames_OnClick(self)
      --HealBot_setCall("HealBot_Options_PartyFrames_OnClick")
    if hbv_Skins_GetBoolean("General", "HIDEPARTYF")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "General", "HIDEPARTYF")
        HealBot_Options_SetFrames()
        HealBot_Timers_Set("OOC","TogglePartyFrames")
    end
end

function HealBot_Options_OverrideAlwaysRunEvents_OnClick(self)
      --HealBot_setCall("HealBot_Options_OverrideAlwaysRunEvents_OnClick")
    if HealBot_Globals.OverrideFrames["RUNBLIZZEVENTS"]~=self:GetChecked() then
        HealBot_Globals.OverrideFrames["RUNBLIZZEVENTS"]=self:GetChecked()
        HealBot_Options_SetFrames()
    end
end

function HealBot_Options_AlwaysRunEvents_OnClick(self)
      --HealBot_setCall("HealBot_Options_AlwaysRunEvents_OnClick")
    if hbv_Skins_GetBoolean("General", "RUNBLIZZEVENTS")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "General", "RUNBLIZZEVENTS")
        HealBot_Options_SetFrames()
    end
end

function HealBot_Options_OverridePlayerTargetFrames_OnClick(self)
      --HealBot_setCall("HealBot_Options_OverridePlayerTargetFrames_OnClick")
    if HealBot_Globals.OverrideFrames["HIDEPTF"]~=self:GetChecked() then
        HealBot_Globals.OverrideFrames["HIDEPTF"]=self:GetChecked()
        HealBot_Options_SetFrames()
        HealBot_Timers_Set("OOC","TogglePartyFrames")
    end
end

function HealBot_Options_PlayerTargetFrames_OnClick(self)
      --HealBot_setCall("HealBot_Options_PlayerTargetFrames_OnClick")
    if hbv_Skins_GetBoolean("General", "HIDEPTF")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "General", "HIDEPTF")
        HealBot_Options_SetFrames()
        HealBot_Timers_Set("OOC","TogglePartyFrames")
    end
end

function HealBot_Options_OverrideMiniBossFrames_OnClick(self)
      --HealBot_setCall("HealBot_Options_OverrideMiniBossFrames_OnClick")
    if HealBot_Globals.OverrideFrames["HIDEBOSSF"]~=self:GetChecked() then
        HealBot_Globals.OverrideFrames["HIDEBOSSF"]=self:GetChecked()
        HealBot_Options_SetFrames()
        HealBot_Timers_Set("OOC","ToggleMiniBossFrames")
    end
end

function HealBot_Options_MiniBossFrames_OnClick(self)
      --HealBot_setCall("HealBot_Options_MiniBossFrames_OnClick")
    if hbv_Skins_GetBoolean("General", "HIDEBOSSF")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "General", "HIDEBOSSF")
        HealBot_Options_SetFrames()
        HealBot_Timers_Set("OOC","ToggleMiniBossFrames")
    end
end

function HealBot_Options_OverrideFocusFrame_OnClick(self)
      --HealBot_setCall("HealBot_Options_OverrideFocusFrame_OnClick")
    if HealBot_Globals.OverrideFrames["HIDEFOCUSF"]~=self:GetChecked() then
        HealBot_Globals.OverrideFrames["HIDEFOCUSF"]=self:GetChecked()
        HealBot_Options_SetFrames()
        HealBot_Timers_Set("OOC","ToggleFocusFrame")
    end
end

function HealBot_Options_FocusFrame_OnClick(self)
      --HealBot_setCall("HealBot_Options_FocusFrame_OnClick")
    if hbv_Skins_GetBoolean("General", "HIDEFOCUSF")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "General", "HIDEFOCUSF")
        HealBot_Options_SetFrames()
        HealBot_Timers_Set("OOC","ToggleFocusFrame")
    end
end

function HealBot_Options_OverrideRaidFrames_OnClick(self)
      --HealBot_setCall("HealBot_Options_OverrideRaidFrames_OnClick")
    if HealBot_Globals.OverrideFrames["HIDERAIDF"]~=self:GetChecked() then
        HealBot_Globals.OverrideFrames["HIDERAIDF"]=self:GetChecked()
        HealBot_Options_SetFrames()
        HealBot_Timers_Set("OOC","ToggleRaidFrames")
    end
end

function HealBot_Options_RaidFrames_OnClick(self)
      --HealBot_setCall("HealBot_Options_RaidFrames_OnClick")
    if hbv_Skins_GetBoolean("General", "HIDERAIDF")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "General", "HIDERAIDF")
        HealBot_Options_SetFrames()
        HealBot_Timers_Set("OOC","ToggleRaidFrames")
    end
end

function HealBot_Options_AggroTrack_OnClick(self)
      --HealBot_setCall("HealBot_Options_AggroTrack_OnClick")
    if self:GetChecked()~=hbv_Skins_GetFrameBoolean("BarAggro", "SHOW", hb_lVars["Frame"]) then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarAggro", "SHOW", hb_lVars["Frame"])
        HealBot_Options_framesChanged(false, false, true)
        --HealBot_Timers_Set("SKINS","SkinsFormat")
        HealBot_Timers_Set("LAST","RegAggro")
        HealBot_Options_framesChanged(true)
    end
end

function HealBot_Options_AggroHazard_OnClick(self)
      --HealBot_setCall("HealBot_Options_AggroHazard_OnClick")
    if self:GetChecked()~=hbv_Skins_GetFrameBoolean("BarAggro", "HAZARD", hb_lVars["Frame"]) then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarAggro", "HAZARD", hb_lVars["Frame"])
    end
end

function HealBot_Options_AggroTargeted_OnClick(self)
      --HealBot_setCall("HealBot_Options_AggroTargeted_OnClick")
    if self:GetChecked()~=hbv_Skins_GetFrameBoolean("BarAggro", "TARGETED", hb_lVars["Frame"]) then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarAggro", "TARGETED", hb_lVars["Frame"])
    end
end

function HealBot_Options_AggroTargetedBossOnly_OnClick(self)
      --HealBot_setCall("HealBot_Options_AggroTargetedBossOnly_OnClick")
    if self:GetChecked()~=hbv_Skins_GetFrameBoolean("BarAggro", "TARBOSSONLY", hb_lVars["Frame"]) then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarAggro", "TARBOSSONLY", hb_lVars["Frame"])
    end
end

function HealBot_Options_FluidFlashInUse()
      --HealBot_setCall("HealBot_Options_FluidFlashInUse")
    if HealBot_Globals.CPUUsage>7 then
        if HealBot_Globals.OverrideEffects["USE"] == 1 then
            HealBot_setLuVars("UseHealthDrop", hbv_Skins_GetBoolean("General", "HEALTHDROP"))
            HealBot_Action_setLuVars("HealthDropTime", hbv_Skins_GetVar("General", "HEALTHDROPTIME"))
            HealBot_setLuVars("HealthDropCancelPct", hbv_Skins_GetVar("General", "HEALTHDROPCANCEL"))
        else
            HealBot_setLuVars("UseHealthDrop", HealBot_Globals.OverrideEffects["HEALTHDROP"])
            HealBot_Action_setLuVars("HealthDropTime", HealBot_Globals.OverrideEffects["HEALTHDROPTIME"])
            HealBot_setLuVars("HealthDropCancelPct", HealBot_Globals.OverrideEffects["HEALTHDROPCANCEL"])
        end
        if HealBot_Globals.OverrideEffects["USEBARS"] == 1 then
            HealBot_Aux_FluidInUseSet(hbv_Skins_GetBoolean("General", "FLUIDBARS"))
            HealBot_Action_setLuVars("FluidInUse", hbv_Skins_GetBoolean("General", "FLUIDBARS"))
        else
            HealBot_Aux_FluidInUseSet(HealBot_Globals.OverrideEffects["FLUIDBARS"])
            HealBot_Action_setLuVars("FluidInUse", HealBot_Globals.OverrideEffects["FLUIDBARS"])
        end
    else
        HealBot_Aux_FluidInUseSet(false)
        HealBot_Action_setLuVars("FluidInUse", false)
        HealBot_setLuVars("UseHealthDrop", false)
    end
    if HealBot_Globals.OverrideEffects["USE"] == 1 then
        HealBot_setLuVars("HealthDropPct", hbv_Skins_GetVar("General", "HEALTHDROPPCT"))
    else
        HealBot_setLuVars("HealthDropPct", HealBot_Globals.OverrideEffects["HEALTHDROPPCT"])
    end
end

function HealBot_Options_OverrideUseHealthDrop_OnClick(self)
      --HealBot_setCall("HealBot_Options_OverrideUseHealthDrop_OnClick")
    if self:GetChecked()~=HealBot_Globals.OverrideEffects["HEALTHDROP"] then
        HealBot_Globals.OverrideEffects["HEALTHDROP"]=self:GetChecked()
        HealBot_Timers_Set("SKINS","FluidFlashInUse")
    end
end

function HealBot_Options_OverrideUseFluidBars_OnClick(self)
      --HealBot_setCall("HealBot_Options_OverrideUseFluidBars_OnClick")
    if self:GetChecked()~=HealBot_Globals.OverrideEffects["FLUIDBARS"] then
        HealBot_Globals.OverrideEffects["FLUIDBARS"]=self:GetChecked()
        HealBot_Timers_Set("SKINS","FluidFlashInUse")
    end
end

function HealBot_Options_OverrideColoursHidePowerAlt_OnClick(self)
      --HealBot_setCall("HealBot_Options_OverrideColoursHidePowerAlt")
    if self:GetChecked()~=HealBot_Globals.OverrideColours["HIDEALT"] then
        HealBot_Globals.OverrideColours["HIDEALT"]=self:GetChecked()
        HealBot_Timers_Set("AUX","UpdateAllAuxPowerBars")
    end
end

function HealBot_Options_SkinColHidePowerAlt_OnClick(self)
      --HealBot_setCall("HealBot_Options_SkinColHidePowerAlt_OnClick")
    if self:GetChecked()~=hbv_Skins_GetBoolean("General", "HIDEALT") then
        hbv_Skins_SetVar(self:GetChecked(), "General", "HIDEALT")
        HealBot_Timers_Set("AUX","UpdateAllAuxPowerBars")
    end
end

function HealBot_Options_OverrideEFGroupRaidOnly_OnClick(self)
      --HealBot_setCall("HealBot_Options_OverrideEFGroupRaidOnly_OnClick")
    if self:GetChecked()~=HealBot_Globals.OverrideEffects["FGRAIDONLY"] then
        HealBot_Globals.OverrideEffects["FGRAIDONLY"]=self:GetChecked()
        HealBot_Timers_Set("SKINS","SetFocusGroups")
    end
end

function HealBot_Options_EFGroupRaidOnly_OnClick(self)
      --HealBot_setCall("HealBot_Options_EFGroupRaidOnly_OnClick")
    if self:GetChecked()~=hbv_Skins_GetBoolean("General", "FGRAIDONLY") then
        hbv_Skins_SetVar(self:GetChecked(), "General", "FGRAIDONLY")
        HealBot_Timers_Set("SKINS","SetFocusGroups")
    end
end

function HealBot_Options_UseHealthDrop_OnClick(self)
      --HealBot_setCall("HealBot_Options_UseHealthDrop_OnClick")
    if self:GetChecked()~=hbv_Skins_GetBoolean("General", "HEALTHDROP") then
        hbv_Skins_SetVar(self:GetChecked(), "General", "HEALTHDROP")
        HealBot_Timers_Set("SKINS","FluidFlashInUse")
    end
end

function HealBot_Options_UseFluidBars_OnClick(self)
      --HealBot_setCall("HealBot_Options_UseFluidBars_OnClick")
    if self:GetChecked()~=hbv_Skins_GetBoolean("General", "FLUIDBARS") then
        hbv_Skins_SetVar(self:GetChecked(), "General", "FLUIDBARS")
        HealBot_Timers_Set("SKINS","FluidFlashInUse")
    end
end

function HealBot_Options_AuxBarOutline_OnClick(self)
      --HealBot_setCall("HealBot_Options_AuxBarOutline_OnClick")
    if hbv_Aux_GetBarVar("OUTLINE", hb_lVars["Frame"], hb_lVars["AuxBar"])~=self:GetChecked() then
        hbv_Data_AuxSetBarVar(self:GetChecked(), "OUTLINE", hb_lVars["Frame"], hb_lVars["AuxBar"])
        HealBot_Action_InitAuxGlow(hb_lVars["AuxBar"], hb_lVars["Frame"])
       -- HealBot_Aux_resetFrameBar(hb_lVars["Frame"], hb_lVars["AuxBar"])
        --HealBot_Options_clearAuxBars(hb_lVars["Frame"], hb_lVars["AuxBar"])
        HealBot_Aux_UpdateAllAuxByType(hb_lVars["Frame"], hb_lVars["AuxBar"])
    end
end

function HealBot_Options_SkinBarAuxBarManaOnly_OnClick(self)
      --HealBot_setCall("HealBot_Options_SkinBarAuxBarManaOnly_OnClick")
    if hbv_Aux_GetBarBoolean("MANAONLY", hb_lVars["Frame"], hb_lVars["AuxBar"])~=self:GetChecked() then
        hbv_Data_AuxSetBarVar(self:GetChecked(), "MANAONLY", hb_lVars["Frame"], hb_lVars["AuxBar"])
        --HealBot_Options_clearAuxBars(hb_lVars["Frame"], hb_lVars["AuxBar"])
        HealBot_Aux_UpdateAllAuxByType(hb_lVars["Frame"], hb_lVars["AuxBar"])
    end
end

function HealBot_Options_SkinBarAuxBarHealersManaOnly_OnClick(self)
      --HealBot_setCall("HealBot_Options_SkinBarAuxBarHealersManaOnly_OnClick")
    if hbv_Aux_GetBarBoolean("HEALERSMANAONLY", hb_lVars["Frame"], hb_lVars["AuxBar"])~=self:GetChecked() then
        hbv_Data_AuxSetBarVar(self:GetChecked(), "HEALERSMANAONLY", hb_lVars["Frame"], hb_lVars["AuxBar"])
        --HealBot_Options_clearAuxBars(hb_lVars["Frame"], hb_lVars["AuxBar"])
        HealBot_Aux_UpdateAllAuxByType(hb_lVars["Frame"], hb_lVars["AuxBar"])
    end
end

function HealBot_Options_SkinBarAuxBarOverlayRecentHeals_OnClick(self)
      --HealBot_setCall("HealBot_Options_SkinBarAuxBarOverlayRecentHeals_OnClick")
    if hbv_Aux_GetOverlayBoolean("OVERLAYRECENTHEALS", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Aux_SetOverlayVar(self:GetChecked(), "OVERLAYRECENTHEALS", hb_lVars["Frame"])
       -- HealBot_Options_clearAuxBars(hb_lVars["Frame"], hb_lVars["AuxBar"])
        HealBot_Aux_UpdateAllAuxByType(hb_lVars["Frame"], hb_lVars["AuxBar"])
    end
end

function HealBot_Options_SkinBarAuxBarOverlayHealthDrop_OnClick(self)
      --HealBot_setCall("HealBot_Options_SkinBarAuxBarOverlayHealthDrop_OnClick")
    if hbv_Aux_GetOverlayBoolean("OVERLAYHEALTHDROP", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Aux_SetOverlayVar(self:GetChecked(), "OVERLAYHEALTHDROP", hb_lVars["Frame"])
       -- HealBot_Options_clearAuxBars(hb_lVars["Frame"], hb_lVars["AuxBar"])
        HealBot_Aux_UpdateAllAuxByType(hb_lVars["Frame"], hb_lVars["AuxBar"])
    end
end

function HealBot_Options_SkinBarAuxBarOverlayAggro_OnClick(self)
      --HealBot_setCall("HealBot_Options_SkinBarAuxBarOverlayAggro_OnClick")
    if hbv_Aux_GetOverlayBoolean("OVERLAYAGGRO", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Aux_SetOverlayVar(self:GetChecked(), "OVERLAYAGGRO", hb_lVars["Frame"])
       -- HealBot_Options_clearAuxBars(hb_lVars["Frame"], hb_lVars["AuxBar"])
        HealBot_Aux_UpdateAllAuxByType(hb_lVars["Frame"], hb_lVars["AuxBar"])
    end
end

function HealBot_Options_SkinBarAuxBarOverlayDebuff_OnClick(self)
      --HealBot_setCall("HealBot_Options_SkinBarAuxBarOverlayDebuff_OnClick")
    if hbv_Aux_GetOverlayBoolean("OVERLAYDEBUFF", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Aux_SetOverlayVar(self:GetChecked(), "OVERLAYDEBUFF", hb_lVars["Frame"])
       -- HealBot_Options_clearAuxBars(hb_lVars["Frame"], hb_lVars["AuxBar"])
        HealBot_Aux_UpdateAllAuxByType(hb_lVars["Frame"], hb_lVars["AuxBar"])
    end
end

function HealBot_Options_SkinBarAuxBarOverlayHighlight_OnClick(self)
      --HealBot_setCall("HealBot_Options_SkinBarAuxBarOverlayHighlight_OnClick")
    if hbv_Aux_GetOverlayBoolean("OVERLAYHIGHLIGHT", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Aux_SetOverlayVar(self:GetChecked(), "OVERLAYHIGHLIGHT", hb_lVars["Frame"])
       -- HealBot_Options_clearAuxBars(hb_lVars["Frame"], hb_lVars["AuxBar"])
        HealBot_Aux_UpdateAllAuxByType(hb_lVars["Frame"], hb_lVars["AuxBar"])
    end
end

function HealBot_Options_SkinBarAuxBarOverlayTarget_OnClick(self)
      --HealBot_setCall("HealBot_Options_SkinBarAuxBarOverlayTarget_OnClick")
    if hbv_Aux_GetOverlayBoolean("OVERLAYTARGET", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Aux_SetOverlayVar(self:GetChecked(), "OVERLAYTARGET", hb_lVars["Frame"])
       -- HealBot_Options_clearAuxBars(hb_lVars["Frame"], hb_lVars["AuxBar"])
        HealBot_Aux_UpdateAllAuxByType(hb_lVars["Frame"], hb_lVars["AuxBar"])
    end
end

function HealBot_Options_SkinBarAuxBarOverlayOOR_OnClick(self)
      --HealBot_setCall("HealBot_Options_SkinBarAuxBarOverlayOOR_OnClick")
    if hbv_Aux_GetOverlayBoolean("OVERLAYOOR", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Aux_SetOverlayVar(self:GetChecked(), "OVERLAYOOR", hb_lVars["Frame"])
       -- HealBot_Options_clearAuxBars(hb_lVars["Frame"], hb_lVars["AuxBar"])
        HealBot_Aux_UpdateAllAuxByType(hb_lVars["Frame"], hb_lVars["AuxBar"])
    end
end

function HealBot_Options_SkinBarAuxBarOverlayBuff_OnClick(self)
      --HealBot_setCall("HealBot_Options_SkinBarAuxBarOverlayBuff_OnClick")
    if hbv_Aux_GetOverlayBoolean("OVERLAYBUFF", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Aux_SetOverlayVar(self:GetChecked(), "OVERLAYBUFF", hb_lVars["Frame"])
       -- HealBot_Options_clearAuxBars(hb_lVars["Frame"], hb_lVars["AuxBar"])
        HealBot_Aux_UpdateAllAuxByType(hb_lVars["Frame"], hb_lVars["AuxBar"])
    end
end

function HealBot_Options_AggroInd_OnClick(self)
      --HealBot_setCall("HealBot_Options_AggroInd_OnClick")
    if hbv_Skins_GetFrameBoolean("BarAggro", "SHOWIND", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarAggro", "SHOWIND", hb_lVars["Frame"])
        HealBot_Options_framesChanged(false, false, true)
    end
end

function HealBot_Options_AggroTxtPct_OnClick(self)
      --HealBot_setCall("HealBot_Options_AggroTxtPct_OnClick")
    if hbv_Skins_GetFrameBoolean("BarText", "TAGAGGROONLYTIP", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarText", "TAGAGGROONLYTIP", hb_lVars["Frame"])
        if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
            if hb_lVars["TestBarsOn"] then
                HealBot_Timers_Set("SKINS","UpdateTextButtons")
            else
                HealBot_Timers_Set("SKINS","TextUpdateAggro")
            end
        end
    end
end

function HealBot_Options_MonitorBuffs_OnClick(self)
      --HealBot_setCall("HealBot_Options_MonitorBuffs_OnClick")
    if HealBot_Config_Buffs.BuffWatch~=self:GetChecked() then
        HealBot_Config_Buffs.BuffWatch=self:GetChecked()
        HealBot_Options_MonitorBuffs_Toggle()
    end
end

function HealBot_Options_MonitorBuffs_Toggle()
      --HealBot_setCall("HealBot_Options_MonitorBuffs_Toggle")
    HealBot_Timers_Set("AURA","BuffReset")
    HealBot_Timers_Set("AURA","PlayerCheckExtended")
    if hb_lVars["TestBarsOn"] and HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then HealBot_Options_framesChanged(true, true) end
end

function HealBot_Options_MonitorDebuffs_OnClick(self)
      --HealBot_setCall("HealBot_Options_MonitorDebuffs_OnClick")
    if HealBot_Config_Cures.DebuffWatch~=self:GetChecked() then
        HealBot_Config_Cures.DebuffWatch=self:GetChecked()
        HealBot_Options_MonitorDebuffs_Toggle()
    end
end

function HealBot_Options_MonitorDebuffs_Toggle()
      --HealBot_setCall("HealBot_Options_MonitorDebuffs_Toggle")
    HealBot_Timers_Set("AURA","DebuffReset")
    HealBot_Timers_Set("AURA","PlayerCheckExtended")
    if hb_lVars["TestBarsOn"] and HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then HealBot_Options_framesChanged(true, true) end
end

function HealBot_Options_MonitorBuffsInCombat_OnClick(self)
      --HealBot_setCall("HealBot_Options_MonitorBuffsInCombat_OnClick")
    if HealBot_Config_Buffs.BuffWatchInCombat~=self:GetChecked() then
        HealBot_Config_Buffs.BuffWatchInCombat=self:GetChecked()
        HealBot_Timers_Set("AURA","BuffReset")
        HealBot_Timers_Set("AURA","PlayerCheckExtended")
    end
end

function HealBot_Options_MonitorCustomBuffsInCombat_OnClick(self)
      --HealBot_setCall("HealBot_Options_MonitorCustomBuffsInCombat_OnClick")
    if HealBot_Config_Buffs.BuffCustomWatchInCombat~=self:GetChecked() then
        HealBot_Config_Buffs.BuffCustomWatchInCombat=self:GetChecked()
        HealBot_Timers_Set("AURA","BuffReset")
        HealBot_Timers_Set("AURA","PlayerCheckExtended")
    end
end

function HealBot_Options_MonitorBuffsWhenMounted_OnClick(self)
      --HealBot_setCall("HealBot_Options_MonitorBuffsWhenMounted_OnClick")
    if HealBot_Config_Buffs.BuffWatchWhenMounted~=self:GetChecked() then
        HealBot_Config_Buffs.BuffWatchWhenMounted=self:GetChecked()
        HealBot_Timers_Set("AURA","BuffReset")
        HealBot_Timers_Set("AURA","PlayerCheckExtended")
    end
end

function HealBot_Options_MonitorExtraBuffsOnlyInInstance_OnClick(self)
      --HealBot_setCall("HealBot_Options_MonitorExtraBuffsOnlyInInstance_OnClick")
    if HealBot_Config_Buffs.ExtraBuffsOnlyInInstance~=self:GetChecked() then
        HealBot_Config_Buffs.ExtraBuffsOnlyInInstance=self:GetChecked()
        HealBot_Timers_Set("LAST","InitItemsData")
        HealBot_Timers_Set("AURA","BuffReset",true)
        HealBot_Timers_Set("AURA","PlayerCheckExtended",true)
    end
end

function HealBot_Options_MonitorBuffsWhenGrouped_OnClick(self)
      --HealBot_setCall("HealBot_Options_MonitorBuffsWhenGrouped_OnClick")
    if HealBot_Config_Buffs.BuffWatchWhenGrouped~=self:GetChecked() then
        HealBot_Config_Buffs.BuffWatchWhenGrouped=self:GetChecked()
        HealBot_Timers_Set("AURA","BuffReset")
        HealBot_Timers_Set("AURA","PlayerCheckExtended")
    end
end

function HealBot_Options_MonitorBuffsPalaBlessing_OnClick(self)
      --HealBot_setCall("HealBot_Options_MonitorBuffsPalaBlessing_OnClick")
    if HealBot_Config_Buffs.PalaBlessingsAsOne~=self:GetChecked() then
        HealBot_Config_Buffs.PalaBlessingsAsOne=self:GetChecked()
        HealBot_Timers_Set("AURA","BuffReset")
    end
end

function HealBot_Options_SkinDefault_OnClick(self, gType)
      --HealBot_setCall("HealBot_Options_SkinDefault_OnClick")
    if hbv_SkinDefault_GetData(Healbot_Config_Skins.Current_Skin,gType)~=self:GetChecked() then
        hbv_SkinDefault_SetData(self:GetChecked(), Healbot_Config_Skins.Current_Skin, gType)
        if self:GetChecked() then
            for x in pairs (Healbot_Config_Skins.Skins) do
                if Healbot_Config_Skins.Skins[x]~=Healbot_Config_Skins.Current_Skin and hbv_SkinDefault_GetData(Healbot_Config_Skins.Skins[x],gType) then
                    hbv_SkinDefault_SetData(false, Healbot_Config_Skins.Skins[x], gType)
                end
            end
        end
    end
end

function HealBot_Options_SkinDefaultSpec_SetText()
      --HealBot_setCall("HealBot_Options_SkinDefaultSpec_SetText")
    HealBot_Options_SetText(HealBot_Options_SkinDefaultSpec,HEALBOT_WORD_SPEC..": "..HealBot_Config.Spec)
    if HealBot_Config.SkinSpecEnabled[HealBot_Config.Spec] and HealBot_Config.SkinSpecEnabled[HealBot_Config.Spec] == Healbot_Config_Skins.Current_Skin then
        HealBot_Options_SkinDefaultSpec:SetChecked(true)
    else
        HealBot_Options_SkinDefaultSpec:SetChecked(false)
    end
end

function HealBot_Options_SkinDefaultSpec_OnClick(self)
      --HealBot_setCall("HealBot_Options_SkinDefaultSpec_OnClick")
    if self:GetChecked() then
        if not HealBot_Config.SkinSpecEnabled[HealBot_Config.Spec] or HealBot_Config.SkinSpecEnabled[HealBot_Config.Spec]~=Healbot_Config_Skins.Current_Skin then
            HealBot_Config.SkinSpecEnabled[HealBot_Config.Spec]=Healbot_Config_Skins.Current_Skin
            HealBot_Options_SkinDefaultSpec_SetText()
        end
    elseif HealBot_Config.SkinSpecEnabled[HealBot_Config.Spec] and HealBot_Config.SkinSpecEnabled[HealBot_Config.Spec] == Healbot_Config_Skins.Current_Skin then
        HealBot_Config.SkinSpecEnabled[HealBot_Config.Spec]=nil
        HealBot_Options_SkinDefaultSpec_SetText()
        HealBot_Timers_Set("OOC","PartyUpdateCheckSkin")
    end
end

function HealBot_Options_SkinDefaultZone_SetText()
      --HealBot_setCall("HealBot_Options_SkinDefaultZone_SetText")
    HealBot_Options_SetText(HealBot_Options_SkinDefaultZone,HEALBOT_WORD_ZONE..": "..hb_lVars["mapName"])
    if HealBot_Config.SkinZoneEnabled[hb_lVars["mapName"]] and HealBot_Config.SkinZoneEnabled[hb_lVars["mapName"]] == Healbot_Config_Skins.Current_Skin then
        HealBot_Options_SkinDefaultZone:SetChecked(true)
    else
        HealBot_Options_SkinDefaultZone:SetChecked(false)
    end
end

function HealBot_Options_SkinDefaultZone_OnClick(self)
      --HealBot_setCall("HealBot_Options_SkinDefaultZone_OnClick")
    if self:GetChecked() then
        if not HealBot_Config.SkinZoneEnabled[hb_lVars["mapName"]] or HealBot_Config.SkinZoneEnabled[hb_lVars["mapName"]]~=Healbot_Config_Skins.Current_Skin then
            HealBot_Config.SkinZoneEnabled[hb_lVars["mapName"]]=Healbot_Config_Skins.Current_Skin
            HealBot_Options_SkinDefaultZone_SetText()
        end
    elseif HealBot_Config.SkinZoneEnabled[hb_lVars["mapName"]] and HealBot_Config.SkinZoneEnabled[hb_lVars["mapName"]] == Healbot_Config_Skins.Current_Skin then
        HealBot_Config.SkinZoneEnabled[hb_lVars["mapName"]]=nil
        HealBot_Options_SkinDefaultZone_SetText()
        HealBot_Timers_Set("OOC","PartyUpdateCheckSkin")
    end
end

function HealBot_Options_ManaIndicatorInCombat_OnClick(self)
      --HealBot_setCall("HealBot_Options_ManaIndicatorInCombat_OnClick")
    hbv_Skins_SetFrameVar(self:GetChecked(), "HealBar", "LOWMANACOMBAT", hb_lVars["Frame"])
end

function HealBot_Options_MonitorDebuffsInCombat_OnClick(self)
      --HealBot_setCall("HealBot_Options_MonitorDebuffsInCombat_OnClick")
    if HealBot_Config_Cures.DebuffWatchInCombat~=self:GetChecked() then
        HealBot_Config_Cures.DebuffWatchInCombat=self:GetChecked()
        HealBot_Timers_Set("AURA","DebuffReset")
        HealBot_Timers_Set("AURA","PlayerCheckExtended")
    end
end

function HealBot_Options_MonitorDebuffsWhenMounted_OnClick(self)
      --HealBot_setCall("HealBot_Options_MonitorDebuffsWhenMounted_OnClick")
    if HealBot_Config_Cures.DebuffWatchWhenMounted~=self:GetChecked() then
        HealBot_Config_Cures.DebuffWatchWhenMounted=self:GetChecked()
        HealBot_Timers_Set("AURA","DebuffReset")
        HealBot_Timers_Set("AURA","PlayerCheckExtended")
    end
end

function HealBot_Options_MonitorDebuffsWhenGrouped_OnClick(self)
      --HealBot_setCall("HealBot_Options_MonitorDebuffsWhenGrouped_OnClick")
    if HealBot_Config_Cures.DebuffWatchWhenGrouped~=self:GetChecked() then
        HealBot_Config_Cures.DebuffWatchWhenGrouped=self:GetChecked()
        HealBot_Timers_Set("AURA","DebuffReset")
        HealBot_Timers_Set("AURA","PlayerCheckExtended")
    end
end

function HealBot_Options_CDCCol_ShowOnHealthBar_OnClick(self)
      --HealBot_setCall("HealBot_Options_CDCCol_ShowOnHealthBar_OnClick")
    if HealBot_Config_Cures.CDCshownHB~=self:GetChecked() then
        HealBot_Config_Cures.CDCshownHB=self:GetChecked()
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_Options_framesChanged(false)
        HealBot_Timers_Set("AURA","CheckDebuffs")
    end
end

function HealBot_Options_ShowOnHealthBarDispelOnly_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowOnHealthBarDispelOnly_OnClick")
    if HealBot_Config_Cures.CDCshownHBDispelOnly~=self:GetChecked() then
        HealBot_Config_Cures.CDCshownHBDispelOnly=self:GetChecked()
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_Options_framesChanged(false)
        HealBot_Timers_Set("AURA","CheckDebuffs")
    end
end

function HealBot_Options_CDCCol_AlwaysEnableBar_OnClick(self)
      --HealBot_setCall("HealBot_Options_CDCCol_AlwaysEnableBar_OnClick")
    if HealBot_Config_Cures.EnableBar~=self:GetChecked() then
        HealBot_Config_Cures.EnableBar=self:GetChecked()
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_Options_framesChanged(false)
        HealBot_Timers_Set("AURA","CheckDebuffs")
    end
end

function HealBot_Options_BuffCol_ShowOnHealthBar_OnClick(self)
      --HealBot_setCall("HealBot_Options_BuffCol_ShowOnHealthBar_OnClick")
    if HealBot_Config_Buffs.CBshownHB~=self:GetChecked() then
        HealBot_Config_Buffs.CBshownHB=self:GetChecked()
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_Options_framesChanged(false)
        HealBot_Timers_Set("AURA","CheckBuffs")
    end
end

function HealBot_Options_BuffCol_ShowOnHealthBarMissingOnly_OnClick(self)
      --HealBot_setCall("HealBot_Options_BuffCol_ShowOnHealthBarMissingOnly_OnClick")
    if HealBot_Config_Buffs.CBshownHBMissingOnly~=self:GetChecked() then
        HealBot_Config_Buffs.CBshownHBMissingOnly=self:GetChecked()
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_Options_framesChanged(false)
        HealBot_Timers_Set("AURA","CheckBuffs")
    end
end

function HealBot_Options_BuffCol_AlwaysEnableBar_OnClick(self)
      --HealBot_setCall("HealBot_Options_BuffCol_AlwaysEnableBar_OnClick")
    if HealBot_Config_Buffs.EnableBar~=self:GetChecked() then
        HealBot_Config_Buffs.EnableBar=self:GetChecked()
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_Options_framesChanged(false)
        HealBot_Timers_Set("AURA","CheckBuffs")
    end
end

function HealBot_Options_CDCCol_DropDown()
      --HealBot_setCall("HealBot_Options_CDCCol_DropDown")
    local info=UIDropDownMenu_CreateInfo()

    for j=1, getn(HealBot_Options_Lists["AuraBarCol"]), 1 do
        info.text=HealBot_Options_Lists["AuraBarCol"][j];
        info.func=function(self)
                        if HealBot_Globals.CustomDebuffsShowBarCol[hb_lVars["CDebuffcustomSpellID"]]~=self:GetID() then
                            local sName=HealBot_Options_SpellGetName(hb_lVars["CDebuffcustomSpellID"])
                            if self:GetID() == 4 then
                                HealBot_Globals.CustomDebuffsShowBarCol[hb_lVars["CDebuffcustomSpellID"]]=nil
                                if sName then HealBot_Globals.CustomDebuffsShowBarCol[sName]=nil end
                            else
                                HealBot_Globals.CustomDebuffsShowBarCol[hb_lVars["CDebuffcustomSpellID"]]=self:GetID()
                                if sName then HealBot_Globals.CustomDebuffsShowBarCol[sName]=self:GetID() end
                            end
                            UIDropDownMenu_SetText(HealBot_Options_CDCCol,HealBot_Options_Lists["AuraBarCol"][self:GetID()])
                            HealBot_setLuVars("UpdateAllAura", 5)
                            HealBot_Aura_setLuVars("updateAll", true)
                            HealBot_Update_ClearAllDebuffs()
                            HealBot_Timers_Set("AURA","CheckDebuffs")
                            HealBot_Timers_Set("AURA","UpdateAllDebuffIcons")
                        end
                    end
        info.checked=false;
        if (HealBot_Globals.CustomDebuffsShowBarCol[hb_lVars["CDebuffcustomSpellID"]] or 4) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_CDCIconGlow_DropDown()
      --HealBot_setCall("HealBot_Options_CDCIconGlow_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AuraIconGlow"]), 1 do
        info.text=HealBot_Options_Lists["AuraIconGlow"][j];
        info.func=function(self)
                        if HealBot_Globals.CustomDebuffsIconGlow[hb_lVars["CDebuffcustomSpellID"]]~=self:GetID() then
                            HealBot_Globals.CustomDebuffsIconGlow[hb_lVars["CDebuffcustomSpellID"]]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_CDCIconGlow,HealBot_Options_Lists["AuraIconGlow"][self:GetID()])
                            HealBot_Timers_Set("AURA","ConfigDebuffs")
                        end
                    end
        info.checked=false;
        if (HealBot_Globals.CustomDebuffsIconGlow[hb_lVars["CDebuffcustomSpellID"]] or 1) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_CDCIconSet_DropDown()
      --HealBot_setCall("HealBot_Options_CDCIconSet_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["IconSets"]), 1 do
        info.text=HealBot_Options_Lists["IconSets"][j];
        info.func=function(self)
                        if HealBot_Globals.CustomDebuffsIconSet[hb_lVars["CDebuffcustomSpellID"]]~=self:GetID() then
                            HealBot_Globals.CustomDebuffsIconSet[hb_lVars["CDebuffcustomSpellID"]]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_CDCIconSet,HealBot_Options_Lists["IconSets"][self:GetID()])
                            HealBot_Aura_ResetDebuffCache()
                            HealBot_Timers_Set("AURA","ConfigDebuffs")
                        end
                    end
        info.checked=false;
        if (HealBot_Globals.CustomDebuffsIconSet[hb_lVars["CDebuffcustomSpellID"]] or 1) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BuffUpdateAll()
      --HealBot_setCall("HealBot_Options_BuffUpdateAll")
    HealBot_setLuVars("UpdateAllAura", 5)
    HealBot_Aura_setLuVars("updateAll", true)
    HealBot_Timers_Set("AURA","CheckBuffs")
    HealBot_Timers_Set("AURA","UpdateAllBuffIcons")
end

function HealBot_Options_BuffDefaultBarColour_DropDown()
      --HealBot_setCall("HealBot_Options_BuffDefaultBarColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AuraBarCol"]), 1 do
        info.text=HealBot_Options_Lists["AuraBarCol"][j];
        info.func=function(self)
                        local cbBarCol=HealBot_Globals.CustomBuffsShowBarCol["DEFAULT"] or 3
                        if cbBarCol~=self:GetID() then
                            HealBot_Globals.CustomBuffsShowBarCol["DEFAULT"]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_BuffDefaultBarColour,HealBot_Options_Lists["AuraBarCol"][self:GetID()])
                            HealBot_Options_BuffUpdateAll()
                        end
                    end
        info.checked=false;
        if (HealBot_Globals.CustomBuffsShowBarCol["DEFAULT"] or 1) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_CDCUpdateAll()
      --HealBot_setCall("HealBot_Options_CDCUpdateAll")
    HealBot_setLuVars("UpdateAllAura", 5)
    HealBot_Aura_setLuVars("updateAll", true)
    HealBot_Update_ClearAllDebuffs()
    HealBot_Timers_Set("AURA","CheckDebuffs")
    HealBot_Timers_Set("AURA","UpdateAllDebuffIcons")
end

function HealBot_Options_CDCDefaultBarColour_DropDown()
      --HealBot_setCall("HealBot_Options_CDCDefaultBarColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AuraBarCol"]), 1 do
        info.text=HealBot_Options_Lists["AuraBarCol"][j];
        info.func=function(self)
                        local cdBarCol=HealBot_Globals.CustomDebuffsShowBarCol["DEFAULT"] or 4
                        if cdBarCol~=self:GetID() then
                            HealBot_Globals.CustomDebuffsShowBarCol["DEFAULT"]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_CDCDefaultBarColour,HealBot_Options_Lists["AuraBarCol"][self:GetID()])
                            HealBot_Options_CDCUpdateAll()
                        end
                    end
        info.checked=false;
        if (HealBot_Globals.CustomDebuffsShowBarCol["DEFAULT"] or 4) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_CustomBuffCol_DropDown()
      --HealBot_setCall("HealBot_Options_CustomBuffCol_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AuraBarCol"]), 1 do
        info.text=HealBot_Options_Lists["AuraBarCol"][j];
        info.func=function(self)
                        local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"]) or 0
                        if hb_lVars["HoTname"] == HEALBOT_CUSTOM_CAT_CUSTOM_AUTOBUFFS then
                            sId=HEALBOT_CUSTOM_CAT_CUSTOM_AUTOBUFFS
                        end
                        local cbBarCol=HealBot_Globals.CustomBuffsShowBarCol[sId] or 1
                        if cbBarCol~=self:GetID() then
                            HealBot_Globals.CustomBuffsShowBarCol[sId]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_CustomBuffCol,HealBot_Options_Lists["AuraBarCol"][self:GetID()])
                            if type(sId) == "number" then
                                local sName=HealBot_Options_SpellGetName(sId)
                                if sName then HealBot_Globals.CustomBuffsShowBarCol[sName]=self:GetID() end
                            end
                            HealBot_setLuVars("UpdateAllAura", 5)
                            HealBot_Aura_setLuVars("updateAll", true)
                            HealBot_Timers_Set("AURA","ResetBuffCache")
                        end
                    end
        info.checked=false;
        local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"]) or 0
        if (HealBot_Globals.CustomBuffsShowBarCol[sId] or 1) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_CustomBuffIconGlow_DropDown()
      --HealBot_setCall("HealBot_Options_CustomBuffIconGlow_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AuraIconGlow"]), 1 do
        info.text=HealBot_Options_Lists["AuraIconGlow"][j];
        info.func=function(self)
                        local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"]) or 0
                        local cbBarCol=HealBot_Globals.CustomBuffsIconGlow[sId] or 1
                        if cbBarCol~=self:GetID() then
                            if self:GetID()>1 then
                                HealBot_Globals.CustomBuffsIconGlow[sId]=self:GetID()
                            else
                                HealBot_Globals.CustomBuffsIconGlow[sId]=nil
                            end
                            UIDropDownMenu_SetText(HealBot_Options_CustomBuffIconGlow,HealBot_Options_Lists["AuraIconGlow"][self:GetID()])
                            HealBot_Timers_Set("AURA","ConfigClassHoT")
                        end
                    end
        info.checked=false;
        local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"]) or 0
        if (HealBot_Globals.CustomBuffsIconGlow[sId] or 1) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BuffIconSet_DropDown()
      --HealBot_setCall("HealBot_Options_BuffIconSet_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["IconSets"]), 1 do
        info.text=HealBot_Options_Lists["IconSets"][j];
        info.func=function(self)
                        local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"]) or 0
                        local cbBarCol=HealBot_Globals.CustomBuffsIconSet[sId] or 1
                        if cbBarCol~=self:GetID() then
                            HealBot_Globals.CustomBuffsIconSet[sId]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_BuffIconSet,HealBot_Options_Lists["IconSets"][self:GetID()])
                            HealBot_Timers_Set("AURA","ConfigClassHoT")
                        end
                    end
        info.checked=false;
        local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"]) or 0
        if HealBot_Globals.CustomBuffsIconSet[sId] and HealBot_Globals.CustomBuffsIconSet[sId] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_DisableHealBot_OnClick(self)
      --HealBot_setCall("HealBot_Options_DisableHealBot_OnClick")
    HealBot_Options_DisableHealBot(self:GetChecked())
end

function HealBot_Options_NoAuraWhenRested_OnClick(self)
      --HealBot_setCall("HealBot_Options_NoAuraWhenRested_OnClick")
    if HealBot_Config_Buffs.NoAuraWhenRested~=self:GetChecked() then
        HealBot_Config_Buffs.NoAuraWhenRested=self:GetChecked()
        HealBot_Timers_Set("AURA","PlayerCheckExtended")
    end
end

function HealBot_Options_DisableHealBot(disable)
      --HealBot_setCall("HealBot_Options_DisableHealBot")
    HealBot_Config.DisableHealBot=disable
    HealBot_Timers_Set("OOC","DisableCheck")
end

function HealBot_Options_DisableHealBotSolo_OnClick(self)
      --HealBot_setCall("HealBot_Options_DisableHealBotSolo_OnClick")
    if HealBot_Config.DisableSolo~=self:GetChecked() then
        HealBot_Config.DisableSolo=self:GetChecked()
        HealBot_Timers_Set("OOC","DisableCheck")
    end
end

function HealBot_Options_DisableHealBotSpec_OnClick(self)
      --HealBot_setCall("HealBot_Options_DisableHealBotSpec_OnClick")
    if HealBot_Config.DisableOnSpec[HealBot_Config.Spec]~=self:GetChecked() then
        HealBot_Config.DisableOnSpec[HealBot_Config.Spec]=self:GetChecked()
        HealBot_Timers_Set("OOC","DisableCheck")
    end
end

function HealBot_Options_TalentInspect_OnClick(self)
      --HealBot_setCall("HealBot_Options_TalentInspect_OnClick")
    HealBot_Globals.TalentInspect=self:GetChecked()
end

function HealBot_Options_DisableCheck()
      --HealBot_setCall("HealBot_Options_DisableCheck")
    local z=0
    if not HealBot_Config.DisableHealBot then
        z=0
    elseif not HealBot_Config.DisableSolo then
        z=1
    elseif not IsInRaid() and not IsInGroup() then
        z=1
    end
    if HealBot_Config.DisableOnSpec[HealBot_Config.Spec] then
        z=1
    end
    if HealBot_Config.DisabledNow~=z then
        if z == 0 then
            HealBot_Timers_Set("OOC","EnableHealBot")
        else
            HealBot_Timers_Set("OOC","DisableHealBot")
        end
    end
end

function HealBot_Options_HealGroups_OnClick(self, id)
      --HealBot_setCall("HealBot_Options_HealGroups_OnClick")
    if Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][id]["STATE"]~=self:GetChecked() then
        Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][id]["STATE"]=self:GetChecked()
        HealBot_Timers_setLuVars("ResetSkins", true)
        HealBot_Timers_Set("OOCNT","RefreshPartyNextRecalcAll")
        if id == 8 or id == 12 or id == 14 then
            HealBot_Timers_Set("OOC","EventsSetFrameUnits",true)
        end
    end
end

function HealBot_Options_HealGroupsAllowDups_OnClick(self)
      --HealBot_setCall("HealBot_Options_HealGroupsAllowDups_OnClick")
    if Healbot_Config_Skins.DuplicateBars[Healbot_Config_Skins.Current_Skin]~=self:GetChecked() then
        Healbot_Config_Skins.DuplicateBars[Healbot_Config_Skins.Current_Skin]=self:GetChecked()
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_HealGroupsAllowDupsIncPrivList_OnClick(self)
      --HealBot_setCall("HealBot_Options_HealGroupsAllowDupsIncPrivList_OnClick")
    if Healbot_Config_Skins.DupBarsPrivList[Healbot_Config_Skins.Current_Skin]~=self:GetChecked() then
        Healbot_Config_Skins.DupBarsPrivList[Healbot_Config_Skins.Current_Skin]=self:GetChecked()
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_HealGroupUp_OnClick(self, id)
      --HealBot_setCall("HealBot_Options_HealGroupUp_OnClick")
    if id>1 and id<8 then
        local hbId=id-1
        HealBot_Options_HealGroupSwap(Healbot_Config_Skins.Current_Skin, hbId, id)
    end
end

function HealBot_Options_HealGroupDown_OnClick(self, id)
      --HealBot_setCall("HealBot_Options_HealGroupDown_OnClick")
    if id>0 and id<7 then
        local hbId=id+1
        HealBot_Options_HealGroupSwap(Healbot_Config_Skins.Current_Skin, hbId, id)
    end
end

function HealBot_Options_HealGroupSwap(skinName, hbId, id)
      --HealBot_setCall("HealBot_Options_HealGroupSwap")
    local hgName=Healbot_Config_Skins.HealGroups[skinName][id]["NAME"]
    local hgState=Healbot_Config_Skins.HealGroups[skinName][id]["STATE"]
    local hgFrame=Healbot_Config_Skins.HealGroups[skinName][id]["FRAME"]
    Healbot_Config_Skins.HealGroups[skinName][id]["STATE"]=Healbot_Config_Skins.HealGroups[skinName][hbId]["STATE"]
    Healbot_Config_Skins.HealGroups[skinName][id]["NAME"]=Healbot_Config_Skins.HealGroups[skinName][hbId]["NAME"]
    Healbot_Config_Skins.HealGroups[skinName][id]["FRAME"]=Healbot_Config_Skins.HealGroups[skinName][hbId]["FRAME"]
    Healbot_Config_Skins.HealGroups[skinName][hbId]["STATE"]=hgState
    Healbot_Config_Skins.HealGroups[skinName][hbId]["NAME"]=hgName
    Healbot_Config_Skins.HealGroups[skinName][hbId]["FRAME"]=hgFrame
    HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
    HealBot_Options_framesChanged(false)
end

function HealBot_Options_SortOutOfRangeLast_OnClick(self)
      --HealBot_setCall("HealBot_Options_SortOutOfRangeLast_OnClick")
    if hbv_Skins_GetFrameBoolean("BarSort", "OORLAST", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarSort", "OORLAST", hb_lVars["Frame"])
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_HideBar_OnClick(self)
      --HealBot_setCall("HealBot_Options_HideBar_OnClick")
    if hbv_Skins_GetFrameBoolean("BarVisibility", "HIDEOOR", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarVisibility", "HIDEOOR", hb_lVars["Frame"])
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_VehicleInCombat_OnClick(self)
      --HealBot_setCall("HealBot_Options_VehicleInCombat_OnClick")
    if hbv_Skins_GetBoolean("Healing", "VEHICLEINCOMBAT")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Healing", "VEHICLEINCOMBAT")
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_MyPetInCombat_OnClick(self)
      --HealBot_setCall("HealBot_Options_MyPetInCombat_OnClick")
    if hbv_Skins_GetBoolean("Healing", "MYPETINCOMBAT")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Healing", "MYPETINCOMBAT")
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_GroupPetsByFive_OnClick(self)
      --HealBot_setCall("HealBot_Options_GroupPetsByFive_OnClick")
    if hbv_Skins_GetBoolean("Healing", "GROUPPETS")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Healing", "GROUPPETS")
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_SelfPet_OnClick(self)
      --HealBot_setCall("HealBot_Options_SelfPet_OnClick")
    if hbv_Skins_GetBoolean("Healing", "SELFPET")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Healing", "SELFPET")
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_EFGroup_OnClick(self,id)
      --HealBot_setCall("HealBot_Options_EFGroup_OnClick")
    if hbv_Skins_GetFocusGroup(id)~=self:GetChecked() then
        hbv_Skins_SetFocusGroup(self:GetChecked(), id)
        HealBot_Timers_Set("SKINS","SetFocusGroups")
    end
end

function HealBot_Options_OverrideEFGroup_OnClick(self,id)
      --HealBot_setCall("HealBot_Options_OverrideEFGroup_OnClick")
    if HealBot_Globals.OverrideFocusGroups[id]~=self:GetChecked() then
        HealBot_Globals.OverrideFocusGroups[id]=self:GetChecked()
        HealBot_Timers_Set("SKINS","SetFocusGroups")
    end
end

function HealBot_Options_CuresWarnNPCFriendly_OnClick(self)
      --HealBot_setCall("HealBot_Options_CuresWarnNPCFriendly_OnClick")
    if HealBot_Config_Cures.IncFriendlyNPCs~=self:GetChecked() then
        HealBot_Config_Cures.IncFriendlyNPCs=self:GetChecked()
        HealBot_Options_framesChanged(false)
        HealBot_Timers_Set("AURA","CheckDebuffs")
    end
end

function HealBot_Options_CuresWarnNPCEnemy_OnClick(self)
      --HealBot_setCall("HealBot_Options_CuresWarnNPCEnemy_OnClick")
    if HealBot_Config_Cures.IncEnemyNPCs~=self:GetChecked() then
        HealBot_Config_Cures.IncEnemyNPCs=self:GetChecked()
        HealBot_Options_framesChanged(false)
        HealBot_Timers_Set("AURA","CheckDebuffs")
    end
end

function HealBot_Options_EFClass_OnClick(self)
      --HealBot_setCall("HealBot_Options_EFClass_OnClick")
    if HealBot_Globals.EmergencyFClass == 1 then
        if HealBot_Options_EFClassDruid:GetChecked() then
            HealBot_Globals.EmergIncMelee[HEALBOT_DRUID]=true
        else
            HealBot_Globals.EmergIncMelee[HEALBOT_DRUID]=false
        end
        if HealBot_Options_EFClassHunter:GetChecked() then
            HealBot_Globals.EmergIncMelee[HEALBOT_HUNTER]=true
        else
            HealBot_Globals.EmergIncMelee[HEALBOT_HUNTER]=false
        end
        if HealBot_Options_EFClassMage:GetChecked() then
            HealBot_Globals.EmergIncMelee[HEALBOT_MAGE]=true
        else
            HealBot_Globals.EmergIncMelee[HEALBOT_MAGE]=false
        end
        if HealBot_Options_EFClassPaladin:GetChecked() then
            HealBot_Globals.EmergIncMelee[HEALBOT_PALADIN]=true
        else
            HealBot_Globals.EmergIncMelee[HEALBOT_PALADIN]=false
        end
        if HealBot_Options_EFClassPriest:GetChecked() then
            HealBot_Globals.EmergIncMelee[HEALBOT_PRIEST]=true
        else
            HealBot_Globals.EmergIncMelee[HEALBOT_PRIEST]=false
        end
        if HealBot_Options_EFClassRogue:GetChecked() then
            HealBot_Globals.EmergIncMelee[HEALBOT_ROGUE]=true
        else
            HealBot_Globals.EmergIncMelee[HEALBOT_ROGUE]=false
        end
        if HealBot_Options_EFClassShaman:GetChecked() then
            HealBot_Globals.EmergIncMelee[HEALBOT_SHAMAN]=true
        else
            HealBot_Globals.EmergIncMelee[HEALBOT_SHAMAN]=false
        end
        if HealBot_Options_EFClassWarlock:GetChecked() then
            HealBot_Globals.EmergIncMelee[HEALBOT_WARLOCK]=true
        else
            HealBot_Globals.EmergIncMelee[HEALBOT_WARLOCK]=false
        end
        if HealBot_Options_EFClassWarrior:GetChecked() then
            HealBot_Globals.EmergIncMelee[HEALBOT_WARRIOR]=true
        else
            HealBot_Globals.EmergIncMelee[HEALBOT_WARRIOR]=false
        end
        if HealBot_Options_EFClassDemonHunter:GetChecked() then
            HealBot_Globals.EmergIncMelee[HEALBOT_DEMONHUNTER]=true
        else
            HealBot_Globals.EmergIncMelee[HEALBOT_DEMONHUNTER]=false
        end
        if HealBot_Options_EFClassDeathKnight:GetChecked() then
            HealBot_Globals.EmergIncMelee[HEALBOT_DEATHKNIGHT]=true
        else
            HealBot_Globals.EmergIncMelee[HEALBOT_DEATHKNIGHT]=false
        end
        if HealBot_Options_EFClassMonk:GetChecked() then
            HealBot_Globals.EmergIncMelee[HEALBOT_MONK]=true
        else
            HealBot_Globals.EmergIncMelee[HEALBOT_MONK]=false
        end
        if HealBot_Options_EFClassEvoker:GetChecked() then
            HealBot_Globals.EmergIncMelee[HEALBOT_EVOKER]=true
        else
            HealBot_Globals.EmergIncMelee[HEALBOT_EVOKER]=false
        end
    elseif HealBot_Globals.EmergencyFClass == 2 then
        if HealBot_Options_EFClassDruid:GetChecked() then
            HealBot_Globals.EmergIncRange[HEALBOT_DRUID]=true
        else
            HealBot_Globals.EmergIncRange[HEALBOT_DRUID]=false
        end
        if HealBot_Options_EFClassHunter:GetChecked() then
            HealBot_Globals.EmergIncRange[HEALBOT_HUNTER]=true
        else
            HealBot_Globals.EmergIncRange[HEALBOT_HUNTER]=false
        end
        if HealBot_Options_EFClassMage:GetChecked() then
            HealBot_Globals.EmergIncRange[HEALBOT_MAGE]=true
        else
            HealBot_Globals.EmergIncRange[HEALBOT_MAGE]=false
        end
        if HealBot_Options_EFClassPaladin:GetChecked() then
            HealBot_Globals.EmergIncRange[HEALBOT_PALADIN]=true
        else
            HealBot_Globals.EmergIncRange[HEALBOT_PALADIN]=false
        end
        if HealBot_Options_EFClassPriest:GetChecked() then
            HealBot_Globals.EmergIncRange[HEALBOT_PRIEST]=true
        else
            HealBot_Globals.EmergIncRange[HEALBOT_PRIEST]=false
        end
        if HealBot_Options_EFClassRogue:GetChecked() then
            HealBot_Globals.EmergIncRange[HEALBOT_ROGUE]=true
        else
            HealBot_Globals.EmergIncRange[HEALBOT_ROGUE]=false
        end
        if HealBot_Options_EFClassShaman:GetChecked() then
            HealBot_Globals.EmergIncRange[HEALBOT_SHAMAN]=true
        else
            HealBot_Globals.EmergIncRange[HEALBOT_SHAMAN]=false
        end
        if HealBot_Options_EFClassWarlock:GetChecked() then
            HealBot_Globals.EmergIncRange[HEALBOT_WARLOCK]=true
        else
            HealBot_Globals.EmergIncRange[HEALBOT_WARLOCK]=false
        end
        if HealBot_Options_EFClassWarrior:GetChecked() then
            HealBot_Globals.EmergIncRange[HEALBOT_WARRIOR]=true
        else
            HealBot_Globals.EmergIncRange[HEALBOT_WARRIOR]=false
        end
        if HealBot_Options_EFClassDemonHunter:GetChecked() then
            HealBot_Globals.EmergIncRange[HEALBOT_DEMONHUNTER]=true
        else
            HealBot_Globals.EmergIncRange[HEALBOT_DEMONHUNTER]=false
        end
        if HealBot_Options_EFClassDeathKnight:GetChecked() then
            HealBot_Globals.EmergIncRange[HEALBOT_DEATHKNIGHT]=true
        else
            HealBot_Globals.EmergIncRange[HEALBOT_DEATHKNIGHT]=false
        end
        if HealBot_Options_EFClassMonk:GetChecked() then
            HealBot_Globals.EmergIncRange[HEALBOT_MONK]=true
        else
            HealBot_Globals.EmergIncRange[HEALBOT_MONK]=false
        end
        if HealBot_Options_EFClassEvoker:GetChecked() then
            HealBot_Globals.EmergIncRange[HEALBOT_EVOKER]=true
        else
            HealBot_Globals.EmergIncRange[HEALBOT_EVOKER]=false
        end
    elseif HealBot_Globals.EmergencyFClass == 3 then
        if HealBot_Options_EFClassDruid:GetChecked() then
            HealBot_Globals.EmergIncHealers[HEALBOT_DRUID]=true
        else
            HealBot_Globals.EmergIncHealers[HEALBOT_DRUID]=false
        end
        if HealBot_Options_EFClassHunter:GetChecked() then
            HealBot_Globals.EmergIncHealers[HEALBOT_HUNTER]=true
        else
            HealBot_Globals.EmergIncHealers[HEALBOT_HUNTER]=false
        end
        if HealBot_Options_EFClassMage:GetChecked() then
            HealBot_Globals.EmergIncHealers[HEALBOT_MAGE]=true
        else
            HealBot_Globals.EmergIncHealers[HEALBOT_MAGE]=false
        end
        if HealBot_Options_EFClassPaladin:GetChecked() then
            HealBot_Globals.EmergIncHealers[HEALBOT_PALADIN]=true
        else
            HealBot_Globals.EmergIncHealers[HEALBOT_PALADIN]=false
        end
        if HealBot_Options_EFClassPriest:GetChecked() then
            HealBot_Globals.EmergIncHealers[HEALBOT_PRIEST]=true
        else
            HealBot_Globals.EmergIncHealers[HEALBOT_PRIEST]=false
        end
        if HealBot_Options_EFClassRogue:GetChecked() then
            HealBot_Globals.EmergIncHealers[HEALBOT_ROGUE]=true
        else
            HealBot_Globals.EmergIncHealers[HEALBOT_ROGUE]=false
        end
        if HealBot_Options_EFClassShaman:GetChecked() then
            HealBot_Globals.EmergIncHealers[HEALBOT_SHAMAN]=true
        else
            HealBot_Globals.EmergIncHealers[HEALBOT_SHAMAN]=false
        end
        if HealBot_Options_EFClassWarlock:GetChecked() then
            HealBot_Globals.EmergIncHealers[HEALBOT_WARLOCK]=true
        else
            HealBot_Globals.EmergIncHealers[HEALBOT_WARLOCK]=false
        end
        if HealBot_Options_EFClassWarrior:GetChecked() then
            HealBot_Globals.EmergIncHealers[HEALBOT_WARRIOR]=true
        else
            HealBot_Globals.EmergIncHealers[HEALBOT_WARRIOR]=false
        end
        if HealBot_Options_EFClassDemonHunter:GetChecked() then
            HealBot_Globals.EmergIncHealers[HEALBOT_DEMONHUNTER]=true
        else
            HealBot_Globals.EmergIncHealers[HEALBOT_DEMONHUNTER]=false
        end
        if HealBot_Options_EFClassDeathKnight:GetChecked() then
            HealBot_Globals.EmergIncHealers[HEALBOT_DEATHKNIGHT]=true
        else
            HealBot_Globals.EmergIncHealers[HEALBOT_DEATHKNIGHT]=false
        end
        if HealBot_Options_EFClassMonk:GetChecked() then
            HealBot_Globals.EmergIncHealers[HEALBOT_MONK]=true
        else
            HealBot_Globals.EmergIncHealers[HEALBOT_MONK]=false
        end
        if HealBot_Options_EFClassEvoker:GetChecked() then
            HealBot_Globals.EmergIncHealers[HEALBOT_EVOKER]=true
        else
            HealBot_Globals.EmergIncHealers[HEALBOT_EVOKER]=false
        end
    elseif HealBot_Globals.EmergencyFClass == 4 then
        if HealBot_Options_EFClassDruid:GetChecked() then
            HealBot_Globals.EmergIncCustom[HEALBOT_DRUID]=true
        else
            HealBot_Globals.EmergIncCustom[HEALBOT_DRUID]=false
        end
        if HealBot_Options_EFClassHunter:GetChecked() then
            HealBot_Globals.EmergIncCustom[HEALBOT_HUNTER]=true
        else
            HealBot_Globals.EmergIncCustom[HEALBOT_HUNTER]=false
        end
        if HealBot_Options_EFClassMage:GetChecked() then
            HealBot_Globals.EmergIncCustom[HEALBOT_MAGE]=true
        else
            HealBot_Globals.EmergIncCustom[HEALBOT_MAGE]=false
        end
        if HealBot_Options_EFClassPaladin:GetChecked() then
            HealBot_Globals.EmergIncCustom[HEALBOT_PALADIN]=true
        else
            HealBot_Globals.EmergIncCustom[HEALBOT_PALADIN]=false
        end
        if HealBot_Options_EFClassPriest:GetChecked() then
            HealBot_Globals.EmergIncCustom[HEALBOT_PRIEST]=true
        else
            HealBot_Globals.EmergIncCustom[HEALBOT_PRIEST]=false
        end
        if HealBot_Options_EFClassRogue:GetChecked() then
            HealBot_Globals.EmergIncCustom[HEALBOT_ROGUE]=true
        else
            HealBot_Globals.EmergIncCustom[HEALBOT_ROGUE]=false
        end
        if HealBot_Options_EFClassShaman:GetChecked() then
            HealBot_Globals.EmergIncCustom[HEALBOT_SHAMAN]=true
        else
            HealBot_Globals.EmergIncCustom[HEALBOT_SHAMAN]=false
        end
        if HealBot_Options_EFClassWarlock:GetChecked() then
            HealBot_Globals.EmergIncCustom[HEALBOT_WARLOCK]=true
        else
            HealBot_Globals.EmergIncCustom[HEALBOT_WARLOCK]=false
        end
        if HealBot_Options_EFClassWarrior:GetChecked() then
            HealBot_Globals.EmergIncCustom[HEALBOT_WARRIOR]=true
        else
            HealBot_Globals.EmergIncCustom[HEALBOT_WARRIOR]=false
        end
        if HealBot_Options_EFClassDemonHunter:GetChecked() then
            HealBot_Globals.EmergIncCustom[HEALBOT_DEMONHUNTER]=true
        else
            HealBot_Globals.EmergIncCustom[HEALBOT_DEMONHUNTER]=false
        end
        if HealBot_Options_EFClassDeathKnight:GetChecked() then
            HealBot_Globals.EmergIncCustom[HEALBOT_DEATHKNIGHT]=true
        else
            HealBot_Globals.EmergIncCustom[HEALBOT_DEATHKNIGHT]=false
        end
        if HealBot_Options_EFClassMonk:GetChecked() then
            HealBot_Globals.EmergIncCustom[HEALBOT_MONK]=true
        else
            HealBot_Globals.EmergIncCustom[HEALBOT_MONK]=false
        end
        if HealBot_Options_EFClassEvoker:GetChecked() then
            HealBot_Globals.EmergIncCustom[HEALBOT_EVOKER]=true
        else
            HealBot_Globals.EmergIncCustom[HEALBOT_EVOKER]=false
        end
    end
    HealBot_Options_framesChanged(false)
    HealBot_Timers_Set("AURA","BuffsReset",true)
end

hb_lVars["OverrideCastNotify"]=1
function HealBot_Options_OverrideCastNotify_OnClick(self,id)
      --HealBot_setCall("HealBot_Options_OverrideCastNotify_OnClick")
    local g=nil
    if id>0 and id~=hb_lVars["OverrideCastNotify"] then
        g=_G["HealBot_Options_OverrideCastNotify"..hb_lVars["OverrideCastNotify"]]
        g:SetChecked(false);
        hb_lVars["OverrideCastNotify"]=id
    end
    HealBot_Globals.OverrideChat["NOTIFY"]=id;
    if HealBot_Globals.OverrideChat["NOTIFY"]>0 then
        g=_G["HealBot_Options_OverrideCastNotify"..HealBot_Globals.OverrideChat["NOTIFY"]]
        g:SetChecked(true);
    end
    HealBot_Timers_Set("CHAT","SetChat")
end

hb_lVars["CastNotify"]=1
function HealBot_Options_CastNotify_OnClick(self,id)
      --HealBot_setCall("HealBot_Options_CastNotify_OnClick")
    local g=nil
    if id>0 and id~=hb_lVars["CastNotify"] then
        g=_G["HealBot_Options_CastNotify"..hb_lVars["CastNotify"]]
        g:SetChecked(false);
        hb_lVars["CastNotify"]=id
    end
    hbv_Skins_SetVar(id, "Chat", "NOTIFY")
    if hbv_Skins_GetVar("Chat", "NOTIFY")>0 then
        g=_G["HealBot_Options_CastNotify"..hbv_Skins_GetVar("Chat", "NOTIFY")]
        g:SetChecked(true);
    end
    HealBot_Timers_Set("CHAT","SetChat")
end

function HealBot_Options_HideOptions_OnClick(self)
      --HealBot_setCall("HealBot_Options_HideOptions_OnClick")
    if HealBot_Globals.HideOptions~=self:GetChecked() then
        HealBot_Globals.HideOptions=self:GetChecked()
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_HideUnlocked_OnClick(self)
      --HealBot_setCall("HealBot_Options_HideUnlocked_OnClick")
    if HealBot_Globals.HideUnlockedTag~=self:GetChecked() then
        HealBot_Globals.HideUnlockedTag=self:GetChecked()
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_RightButtonOptions_OnClick(self)
      --HealBot_setCall("HealBot_Options_RightButtonOptions_OnClick")
    HealBot_Globals.RightButtonOptions=self:GetChecked()
end

function HealBot_Options_ShowMinimapButton_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowMinimapButton_OnClick")
    if self:GetChecked() then
        HealBot_Globals.MinimapIcon.hide=false  -- Reversed intentionally
    else
        HealBot_Globals.MinimapIcon.hide=true
    end
    HealBot_MMButton_Toggle()
end

function HealBot_Options_ShowTooltip_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltip_OnClick")
    if HealBot_Globals.ShowTooltip~=self:GetChecked() then
        HealBot_Globals.ShowTooltip=self:GetChecked()
        if self:GetChecked() then HealBot_Timers_Set("LAST","LoadTips") end
        HealBot_Options_SetTooltipState()
    end
end

function HealBot_Options_InOutCompressExport_OnClick(self)
      --HealBot_setCall("HealBot_Options_InOutCompressExport_OnClick")
    HealBot_Globals.CompressExport=self:GetChecked()
end

function HealBot_Options_AddonFail(reason, addon)
      --HealBot_setCall("HealBot_Options_AddonFail")
    StaticPopupDialogs["HEALBOT_OPTIONS_ADDONFAIL"]={
        text=HEALBOT_OPTIONS_ADDON_FAIL.." "..addon.."\n"..HEALBOT_OPTIONS_LANG_ADDON_FAIL2.." "..reason.."\n\n"..HEALBOT_OPTIONS_LANG_ADDON_FAIL3.." "..addon,
        button1=CLOSE,
        timeout=0,
        whileDead=1,
        hideOnEscape=1
    };
    StaticPopup_Show("HEALBOT_OPTIONS_ADDONFAIL");
end

function HealBot_Options_LoadTips()
      --HealBot_setCall("HealBot_Options_LoadTips")
    local loaded, reason=hb_lVars["TIPLOADED"],""
    if not loaded then loaded, reason=HealBot_WoWAPI_LoadAddOn("HealBot_Tips") end
    if loaded then
        if HealBot_Globals.ShowTooltip then
            HealBot_Data["TIPUSE"]=true
            HealBot_Tooltip_Init()
            --if HealBot_Config_Buffs.BuffWatch then
            --    HealBot_Timers_Set("AURA","BuffReset")
            --end
            HealBot_Timers_Set("LAST","TipPowerCol")
        else
            HealBot_Data["TIPUSE"]=false
        end
        hb_lVars["TIPLOADED"]=true
    elseif HealBot_Globals.ShowTooltip then
        HealBot_Data["TIPUSE"]=false
        local failreason=reason or HEALBOT_WORDS_UNKNOWN
        HealBot_AddChat("Unable to load addon HealBot_Tips - Reason: "..failreason)
        if not HealBot_Globals.OneTimeMsg["Tips"] then
            HealBot_Globals.OneTimeMsg["Tips"]=true
            HealBot_Options_AddonFail(failreason, "HealBot_Tips")
        end
        hb_lVars["TIPLOADED"]=false
    end
    HealBot_setTooltipUpdateInterval()
end

function HealBot_Options_HideTooltipInCombat_OnClick(self)
      --HealBot_setCall("HealBot_Options_HideTooltipInCombat_OnClick")
    HealBot_Globals.DisableToolTipInCombat=self:GetChecked()
end

function HealBot_Options_CopyDummy_OnClick(self)
      --HealBot_setCall("HealBot_Options_CopyDummy_OnClick")
  -- Nothing to do here
end

function HealBot_Options_ShowTooltipTarget_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipTarget_OnClick")
    if HealBot_Globals.Tooltip_ShowTarget~=self:GetChecked() then
        HealBot_Globals.Tooltip_ShowTarget=self:GetChecked()
        HealBot_Options_SetTooltipState()
    end
end

function HealBot_Options_ShowTooltipSpellInfo_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipSpellInfo_OnClick")
    if HealBot_Globals.Tooltip_ShowSpellInfo~=self:GetChecked() then
        HealBot_Globals.Tooltip_ShowSpellInfo=self:GetChecked()
        HealBot_Options_SetTooltipState()
    end
end

function HealBot_Options_ShowTooltipSpellExtra_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipSpellExtra_OnClick")
    HealBot_Globals.Tooltip_ShowSpellExtra=self:GetChecked()
end

function HealBot_Options_ShowTooltipSpellCoolDown_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipSpellCoolDown_OnClick")
    if HealBot_Globals.Tooltip_ShowCD~=self:GetChecked() then
        HealBot_Globals.Tooltip_ShowCD=self:GetChecked()
        HealBot_setTooltipUpdateInterval()
    end
end

function HealBot_Options_ShowTooltipSpellIgnoreGlobalCoolDown_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipSpellIgnoreGlobalCoolDown_OnClick")
    HealBot_Globals.Tooltip_IgnoreGCD=self:GetChecked()
end

function HealBot_Options_ShowTooltipBuffIconInfo_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipBuffIconInfo_OnClick")
    if HealBot_Globals.Tooltip_ShowBuffIconInfo~=self:GetChecked() then
        HealBot_Globals.Tooltip_ShowBuffIconInfo=self:GetChecked()
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_Options_ShowTooltipBuffIconCompact_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipBuffIconCompact_OnClick")
    if HealBot_Globals.Tooltip_ShowBuffIconCompact~=self:GetChecked() then
        HealBot_Globals.Tooltip_ShowBuffIconCompact=self:GetChecked()
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_Options_ShowTooltipDebuffIconInfo_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipDebuffIconInfo_OnClick")
    if HealBot_Globals.Tooltip_ShowDebuffIconInfo~=self:GetChecked() then
        HealBot_Globals.Tooltip_ShowDebuffIconInfo=self:GetChecked()
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_Options_ShowTooltipDebuffIconCompact_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipDebuffIconCompact_OnClick")
    if HealBot_Globals.Tooltip_ShowDebuffIconCompact~=self:GetChecked() then
        HealBot_Globals.Tooltip_ShowDebuffIconCompact=self:GetChecked()
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_Options_ShowTooltipShowUnitTip_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipShowUnitTip_OnClick")
    if HealBot_Globals.ShowGameUnitInfo~=self:GetChecked() then
        HealBot_Globals.ShowGameUnitInfo=self:GetChecked()
        HealBot_Options_SetTooltipState()
    end
end

function HealBot_Options_ShowTooltipShowHoT_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTooltipShowHoT_OnClick")
    if HealBot_Globals.Tooltip_ShowHoT~=self:GetChecked() then
        HealBot_Globals.Tooltip_ShowHoT=self:GetChecked()
    end
end

function healbotOverride_ColoursAdaptivePlugin_OnClick(self)
      --HealBot_setCall("healbotOverride_ColoursAdaptivePlugin_OnClick")
    if HealBot_Globals.OverrideAdaptive["Plugin"]~=self:GetChecked() then
        HealBot_Globals.OverrideAdaptive["Plugin"]=self:GetChecked()
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function HealBot_Options_ColoursAdaptivePlugin_OnClick(self)
      --HealBot_setCall("HealBot_Options_ColoursAdaptivePlugin_OnClick")
    if hbv_Skins_GetBoolean("Adaptive", "Plugin")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Adaptive", "Plugin")
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function healbotOverride_ColoursAdaptiveRecentHeals_OnClick(self)
      --HealBot_setCall("healbotOverride_ColoursAdaptiveRecentHeals_OnClick")
    if HealBot_Globals.OverrideAdaptive["RecentHeals"]~=self:GetChecked() then
        HealBot_Globals.OverrideAdaptive["RecentHeals"]=self:GetChecked()
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function HealBot_Options_ColoursAdaptiveRecentHeals_OnClick(self)
      --HealBot_setCall("HealBot_Options_ColoursAdaptiveRecentHeals_OnClick")
    if hbv_Skins_GetBoolean("Adaptive", "RecentHeals")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Adaptive", "RecentHeals")
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function healbotOverride_ColoursAdaptiveThreat_OnClick(self)
      --HealBot_setCall("healbotOverride_ColoursAdaptiveThreat_OnClick")
    if HealBot_Globals.OverrideAdaptive["Threat"]~=self:GetChecked() then
        HealBot_Globals.OverrideAdaptive["Threat"]=self:GetChecked()
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function HealBot_Options_ColoursAdaptiveThreat_OnClick(self)
      --HealBot_setCall("HealBot_Options_ColoursAdaptiveThreat_OnClick")
    if hbv_Skins_GetBoolean("Adaptive", "Threat")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Adaptive", "Threat")
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function healbotOverride_ColoursAdaptiveDebuffs_OnClick(self)
      --HealBot_setCall("healbotOverride_ColoursAdaptiveDebuffs_OnClick")
    if HealBot_Globals.OverrideAdaptive["Debuffs"]~=self:GetChecked() then
        HealBot_Globals.OverrideAdaptive["Debuffs"]=self:GetChecked()
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function HealBot_Options_ColoursAdaptiveDebuffs_OnClick(self)
      --HealBot_setCall("HealBot_Options_ColoursAdaptiveDebuffs_OnClick")
    if hbv_Skins_GetBoolean("Adaptive", "Debuffs")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Adaptive", "Debuffs")
        HealBot_Timers_Set("SKINS","SetAdaptive")
        HealBot_Options_CDCUpdateAll()
    end
end

function healbotOverride_ColoursAdaptiveAggro_OnClick(self)
      --HealBot_setCall("healbotOverride_ColoursAdaptiveAggro_OnClick")
    if HealBot_Globals.OverrideAdaptive["Aggro"]~=self:GetChecked() then
        HealBot_Globals.OverrideAdaptive["Aggro"]=self:GetChecked()
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function HealBot_Options_ColoursAdaptiveAggro_OnClick(self)
      --HealBot_setCall("HealBot_Options_ColoursAdaptiveAggro_OnClick")
    if hbv_Skins_GetBoolean("Adaptive", "Aggro")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Adaptive", "Aggro")
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function healbotOverride_ColoursAdaptiveHighlight_OnClick(self)
      --HealBot_setCall("healbotOverride_ColoursAdaptiveHighlight_OnClick")
    if HealBot_Globals.OverrideAdaptive["Highlight"]~=self:GetChecked() then
        HealBot_Globals.OverrideAdaptive["Highlight"]=self:GetChecked()
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function HealBot_Options_ColoursAdaptiveHighlight_OnClick(self)
      --HealBot_setCall("HealBot_Options_ColoursAdaptiveHighlight_OnClick")
    if hbv_Skins_GetBoolean("Adaptive", "Highlight")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Adaptive", "Highlight")
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function healbotOverride_ColoursAdaptiveTarget_OnClick(self)
      --HealBot_setCall("healbotOverride_ColoursAdaptiveTarget_OnClick")
    if HealBot_Globals.OverrideAdaptive["Target"]~=self:GetChecked() then
        HealBot_Globals.OverrideAdaptive["Target"]=self:GetChecked()
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function HealBot_Options_ColoursAdaptiveTarget_OnClick(self)
      --HealBot_setCall("HealBot_Options_ColoursAdaptiveTarget_OnClick")
    if hbv_Skins_GetBoolean("Adaptive", "Target")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Adaptive", "Target")
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function healbotOverride_ColoursAdaptiveOOR_OnClick(self)
      --HealBot_setCall("healbotOverride_ColoursAdaptiveOOR_OnClick")
    if HealBot_Globals.OverrideAdaptive["OOR"]~=self:GetChecked() then
        HealBot_Globals.OverrideAdaptive["OOR"]=self:GetChecked()
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function HealBot_Options_ColoursAdaptiveOOR_OnClick(self)
      --HealBot_setCall("HealBot_Options_ColoursAdaptiveOOR_OnClick")
    if hbv_Skins_GetBoolean("Adaptive", "OOR")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Adaptive", "OOR")
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function healbotOverride_ColoursAdaptiveBuffs_OnClick(self)
      --HealBot_setCall("healbotOverride_ColoursAdaptiveBuffs_OnClick")
    if HealBot_Globals.OverrideAdaptive["Buffs"]~=self:GetChecked() then
        HealBot_Globals.OverrideAdaptive["Buffs"]=self:GetChecked()
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function HealBot_Options_ColoursAdaptiveBuffs_OnClick(self)
      --HealBot_setCall("HealBot_Options_ColoursAdaptiveBuffs_OnClick")
    if hbv_Skins_GetBoolean("Adaptive", "Buffs") then
        hbv_Skins_SetVar(self:GetChecked(), "Adaptive", "Buffs")
        HealBot_Timers_Set("SKINS","SetAdaptive")
        HealBot_Options_BuffUpdateAll()
    end
end

function healbotOverride_ColoursAdaptiveOverheals_OnClick(self)
      --HealBot_setCall("healbotOverride_ColoursAdaptiveOverheals_OnClick")
    if HealBot_Globals.OverrideAdaptive["Overheals"]~=self:GetChecked() then
        HealBot_Globals.OverrideAdaptive["Overheals"]=self:GetChecked()
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function HealBot_Options_ColoursAdaptiveOverheals_OnClick(self)
      --HealBot_setCall("HealBot_Options_ColoursAdaptiveOverheals_OnClick")
    if hbv_Skins_GetBoolean("Adaptive", "Overheals")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Adaptive", "Overheals")
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function healbotOverride_ColoursAdaptiveAbsorbs_OnClick(self)
      --HealBot_setCall("healbotOverride_ColoursAdaptiveAbsorbs_OnClick")
    if HealBot_Globals.OverrideAdaptive["Absorbs"]~=self:GetChecked() then
        HealBot_Globals.OverrideAdaptive["Absorbs"]=self:GetChecked()
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function HealBot_Options_ColoursAdaptiveAbsorbs_OnClick(self)
      --HealBot_setCall("HealBot_Options_ColoursAdaptiveAbsorbs_OnClick")
    if hbv_Skins_GetBoolean("Adaptive", "Absorbs")~=self:GetChecked() then
        hbv_Skins_SetVar(self:GetChecked(), "Adaptive", "Absorbs")
        HealBot_Timers_Set("SKINS","SetAdaptive")
    end
end

function HealBot_Options_ShowDebuffWarning_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowDebuffWarning_OnClick")
    if HealBot_Config_Cures.ShowDebuffWarning~=self:GetChecked() then
        HealBot_Config_Cures.ShowDebuffWarning=self:GetChecked()
        HealBot_Timers_Set("AURA","SetAuraWarningFlags")
    end
end

function HealBot_Options_ShowDebuffWarningDispelOnly_OnClick(self)
      --HealBot_setCall("HealBot_Options_SoundDebuffWarning_OnClick")
    if HealBot_Config_Cures.ShowDebuffWarningDispelOnly~=self:GetChecked() then
        HealBot_Config_Cures.ShowDebuffWarningDispelOnly=self:GetChecked()
        HealBot_Timers_Set("AURA","SetAuraWarningFlags")
    end
end

function HealBot_Options_ShowBuffWarning_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowBuffWarning_OnClick")
    if HealBot_Config_Buffs.ShowBuffWarning~=self:GetChecked() then
        HealBot_Config_Buffs.ShowBuffWarning=self:GetChecked()
        HealBot_Timers_Set("AURA","SetAuraWarningFlags")
    end
end

function HealBot_Options_ShowBuffWarningMissingOnly_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowBuffWarningMissingOnly_OnClick")
    if HealBot_Config_Buffs.ShowBuffWarningMissingOnly~=self:GetChecked() then
        HealBot_Config_Buffs.ShowBuffWarningMissingOnly=self:GetChecked()
        HealBot_Timers_Set("AURA","SetAuraWarningFlags")
    end
end

function HealBot_Options_BuffManaDrinkThreshold_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_BuffManaDrinkThreshold_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif HealBot_Config_Buffs.ManaDrinkThreshold~=val then
        HealBot_Config_Buffs.ManaDrinkThreshold=val;
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val .. "%");
        HealBot_Timers_Set("AURA","CheckPlayer",true)
    end
end

function HealBot_Options_BuffCheckManaDrink_OnClick(self)
      --HealBot_setCall("HealBot_Options_BuffCheckManaDrink_OnClick")
    if HealBot_Config_Buffs.CheckManaDrink~=self:GetChecked() then
        HealBot_Config_Buffs.CheckManaDrink=self:GetChecked()
        HealBot_Timers_Set("AURA","BuffReset")
    end
end

function HealBot_Options_BuffCheckWellFed_OnClick(self)
      --HealBot_setCall("HealBot_Options_BuffCheckWellFed_OnClick")
    if HealBot_Config_Buffs.CheckWellFed~=self:GetChecked() then
        HealBot_Config_Buffs.CheckWellFed=self:GetChecked()
        HealBot_Timers_Set("AURA","BuffReset")
    end
end

function HealBot_Options_BuffExtraCheck_OnClick(self, id)
      --HealBot_setCall("HealBot_Options_BuffExtraCheck_OnClick")
    if HealBot_Config_Buffs.CustomBuffCheck[id]~=self:GetChecked() then
        HealBot_Config_Buffs.CustomBuffCheck[id]=self:GetChecked()
        HealBot_Timers_Set("AURA","BuffReset")
    end
end

function HealBot_Options_SoundDebuffWarning_OnClick(self)
      --HealBot_setCall("HealBot_Options_SoundDebuffWarning_OnClick")
    if HealBot_Config_Cures.SoundDebuffWarning~=self:GetChecked() then
        HealBot_Config_Cures.SoundDebuffWarning=self:GetChecked()
        HealBot_Timers_Set("AURA","SetAuraWarningFlags")
    end
end

function HealBot_Options_SoundDebuffWarningDispelOnly_OnClick(self)
      --HealBot_setCall("HealBot_Options_SoundDebuffWarning_OnClick")
    if HealBot_Config_Cures.SoundDebuffWarningDispelOnly~=self:GetChecked() then
        HealBot_Config_Cures.SoundDebuffWarningDispelOnly=self:GetChecked()
        HealBot_Timers_Set("AURA","SetAuraWarningFlags")
    end
end

function HealBot_Options_SoundBuffWarning_OnClick(self)
      --HealBot_setCall("HealBot_Options_SoundBuffWarning_OnClick")
    if HealBot_Config_Buffs.SoundBuffWarning~=self:GetChecked() then
        HealBot_Config_Buffs.SoundBuffWarning=self:GetChecked()
        HealBot_Timers_Set("AURA","SetAuraWarningFlags")
    end
end

function HealBot_Options_SoundBuffWarningMissingOnly_OnClick(self)
      --HealBot_setCall("HealBot_Options_SoundBuffWarningMissingOnly_OnClick")
    if HealBot_Config_Buffs.SoundBuffWarningMissingOnly~=self:GetChecked() then
        HealBot_Config_Buffs.SoundBuffWarningMissingOnly=self:GetChecked()
        HealBot_Timers_Set("AURA","SetAuraWarningFlags")
    end
end

function HealBot_Options_BarButtonShowRaidIcon_OnClick(self)
      --HealBot_setCall("HealBot_Options_BarButtonShowRaidIcon_OnClick")
    if hbv_Skins_GetFrameBoolean("RaidIcon", "SHOW", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "RaidIcon", "SHOW", hb_lVars["Frame"])
        if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
            if hb_lVars["TestBarsOn"] then
                HealBot_Options_framesChanged(true, true)
            else
                HealBot_Timers_Set("SKINS","RaidTargetUpdate")
            end
        end
    end
end

function HealBot_Options_BarButtonShowRaidIconStar_OnClick(self)
      --HealBot_setCall("HealBot_Options_BarButtonShowRaidIconStar_OnClick")
    if hbv_Skins_GetFrameBoolean("RaidIcon", "STAR", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "RaidIcon", "STAR", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","RaidTargetUpdate")
    end
end

function HealBot_Options_BarButtonShowRaidIconCircle_OnClick(self)
      --HealBot_setCall("HealBot_Options_BarButtonShowRaidIconCircle_OnClick")
    if hbv_Skins_GetFrameBoolean("RaidIcon", "CIRCLE", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "RaidIcon", "CIRCLE", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","RaidTargetUpdate")
    end
end

function HealBot_Options_BarButtonShowRaidIconDiamond_OnClick(self)
      --HealBot_setCall("HealBot_Options_BarButtonShowRaidIconDiamond_OnClick")
    if hbv_Skins_GetFrameBoolean("RaidIcon", "DIAMOND", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "RaidIcon", "DIAMOND", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","RaidTargetUpdate")
    end
end

function HealBot_Options_BarButtonShowRaidIconTriangle_OnClick(self)
      --HealBot_setCall("HealBot_Options_BarButtonShowRaidIconTriangle_OnClick")
    if hbv_Skins_GetFrameBoolean("RaidIcon", "TRIANGLE", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "RaidIcon", "TRIANGLE", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","RaidTargetUpdate")
    end
end

function HealBot_Options_BarButtonShowRaidIconMoon_OnClick(self)
      --HealBot_setCall("HealBot_Options_BarButtonShowRaidIconMoon_OnClick")
    if hbv_Skins_GetFrameBoolean("RaidIcon", "MOON", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "RaidIcon", "MOON", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","RaidTargetUpdate")
    end
end

function HealBot_Options_BarButtonShowRaidIconSquare_OnClick(self)
      --HealBot_setCall("HealBot_Options_BarButtonShowRaidIconSquare_OnClick")
    if hbv_Skins_GetFrameBoolean("RaidIcon", "SQUARE", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "RaidIcon", "SQUARE", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","RaidTargetUpdate")
    end
end

function HealBot_Options_BarButtonShowRaidIconCross_OnClick(self)
      --HealBot_setCall("HealBot_Options_BarButtonShowRaidIconCross_OnClick")
    if hbv_Skins_GetFrameBoolean("RaidIcon", "CROSS", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "RaidIcon", "CROSS", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","RaidTargetUpdate")
    end
end

function HealBot_Options_BarButtonShowRaidIconSkull_OnClick(self)
      --HealBot_setCall("HealBot_Options_BarButtonShowRaidIconSkull_OnClick")
    if hbv_Skins_GetFrameBoolean("RaidIcon", "SKULL", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "RaidIcon", "SKULL", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","RaidTargetUpdate")
    end
end

function HealBot_Options_SubSortPlayerFirst_OnClick(self)
      --HealBot_setCall("HealBot_Options_SubSortPlayerFirst_OnClick")
    if hbv_Skins_GetFrameBoolean("BarSort", "SUBPF", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarSort", "SUBPF", hb_lVars["Frame"])
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_ShowReadyCheck_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowReadyCheck_OnClick")
    if hbv_Skins_GetFrameBoolean("Icons", "SHOWRC", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Icons", "SHOWRC", hb_lVars["Frame"])
        if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
            if hb_lVars["TestBarsOn"] then
                HealBot_Options_framesChanged(true, true)
            else
                HealBot_Options_CheckReadyCheckEvent()
            end
        end
    end
end

function HealBot_Options_ShowCombatState_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowCombatState_OnClick")
    if hbv_Skins_GetFrameBoolean("Icons", "SHOWCOMBAT", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Icons", "SHOWCOMBAT", hb_lVars["Frame"])
        if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
            if hb_lVars["TestBarsOn"] then
                HealBot_Options_framesChanged(true, true)
            else
                HealBot_Timers_Set("LAST","IconNotInCombat")
            end
        end
    end
end

function HealBot_Options_ShowHostile_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowHostile_OnClick")
    if hbv_Skins_GetFrameBoolean("Icons", "SHOWHOSTILE", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Icons", "SHOWHOSTILE", hb_lVars["Frame"])
        if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
            if hb_lVars["TestBarsOn"] then
                HealBot_Options_framesChanged(true, true)
            else
                HealBot_Timers_Set("AURA","IconUpdHostile")
            end
        end
    end
end

function HealBot_Options_ShowResting_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowResting_OnClick")
    if hbv_Skins_GetFrameBoolean("Icons", "SHOWRESTING", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Icons", "SHOWRESTING", hb_lVars["Frame"])
        HealBot_Timers_Set("PLAYER","SetRestingState")
    end
end

function HealBot_Options_ShowLeader_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowLeader_OnClick")
    if hbv_Skins_GetFrameBoolean("Icons", "SHOWRANK", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Icons", "SHOWRANK", hb_lVars["Frame"])
        if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
            if hb_lVars["TestBarsOn"] then
                HealBot_Options_framesChanged(true, true)
            else
                HealBot_Timers_Set("AURA","IconUpdAllRank")
            end
        end
    end
end

function HealBot_Options_ShowLeaderMainTank_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowLeader_OnClick")
    if hbv_Skins_GetFrameBoolean("Icons", "SHOWRANKMT", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Icons", "SHOWRANKMT", hb_lVars["Frame"])
        if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
            --HealBot_Options_framesChanged(false)
            HealBot_Timers_Set("AURA","IconUpdAllRank",true)
        end
    end
end

function HealBot_Options_ShowAFK_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowAFK_OnClick")
    if hbv_Skins_GetFrameBoolean("Icons", "SHOWAFK", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Icons", "SHOWAFK", hb_lVars["Frame"])
        if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
            if hb_lVars["TestBarsOn"] then
                HealBot_Options_framesChanged(true, true)
            else
                HealBot_Timers_Set("SKINS","UpdateAFK")
            end
        end
    end
end

function HealBot_Options_ShowClassIcon_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowClassIcon_OnClick")
    if hbv_Skins_GetFrameBoolean("Icons", "SHOWCLASS", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Icons", "SHOWCLASS", hb_lVars["Frame"])
        if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
            if hb_lVars["TestBarsOn"] then
                HealBot_Options_framesChanged(true, true)
            else
                HealBot_Timers_Set("AURA","ResetClassIconTexture")
            end
        end
    end
end

function HealBot_Options_ShowRoleIcon_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowRoleIcon_OnClick")
    if hbv_Skins_GetFrameBoolean("Icons", "SHOWROLE", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Icons", "SHOWROLE", hb_lVars["Frame"])
        if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
            if hb_lVars["TestBarsOn"] then
                if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then HealBot_Options_framesChanged(true, true) end
            else
                HealBot_Timers_Set("AURA","ResetClassIconTexture")
            end
        end
    end
end

function HealBot_Options_ShowRoleTankOnly_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowRoleIcon_OnClick")
    if hbv_Skins_GetFrameBoolean("Icons", "SHOWMTONLY", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Icons", "SHOWMTONLY", hb_lVars["Frame"])
        if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
            if not hb_lVars["TestBarsOn"] then
                HealBot_Timers_Set("AURA","ResetClassIconTexture")
            end
        end
    end
end

function HealBot_IconClassIconSet_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconClassVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetVar("IconSet", "CLASS")~=val then
        hbv_Skins_SetVar(val, "IconSet", "CLASS")
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Timers_Set("SKINS","ResetClassRoleIcons")
    end
end

function HealBot_IconRoleIconSet_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconClassVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetVar("IconSet", "ROLE")~=val then
        hbv_Skins_SetVar(val, "IconSet", "ROLE")
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Timers_Set("SKINS","ResetClassRoleIcons")
    end
end

function HealBot_IconClassRole_UpdateIcons()
    HealBot_Options_Skins_EI_ClassIcon01:SetTexture(HealBot_Media_retClassRoleIcon("DRUI"))
    HealBot_Options_Skins_EI_ClassIcon02:SetTexture(HealBot_Media_retClassRoleIcon("PALA"))
    HealBot_Options_Skins_EI_ClassIcon03:SetTexture(HealBot_Media_retClassRoleIcon("PRIE"))
    HealBot_Options_Skins_EI_ClassIcon04:SetTexture(HealBot_Media_retClassRoleIcon("SHAM"))
    HealBot_Options_Skins_EI_RoleIcon01:SetTexture(HealBot_Media_retClassRoleIcon("TANK"))
    HealBot_Options_Skins_EI_RoleIcon02:SetTexture(HealBot_Media_retClassRoleIcon("HEALER"))
    HealBot_Options_Skins_EI_RoleIcon03:SetTexture(HealBot_Media_retClassRoleIcon("DAMAGER"))
end

function HealBot_IconRankIconSet_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconClassVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetVar("IconSet", "RANK")~=val then
        hbv_Skins_SetVar(val, "IconSet", "RANK")
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Timers_Set("SKINS","ResetRankIcons")
    end
end

function HealBot_IconRank_UpdateIcons()
    HealBot_Options_Skins_EI_RankIcon01:SetTexture(HealBot_Media_retRankIcon(1))
    HealBot_Options_Skins_EI_RankIcon02:SetTexture(HealBot_Media_retRankIcon(2))
    HealBot_Options_Skins_EI_RankIcon03:SetTexture(HealBot_Media_retRankIcon(3))
    HealBot_Options_Skins_EI_RankIcon04:SetTexture(HealBot_Media_retRankIcon(5))
end

function HealBot_IconTargetIconSet_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconClassVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetVar("IconSet", "TARGET")~=val then
        hbv_Skins_SetVar(val, "IconSet", "TARGET")
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Timers_Set("SKINS","ResetTargetIcons")
    end
end

function HealBot_IconTarget_UpdateIcons()
    HealBot_Options_Skins_EI_TargetIcon01:SetTexture(HealBot_Media_retTargetIcon(1))
    HealBot_Options_Skins_EI_TargetIcon02:SetTexture(HealBot_Media_retTargetIcon(2))
    HealBot_Options_Skins_EI_TargetIcon03:SetTexture(HealBot_Media_retTargetIcon(3))
    HealBot_Options_Skins_EI_TargetIcon04:SetTexture(HealBot_Media_retTargetIcon(4))
    HealBot_Options_Skins_EI_TargetIcon05:SetTexture(HealBot_Media_retTargetIcon(5))
    HealBot_Options_Skins_EI_TargetIcon06:SetTexture(HealBot_Media_retTargetIcon(6))
    HealBot_Options_Skins_EI_TargetIcon07:SetTexture(HealBot_Media_retTargetIcon(7))
    HealBot_Options_Skins_EI_TargetIcon08:SetTexture(HealBot_Media_retTargetIcon(8))
end

function HealBot_IconReadyCheckIconSet_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconClassVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetVar("IconSet", "RC")~=val then
        hbv_Skins_SetVar(val, "IconSet", "RC")
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Timers_Set("SKINS","ResetReadyCheckIcons")
    end
end

function HealBot_IconReadyCheck_UpdateIcons()
    HealBot_Options_Skins_EI_ReadyCheckIcon01:SetTexture(HealBot_Media_retReadyCheckIcon(hbv_GetStatic("rcWAITING")))
    HealBot_Options_Skins_EI_ReadyCheckIcon02:SetTexture(HealBot_Media_retReadyCheckIcon(hbv_GetStatic("rcREADY")))
    HealBot_Options_Skins_EI_ReadyCheckIcon03:SetTexture(HealBot_Media_retReadyCheckIcon(hbv_GetStatic("rcNOTREADY")))
end

function HealBot_IconStateIconSet_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconClassVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetVar("IconSet", "STATE")~=val then
        hbv_Skins_SetVar(val, "IconSet", "STATE")
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Timers_Set("SKINS","ResetStateIcons")
    end
end

function HealBot_IconState_UpdateIcons()
    HealBot_Options_Skins_EI_StateIcon01:SetTexture(HealBot_Media_retStateIcon("AFK"))
    HealBot_Options_Skins_EI_StateIcon02:SetTexture(HealBot_Media_retStateIcon("REST"))
end

function HealBot_IconCombatIconSet_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconClassVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetVar("IconSet", "COMBAT")~=val then
        hbv_Skins_SetVar(val, "IconSet", "COMBAT")
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Timers_Set("SKINS","ResetCombatIcons")
    end
end

function HealBot_IconCombat_UpdateIcons()
    HealBot_Options_Skins_EI_CombatIcon01:SetTexture(HealBot_Media_retCombatIcon("INCOMBAT"))
    HealBot_Options_Skins_EI_CombatIcon02:SetTexture(HealBot_Media_retCombatIcon("HOSTILE"))
end

function HealBot_IconClassVOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconClassVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Icons", "CLASSVOFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "CLASSVOFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_IconClassHOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconClassHOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Icons", "CLASSHOFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "CLASSHOFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_IconClassScale_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconClassScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=HealBot_Util_Round(self:GetValue(), 1)
    val=val/10;
    if hbv_Skins_GetFrameVar("Icons", "CLASSSCALE", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "CLASSSCALE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_IconClassAlwaysEnabled_OnClick(self)
      --HealBot_setCall("HealBot_IconClassAlwaysEnabled_OnClick")
    if hbv_Skins_GetFrameBoolean("Icons", "CLASSEN", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Icons", "CLASSEN", hb_lVars["Frame"])
        HealBot_Options_framesChanged(false)
        HealBot_Update_AllExtraIcons(nil, 91)
    end
end

function HealBot_IconTargetVOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconTargetVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Icons", "TARGETVOFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "TARGETVOFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_IconTargetHOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconTargetHOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Icons", "TARGETHOFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "TARGETHOFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_IconTargetScale_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconTargetScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=HealBot_Util_Round(self:GetValue(), 1)
    val=val/10;
    if hbv_Skins_GetFrameVar("Icons", "TARGETSCALE", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "TARGETSCALE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_IconTargetAlwaysEnabled_OnClick(self)
      --HealBot_setCall("HealBot_IconTargetAlwaysEnabled_OnClick")
    if hbv_Skins_GetFrameBoolean("Icons", "TARGETEN", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Icons", "TARGETEN", hb_lVars["Frame"])
        HealBot_Options_framesChanged(false)
        HealBot_Update_AllExtraIcons(nil, 92)
    end
end

function HealBot_IconRankVOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconRankVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Icons", "RANKVOFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "RANKVOFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_IconRankHOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconRankHOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Icons", "RANKHOFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "RANKHOFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_IconCombatVOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconCombatVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Icons", "COMBATVOFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "COMBATVOFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_IconCombatHOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconCombatHOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Icons", "COMBATHOFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "COMBATHOFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_IconRCVOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconRCVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Icons", "RCVOFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "RCVOFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_IconRCHOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconRCHOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Icons", "RCHOFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "RCHOFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_IconRankScale_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconRankScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=HealBot_Util_Round(self:GetValue(), 1)
    val=val/10;
    if hbv_Skins_GetFrameVar("Icons", "RANKSCALE", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "RANKSCALE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_IconCombatScale_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconCombatScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=HealBot_Util_Round(self:GetValue(), 1)
    val=val/10;
    if hbv_Skins_GetFrameVar("Icons", "COMBATSCALE", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "COMBATSCALE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_IconRCScale_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconRCScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=HealBot_Util_Round(self:GetValue(), 1)
    val=val/10;
    if hbv_Skins_GetFrameVar("Icons", "RCSCALE", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "RCSCALE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_IconRankAlwaysEnabled_OnClick(self)
      --HealBot_setCall("HealBot_IconRankAlwaysEnabled_OnClick")
    if hbv_Skins_GetFrameBoolean("Icons", "RANKEN", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Icons", "RANKEN", hb_lVars["Frame"])
        HealBot_Options_framesChanged(false)
        HealBot_Update_AllExtraIcons(nil, 93)
    end
end

function HealBot_IconCombatAlwaysEnabled_OnClick(self)
      --HealBot_setCall("HealBot_IconCombatAlwaysEnabled_OnClick")
    if hbv_Skins_GetFrameBoolean("Icons", "COMBATEN", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Icons", "COMBATEN", hb_lVars["Frame"])
        HealBot_Options_framesChanged(false)
        HealBot_Update_AllExtraIcons(nil, 93)
    end
end

function HealBot_IconRCAlwaysEnabled_OnClick(self)
      --HealBot_setCall("HealBot_IconRCAlwaysEnabled_OnClick")
    if hbv_Skins_GetFrameBoolean("Icons", "RCEN", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Icons", "RCEN", hb_lVars["Frame"])
        HealBot_Options_framesChanged(false)
        HealBot_Update_AllExtraIcons(nil, 93)
    end
end

function HealBot_IconOORArrowVOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconOORArrowVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Icons", "OORVOFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "OORVOFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_IconOORArrowHOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconOORArrowHOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Icons", "OORHOFFSET", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "OORHOFFSET", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_IconOORArrowScale_OnValueChanged(self)
      --HealBot_setCall("HealBot_IconOORArrowScale_OnValueChanged")
--    local val=floor(self:GetValue()+0.5)
    local val=HealBot_Util_Round(self:GetValue(), 1)
    val=val/10;
    if hbv_Skins_GetFrameVar("Icons", "OORSCALE", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Icons", "OORSCALE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_IconOORArrowAlwaysEnabled_OnClick(self)
      --HealBot_setCall("HealBot_IconOORArrowAlwaysEnabled_OnClick")
    if hbv_Skins_GetFrameBoolean("Icons", "OOREN", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Icons", "OOREN", hb_lVars["Frame"])
        HealBot_Update_AllExtraIcons(nil, 94)
    end
end

function HealBot_SkinsSpellsUse_OnClick(self)
      --HealBot_setCall("HealBot_SkinsSpellsUse_OnClick")
    if hbv_Skins_GetFrameBoolean("Emerg", "USE", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "Emerg", "USE", hb_lVars["Frame"])
        HealBot_Options_framesChanged(true)
        HealBot_Timers_Set("SKINS","UpdateEmergBars")
    end
end

function HealBot_Options_ShowDirection_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowDirection_OnClick")
    hbv_Skins_SetFrameVar(self:GetChecked(), "Icons", "SHOWDIR", hb_lVars["Frame"])
end

function HealBot_Options_ShowDirectionMouseOver_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowDirectionMouseOver_OnClick")
    hbv_Skins_SetFrameVar(self:GetChecked(), "Icons", "SHOWDIRMOUSE", hb_lVars["Frame"])
end

function HealBot_Options_CheckReadyCheckEvent()
      --HealBot_setCall("HealBot_Options_CheckReadyCheckEvent")
    local noReadyCheck=true
    for h=1,10 do
        if hbv_Skins_GetFrameBoolean("Icons", "SHOWRC", h) then
            noReadyCheck=false
            break
        end
    end
    if noReadyCheck then
        HealBot_UnRegister_ReadyCheck()
        HealBot_Timers_Set("LAST","ReadyCheckClear")
    else
        HealBot_Register_ReadyCheck()
        HealBot_Timers_Set("LAST","ReadyCheck")
    end
end

function HealBot_Options_RaidTargetUpdate()
      --HealBot_setCall("HealBot_Options_RaidTargetUpdate")
    local tVal=false
    for j=1,10 do
        if hbv_Skins_GetFrameBoolean("RaidIcon", "SHOW", j) then
            tVal=true
            break
        end
    end
    HealBot_setRaidTargetChecked()
    HealBot_RaidTargetToggle(tVal)
end

function HealBot_BarButtonShowHoTTextCount_OnClick(self) -- This is now debuffs
      --HealBot_setCall("HealBot_BarButtonShowHoTTextCount_OnClick")
    hbv_Skins_SetIconTextVar(self:GetChecked(), "DBSCNT", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
    HealBot_Timers_Set("AURA","UpdateAllDebuffIcons")
    if hb_lVars["TestBarsOn"] and HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then HealBot_Options_framesChanged(true, true) end
end

function HealBot_BarButtonShowBuffTextCount_OnClick(self)
      --HealBot_setCall("HealBot_BarButtonShowBuffTextCount_OnClick")
    hbv_Skins_SetIconTextVar(self:GetChecked(), "BUFFSCNT", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
    HealBot_Timers_Set("AURA","UpdateAllBuffIcons")
    if hb_lVars["TestBarsOn"] and HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then HealBot_Options_framesChanged(true, true) end
end

function HealBot_BarButtonShowBuffTextCountSelfCast_OnClick(self)
      --HealBot_setCall("HealBot_BarButtonShowBuffTextCountSelfCast_OnClick")
    hbv_Skins_SetIconTextVar(self:GetChecked(), "BUFFSSCNT", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
    HealBot_Timers_Set("AURA","UpdateAllBuffIcons")
end

function HealBot_BarButtonShowHoTTextDuration_OnClick(self) -- This is now debuffs
      --HealBot_setCall("HealBot_BarButtonShowHoTTextDuration_OnClick")
    hbv_Skins_SetIconTextVar(self:GetChecked(), "DBSDUR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
    HealBot_Timers_Set("AURA","UpdateAllDebuffIcons")
    if hb_lVars["TestBarsOn"] and HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then HealBot_Options_framesChanged(true, true) end
end

function HealBot_BarButtonShowBuffTextDuration_OnClick(self)
      --HealBot_setCall("HealBot_BarButtonShowBuffTextDuration_OnClick")
    hbv_Skins_SetIconTextVar(self:GetChecked(), "BUFFSDUR", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
    HealBot_Timers_Set("AURA","UpdateAllBuffIcons")
    if hb_lVars["TestBarsOn"] and HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then HealBot_Options_framesChanged(true, true) end
end

function HealBot_Options_SelfCastIndicator_OnClick(self)
      --HealBot_setCall("HealBot_Options_SelfCastIndicator_OnClick")
    hbv_Skins_SetFrameVar(self:GetChecked(), "IconText", "SELFIND", hb_lVars["Frame"])
    HealBot_Options_framesChanged(false, false, true)
    HealBot_Timers_Set("AURA","UpdateAllBuffIcons")
end

function HealBot_BarButtonShowBuffTextDurationSelfCast_OnClick(self)
      --HealBot_setCall("HealBot_BarButtonShowBuffTextDurationSelfCast_OnClick")
    hbv_Skins_SetIconTextVar(self:GetChecked(), "BUFFSSDUR", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
    HealBot_Timers_Set("AURA","UpdateAllBuffIcons")
end

function HealBot_Options_ShowHealthOnBar_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowHealthOnBar_OnClick")
    if hbv_Skins_GetFrameBoolean("BarText", "HLTHONBAR", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarText", "HLTHONBAR", hb_lVars["Frame"])
        if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
            if hb_lVars["TestBarsOn"] then
                HealBot_Timers_Set("SKINS","UpdateTextButtons")
            else
                HealBot_Options_HealthUpdateText()
            end
        end
    end
end

function HealBot_Options_HideHealthOnMax_OnClick(self)
      --HealBot_setCall("HealBot_Options_HideHealthOnMax_OnClick")
    if hbv_Skins_GetFrameBoolean("BarText", "HLTHMAXHIDE", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarText", "HLTHMAXHIDE", hb_lVars["Frame"])
        if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
            if hb_lVars["TestBarsOn"] then
                HealBot_Timers_Set("SKINS","UpdateTextButtons")
            else
                HealBot_Options_HealthUpdateText()
            end
        end
    end
end

function HealBot_Options_HealthUpdateText()
    HealBot_Timers_Set("SKINS","TextUpdateHealth")
    if hbv_Skins_GetFrameVar("BarText", "STATETXTANCHOR", hb_lVars["Frame"]) == 4 or
       hbv_Skins_GetFrameVar("BarText", "STATETXTANCHOR", hb_lVars["Frame"]) == 6 then
        HealBot_Timers_Set("SKINS","TextUpdateNames")
    end
end

function HealBot_Options_HealthIncludePercent_OnClick(self)
      --HealBot_setCall("HealBot_Options_HealthIncludePercent_OnClick")
    if hbv_Skins_GetFrameBoolean("BarText", "HLTHINCPTC", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarText", "HLTHINCPTC", hb_lVars["Frame"])
        if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
            if hb_lVars["TestBarsOn"] then
                HealBot_Timers_Set("SKINS","UpdateTextButtons")
            else
                HealBot_Options_HealthUpdateText()
            end
        end
    end
end

function HealBot_Options_HealthInVehicleShowPlayer_OnClick(self)
      --HealBot_setCall("HealBot_Options_HealthInVehicleShowPlayer_OnClick")
    if hbv_Skins_GetFrameBoolean("BarText", "HLTHINVEHSHOWPLAYER", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarText", "HLTHINVEHSHOWPLAYER", hb_lVars["Frame"])
        if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
            if hb_lVars["TestBarsOn"] then
                HealBot_Timers_Set("SKINS","UpdateTextButtons")
            else
                HealBot_Options_HealthUpdateText()
            end
        end
    end
end

function HealBot_Options_ShowTextOnAuxBar_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTextOnAuxBar_OnClick")
    if hbv_Aux_GetBarBoolean("TEXT", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])~=self:GetChecked() then
        hbv_Data_AuxSetBarVar(self:GetChecked(), "TEXT", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])
        HealBot_Globals.AuxTextPrefs[hbv_Aux_GetBarVar("USE", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])]=self:GetChecked()
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_Options_framesChanged(false)
        HealBot_Timers_Set("AUX","UpdateAllAuxByType")
    end
end

function HealBot_Options_VerticalTextOnAuxBar_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowTextOnAuxBar_OnClick")
    if hbv_Aux_GetBarBoolean("VERTICALTEXT", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])~=self:GetChecked() then
        hbv_Data_AuxSetBarVar(self:GetChecked(), "VERTICALTEXT", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])
        HealBot_Options_framesChanged(false)
        HealBot_Timers_Set("AUX","UpdateAllAuxByType")
    end
end

function HealBot_Options_IgnoreIncomingHealOnFull_OnClick(self)
      --HealBot_setCall("HealBot_Options_IgnoreIncomingHealOnFull_OnClick")
    if hbv_Skins_GetFrameBoolean("BarText", "IGNOREONFULL", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarText", "IGNOREONFULL", hb_lVars["Frame"])
        --HealBot_Timers_Set("SKINS","SkinsFormat")
    end
end

function HealBot_Debuffx2Bar_OnClick(self)
      --HealBot_setCall("HealBot_Debuffx2Bar_OnClick")
    if hbv_Skins_GetIconBoolean("DEBUFFDOUBLE", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])~=self:GetChecked() then
        hbv_Skins_SetIconVar(self:GetChecked(), "DEBUFFDOUBLE", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
        HealBot_Options_framesChanged(true, true)
        HealBot_Timers_Set("AURA","UpdateAllDebuffIcons")
    end
end

function HealBot_Buffx2Bar_OnClick(self)
      --HealBot_setCall("HealBot_Buffx2Bar_OnClick")
    if hbv_Skins_GetIconBoolean("BUFFDOUBLE", hb_lVars["Frame"], hb_lVars["BuffIconSet"])~=self:GetChecked() then
        hbv_Skins_SetIconVar(self:GetChecked(), "BUFFDOUBLE", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
        HealBot_Options_framesChanged(true, true)
        HealBot_Timers_Set("AURA","UpdateAllBuffIcons")
    end
end

function HealBot_BarButtonIconAlwaysEnabled_OnClick(self)
      --HealBot_setCall("HealBot_BarButtonIconAlwaysEnabled_OnClick")
    if hbv_Skins_GetIconBoolean("DI15EN", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])~=self:GetChecked() then
        hbv_Skins_SetIconVar(self:GetChecked(), "DI15EN", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
        HealBot_Options_framesChanged(false)
        if not hb_lVars["TestBarsOn"] then
            HealBot_Timers_Set("AURA","UpdateAllDebuffIcons")
        end
    end
end

function HealBot_BarButtonIconBuffAlwaysEnabled_OnClick(self)
      --HealBot_setCall("HealBot_BarButtonIconBuffAlwaysEnabled_OnClick")
    if hbv_Skins_GetIconBoolean("BUFFI15EN", hb_lVars["Frame"], hb_lVars["BuffIconSet"])~=self:GetChecked() then
        hbv_Skins_SetIconVar(self:GetChecked(), "BUFFI15EN", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
        HealBot_Options_framesChanged(false)
        if not hb_lVars["TestBarsOn"] then
            HealBot_Timers_Set("AURA","UpdateAllBuffIcons")
        end
    end
end

function HealBot_BarButtonIconFadeOnExpire_OnClick(self)
      --HealBot_setCall("HealBot_BarButtonIconFadeOnExpire_OnClick")
    if hbv_Skins_GetIconBoolean("DFADE", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])~=self:GetChecked() then
        hbv_Skins_SetIconVar(self:GetChecked(), "DFADE", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_BarButtonIconBuffFadeOnExpire_OnClick(self)
      --HealBot_setCall("HealBot_BarButtonIconBuffFadeOnExpire_OnClick")
    if hbv_Skins_GetIconBoolean("BUFFFADE", hb_lVars["Frame"], hb_lVars["BuffIconSet"])~=self:GetChecked() then
        hbv_Skins_SetIconVar(self:GetChecked(), "BUFFFADE", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_ProtectPvP_OnClick(self)
      --HealBot_setCall("HealBot_Options_ProtectPvP_OnClick")
    HealBot_Globals.ProtectPvP=self:GetChecked()
end

function HealBot_Options_ShowRoleOnBar_OnClick(self)
      --HealBot_setCall("HealBot_Options_ShowRoleOnBar_OnClick")
    if hbv_Skins_GetFrameBoolean("BarText", "SHOWROLE", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "BarText", "SHOWROLE", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","TextUpdateNames")
    end
end

--------------------------------------------------------------------------------

function HealBot_Options_VisiblityInCombat_DropDown(object, var)
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_TargetFocusInCombat_List), 1 do
        info.text=HealBot_Options_TargetFocusInCombat_List[j];
        info.func=function(self)
                        if hbv_Skins_GetVar("Healing", var) ~= self:GetID() then
                            hbv_Skins_SetVar(self:GetID(), "Healing", var)
                            UIDropDownMenu_SetText(object,HealBot_Options_TargetFocusInCombat_List[hbv_Skins_GetVar("Healing", var)])
                            HealBot_Options_framesChanged(false)
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetVar("Healing", var) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_TargetInCombat_DropDown()
      --HealBot_setCall("HealBot_Options_TargetInCombat_DropDown")
    HealBot_Options_VisiblityInCombat_DropDown(HealBot_Options_TargetInCombat, "TARGETINCOMBAT")
end

function HealBot_Options_ToTInCombat_DropDown()
      --HealBot_setCall("HealBot_Options_TargetInCombat_DropDown")
    HealBot_Options_VisiblityInCombat_DropDown(HealBot_Options_ToTInCombat, "TOTINCOMBAT")
end

function HealBot_Options_FocusInCombat_DropDown()
      --HealBot_setCall("HealBot_Options_FocusInCombat_DropDown")
    HealBot_Options_VisiblityInCombat_DropDown(HealBot_Options_FocusInCombat, "FOCUSINCOMBAT")
end

function HealBot_Options_ToFInCombat_DropDown()
      --HealBot_setCall("HealBot_Options_FocusInCombat_DropDown")
    HealBot_Options_VisiblityInCombat_DropDown(HealBot_Options_ToFInCombat, "TOFINCOMBAT")
end

function HealBot_Options_PrivateFocusInCombat_DropDown()
      --HealBot_setCall("HealBot_Options_FocusInCombat_DropDown")
    HealBot_Options_VisiblityInCombat_DropDown(HealBot_Options_PrivateFocusInCombat, "PRIVFOCUSINCOMBAT")
end

function HealBot_Options_PrivFocusToTInCombat_DropDown()
      --HealBot_setCall("HealBot_Options_FocusInCombat_DropDown")
    HealBot_Options_VisiblityInCombat_DropDown(HealBot_Options_PrivFocusToTInCombat, "PRIVFOCUSTOTINCOMBAT")
end

--------------------------------------------------------------------------------

hb_lVars["hbBarHealthNumFormatTxt"]="1,2K"

function HealBot_Options_BarHealthNumFormat_genList()
      --HealBot_setCall("HealBot_Options_BarHealthNumFormat_genList")
    local HealBot_Options_BarHealthNumFormat_List={}
    if hbv_Skins_GetFrameVar("BarText", "HLTHTYPE", hb_lVars["Frame"]) == 1 then
        local HealBot_Options_BarHealthNumFormat1h_List={
            "1234",
            "1K",
            "1.2K",
            "1.23K",
            "1.234K",
            HEALBOT_WORD_AUTO,
        }
        HealBot_Options_BarHealthNumFormat_List=HealBot_Options_BarHealthNumFormat1h_List
    elseif hbv_Skins_GetFrameVar("BarText", "HLTHTYPE", hb_lVars["Frame"]) == 2 then
        local HealBot_Options_BarHealthNumFormat1d_List={
            "-4321",
            "-4K",
            "-4.3K",
            "-4.32K",
            "-4.321K",
            HEALBOT_WORD_AUTO,
        }
        HealBot_Options_BarHealthNumFormat_List=HealBot_Options_BarHealthNumFormat1d_List
    else
        local HealBot_Options_BarHealthNumFormat1p_List={
            "11%",
            "22%",
            "33%",
            "44%",
            "55%",
            HEALBOT_WORD_AUTO,
        }
        HealBot_Options_BarHealthNumFormat_List=HealBot_Options_BarHealthNumFormat1p_List
    end
    if hbv_Skins_GetFrameVar("BarText", "NUMFORMAT1", hb_lVars["Frame"]) > 6 then
        hbv_Skins_SetFrameVar(6, "BarText", "NUMFORMAT1", hb_lVars["Frame"])
    end
    hb_lVars["hbBarHealthNumFormatTxt"]=HealBot_Options_BarHealthNumFormat_List[hbv_Skins_GetFrameVar("BarText", "NUMFORMAT1", hb_lVars["Frame"])]
    return HealBot_Options_BarHealthNumFormat_List
end

function HealBot_Options_BarHealthNumFormat1_DropDown()
      --HealBot_setCall("HealBot_Options_BarHealthNumFormat1_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local HealBot_Options_BarHealthNumFormat1_List=HealBot_Options_BarHealthNumFormat_genList()
    for j=1, getn(HealBot_Options_BarHealthNumFormat1_List), 1 do
        info.text=HealBot_Options_BarHealthNumFormat1_List[j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarText", "NUMFORMAT1", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarText", "NUMFORMAT1", hb_lVars["Frame"])
                            hb_lVars["hbBarHealthNumFormatTxt"]=self:GetText()
                            UIDropDownMenu_SetText(HealBot_Options_BarHealthNumFormat1,HealBot_Options_BarHealthNumFormat1_List[hbv_Skins_GetFrameVar("BarText", "NUMFORMAT1", hb_lVars["Frame"])])
                            HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
                            HealBot_Timers_Set("SKINS","SkinsFormat")
                            HealBot_Options_HealthUpdateText()
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarText", "NUMFORMAT1", hb_lVars["Frame"]) == j then
            hb_lVars["hbBarHealthNumFormatTxt"]=HealBot_Options_BarHealthNumFormat1_List[j]
            info.checked=true
        end
        UIDropDownMenu_AddButton(info);
    end
end

--------------------------------------------------------------------------------

local HealBot_Options_BarHealthNumFormat2_List={
    " ", " ",
    "(", ")",
    "[", "]",
    "{", "}",
    "<", ">",
    "~", " ",
    ":", ":",
    "*", "*",
}

function HealBot_Options_BarHealthNumFormat2_DropDown()
      --HealBot_setCall("HealBot_Options_BarHealthNumFormat2_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local i=0
    for j=1, getn(HealBot_Options_BarHealthNumFormat2_List), 2 do
        i=i+1
        local nFormat=HealBot_Options_BarHealthNumFormat2_List[j]..hb_lVars["hbBarHealthNumFormatTxt"]..HealBot_Options_BarHealthNumFormat2_List[j+1];
        info.text=nFormat
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarText", "NUMFORMAT2", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarText", "NUMFORMAT2", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_BarHealthNumFormat2,nFormat)
                            HealBot_Timers_Set("SKINS","SkinsFormat")
                            HealBot_Options_HealthUpdateText()
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarText", "NUMFORMAT2", hb_lVars["Frame"]) == i then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

--------------------------------------------------------------------------------

function HealBot_Options_BarHealthNumFormatAggro_DropDown()
      --HealBot_setCall("HealBot_Options_BarHealthNumFormatAggro_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local i=0
    for j=1, getn(HealBot_Options_BarHealthNumFormat2_List), 2 do
        local nFormat=HealBot_Options_BarHealthNumFormat2_List[j].."77%"..HealBot_Options_BarHealthNumFormat2_List[j+1];
        i=i+1
        info.text=nFormat
        info.func=function(self)
                        hbv_Skins_SetFrameVar(self:GetID(), "BarAggro", "TEXTFORMAT", hb_lVars["Frame"])
                        UIDropDownMenu_SetText(HealBot_Options_BarHealthNumFormatAggro,nFormat)
                        HealBot_Timers_Set("SKINS","SkinsFormat")
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarAggro", "TEXTFORMAT", hb_lVars["Frame"]) == i then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_AggroTextIndicator_DropDown()
      --HealBot_setCall("HealBot_Options_AggroTextIndicator_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AggroNameFormat"]), 1 do
        info.text=HealBot_Options_Lists["AggroNameFormat"][j]
        info.func=function(self)
                        hbv_Skins_SetFrameVar(self:GetID(), "BarAggro", "SHOWTEXT", hb_lVars["Frame"])
                        UIDropDownMenu_SetText(HealBot_Options_AggroTextIndicator,HealBot_Options_Lists["AggroNameFormat"][hbv_Skins_GetFrameVar("BarAggro", "SHOWTEXT", hb_lVars["Frame"])])
                        HealBot_Timers_Set("SKINS","TextUpdateNames")
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarAggro", "SHOWTEXT", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

--------------------------------------------------------------------------------
function HealBot_Options_HealGroupsFrame_Changed()
    if hb_lVars["TestBarsOn"] then
        HealBot_Options_framesChanged(true, true, true, true, true)
    else
        HealBot_Options_framesChanged(false)
    end
end

function HealBot_Options_HealGroupsFrame_DropDown(info, object, id)
      --HealBot_setCall("HealBot_Options_HealGroupsFrame_DropDown")
    for j=1, 5, 1 do
        info.text=HealBot_Options_HealGroupsFrame_List[j];
        info.func=function(self)
                        if Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][id]["FRAME"]~=self:GetID() then
                            Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][id]["FRAME"]=self:GetID()
                            UIDropDownMenu_SetText(object,HealBot_Options_HealGroupsFrame_List[Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][id]["FRAME"]])
                            HealBot_Options_HealGroupsFrame_Changed()
                        end
                    end
        info.checked=false;
        if Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][id]["FRAME"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_HealGroups1Frame_DropDown()
      --HealBot_setCall("HealBot_Options_HealGroups1Frame_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    HealBot_Options_HealGroupsFrame_DropDown(info, HealBot_Options_HealGroups1Frame, 1)
end

function HealBot_Options_HealGroups2Frame_DropDown()
      --HealBot_setCall("HealBot_Options_HealGroups2Frame_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    HealBot_Options_HealGroupsFrame_DropDown(info, HealBot_Options_HealGroups2Frame, 2)
end

function HealBot_Options_HealGroups3Frame_DropDown()
      --HealBot_setCall("HealBot_Options_HealGroups3Frame_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    HealBot_Options_HealGroupsFrame_DropDown(info, HealBot_Options_HealGroups3Frame, 3)
end

function HealBot_Options_HealGroups4Frame_DropDown()
      --HealBot_setCall("HealBot_Options_HealGroups4Frame_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    HealBot_Options_HealGroupsFrame_DropDown(info, HealBot_Options_HealGroups4Frame, 4)
end

function HealBot_Options_HealGroups5Frame_DropDown()
      --HealBot_setCall("HealBot_Options_HealGroups5Frame_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    HealBot_Options_HealGroupsFrame_DropDown(info, HealBot_Options_HealGroups5Frame, 5)
end

function HealBot_Options_HealGroups6Frame_DropDown()
      --HealBot_setCall("HealBot_Options_HealGroups6Frame_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    HealBot_Options_HealGroupsFrame_DropDown(info, HealBot_Options_HealGroups6Frame, 6)
end

function HealBot_Options_HealGroups7Frame_DropDown()
      --HealBot_setCall("HealBot_Options_HealGroups6Frame_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    HealBot_Options_HealGroupsFrame_DropDown(info, HealBot_Options_HealGroups7Frame, 7)
end

function HealBot_Options_HealGroups8Frame_DropDown()
      --HealBot_setCall("HealBot_Options_HealGroups8Frame_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    HealBot_Options_HealGroupsFrame_DropDown(info, HealBot_Options_HealGroups8Frame, 8)
end

function HealBot_Options_HealGroups9Frame_DropDown()
      --HealBot_setCall("HealBot_Options_HealGroups9Frame_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    HealBot_Options_HealGroupsFrame_DropDown(info, HealBot_Options_HealGroups9Frame, 9)
    info.text=HEALBOT_VEHICLE_en
    info.func=function(self)
                    Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][9]["FRAME"]=6
                    UIDropDownMenu_SetText(HealBot_Options_HealGroups9Frame,HEALBOT_VEHICLE_en)
                    HealBot_Options_HealGroupsFrame_Changed()
                end
    info.checked=false;
    if Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][9]["FRAME"] == 6 then info.checked=true end
    UIDropDownMenu_AddButton(info);
end

function HealBot_Options_HealGroups10Frame_DropDown()
      --HealBot_setCall("HealBot_Options_HealGroups10Frame_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    HealBot_Options_HealGroupsFrame_DropDown(info, HealBot_Options_HealGroups10Frame, 10)
    info.text=HEALBOT_OPTIONS_PETHEALS_en
    info.func=function(self)
                    Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][10]["FRAME"]=7
                    UIDropDownMenu_SetText(HealBot_Options_HealGroups10Frame,HEALBOT_OPTIONS_PETHEALS_en)
                    HealBot_Options_HealGroupsFrame_Changed()
                end
    info.checked=false;
    if Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][10]["FRAME"] == 7 then info.checked=true end
    UIDropDownMenu_AddButton(info)
end

function HealBot_Options_HealGroups11Frame_DropDown()
      --HealBot_setCall("HealBot_Options_HealGroups10Frame_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    HealBot_Options_HealGroupsFrame_DropDown(info, HealBot_Options_HealGroups11Frame, 11)
    info.text=HEALBOT_OPTIONS_TARGETHEALS_en
    info.func=function(self)
                    Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][11]["FRAME"]=8
                    UIDropDownMenu_SetText(HealBot_Options_HealGroups11Frame,HEALBOT_OPTIONS_TARGETHEALS_en)
                    HealBot_Options_HealGroupsFrame_Changed()
                end
    info.checked=false;
    if Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][11]["FRAME"] == 8 then info.checked=true end
    UIDropDownMenu_AddButton(info)
end

function HealBot_Options_HealGroups12Frame_DropDown()
      --HealBot_setCall("HealBot_Options_HealGroups10Frame_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    HealBot_Options_HealGroupsFrame_DropDown(info, HealBot_Options_HealGroups12Frame, 12)
    info.text=HEALBOT_OPTIONS_TARGETHEALS_en
    info.func=function(self)
                    Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][12]["FRAME"]=8
                    UIDropDownMenu_SetText(HealBot_Options_HealGroups12Frame,HEALBOT_OPTIONS_TARGETHEALS_en)
                    HealBot_Options_HealGroupsFrame_Changed()
                end
    info.checked=false;
    if Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][12]["FRAME"] == 8 then info.checked=true end
    UIDropDownMenu_AddButton(info)
end

function HealBot_Options_HealGroups13Frame_DropDown()
      --HealBot_setCall("HealBot_Options_HealGroups10Frame_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    HealBot_Options_HealGroupsFrame_DropDown(info, HealBot_Options_HealGroups13Frame, 13)
    info.text=HEALBOT_FOCUS_en
    info.func=function(self)
                    Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][13]["FRAME"]=9
                    UIDropDownMenu_SetText(HealBot_Options_HealGroups13Frame,HEALBOT_FOCUS_en)
                    HealBot_Options_HealGroupsFrame_Changed()
                end
    info.checked=false;
    if Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][13]["FRAME"] == 9 then info.checked=true end
    UIDropDownMenu_AddButton(info)
end

function HealBot_Options_HealGroups14Frame_DropDown()
      --HealBot_setCall("HealBot_Options_HealGroups14Frame_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    HealBot_Options_HealGroupsFrame_DropDown(info, HealBot_Options_HealGroups14Frame, 14)
    info.text=HEALBOT_FOCUS_en
    info.func=function(self)
                    Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][14]["FRAME"]=9
                    UIDropDownMenu_SetText(HealBot_Options_HealGroups14Frame,HEALBOT_FOCUS_en)
                    HealBot_Options_HealGroupsFrame_Changed()
                end
    info.checked=false;
    if Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][14]["FRAME"] == 9 then info.checked=true end
    UIDropDownMenu_AddButton(info)
end

function HealBot_Options_HealGroups15Frame_DropDown()
      --HealBot_setCall("HealBot_Options_HealGroups15Frame_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    info.text=HEALBOT_CUSTOM_CASTBY_ENEMY_en
    info.checked=true;
    UIDropDownMenu_AddButton(info);
end

--------------------------------------------------------------------------------

function HealBot_Options_AliasFontOutline_DropDown()
      --HealBot_setCall("HealBot_Options_AliasFontOutline_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_FontOutline_List), 1 do
        info.text=HealBot_Options_FontOutline_List[j];
        info.func=function(self)
                        hbv_Skins_SetFrameVar(self:GetID(), "FrameAlias", "OUTLINE", hb_lVars["Frame"])
                        UIDropDownMenu_SetText(HealBot_Options_AliasFontOutline,HealBot_Options_FontOutline_List[hbv_Skins_GetFrameVar("FrameAlias", "OUTLINE", hb_lVars["Frame"])])
                        HealBot_Timers_Set("SKINS","FrameAliases")
                        HealBot_Timers_Set("SKINS","SetSkinText",true)
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("FrameAlias", "OUTLINE", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_HeadFontOutline_DropDown()
      --HealBot_setCall("HealBot_Options_HeadFontOutline_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_FontOutline_List), 1 do
        info.text=HealBot_Options_FontOutline_List[j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("HeadText", "OUTLINE", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "HeadText", "OUTLINE", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_HeadFontOutline,HealBot_Options_FontOutline_List[hbv_Skins_GetFrameVar("HeadText", "OUTLINE", hb_lVars["Frame"])])
                            HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("HeadText", "OUTLINE", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

--------------------------------------------------------------------------------

function HealBot_Options_IconFontOutline_DropDown()
      --HealBot_setCall("HealBot_Options_IconFontOutline_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_FontOutline_List), 1 do
        info.text=HealBot_Options_FontOutline_List[j];
        info.func=function(self)
                        if hbv_Skins_GetIconTextVar("DBOUTLINE", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]) ~= self:GetID() then
                            hbv_Skins_SetIconTextVar(self:GetID(), "DBOUTLINE", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
                            UIDropDownMenu_SetText(HealBot_Options_IconFontOutline,HealBot_Options_FontOutline_List[hbv_Skins_GetIconTextVar("DBOUTLINE", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])])
                            HealBot_Options_framesChanged(true, true)
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetIconTextVar("DBOUTLINE", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_IconBuffFontOutline_DropDown()
      --HealBot_setCall("HealBot_Options_IconBuffFontOutline_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_FontOutline_List), 1 do
        info.text=HealBot_Options_FontOutline_List[j];
        info.func=function(self)
                        if hbv_Skins_GetIconTextVar("BUFFOUTLINE", hb_lVars["Frame"], hb_lVars["BuffIconSet"]) ~= self:GetID() then
                            hbv_Skins_SetIconTextVar(self:GetID(), "BUFFOUTLINE", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
                            UIDropDownMenu_SetText(HealBot_Options_IconBuffFontOutline,HealBot_Options_FontOutline_List[hbv_Skins_GetIconTextVar("BUFFOUTLINE", hb_lVars["Frame"], hb_lVars["BuffIconSet"])])
                            HealBot_Options_framesChanged(true, true)
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetIconTextVar("BUFFOUTLINE", hb_lVars["Frame"], hb_lVars["BuffIconSet"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_UnitInCombat_DropDown()
      --HealBot_setCall("HealBot_Options_UnitInCombat_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["UnitInCombat"]), 1 do
        info.text=HealBot_Options_Lists["UnitInCombat"][j];
        info.func=function(self)
                        hbv_Skins_SetVar(self:GetID(), "General", "UNITINCOMBAT")
                        UIDropDownMenu_SetText(HealBot_Options_UnitInCombat,HealBot_Options_Lists["UnitInCombat"][hbv_Skins_GetVar("General", "UNITINCOMBAT")])
                    end
        info.checked=false;
        if hbv_Skins_GetVar("General", "UNITINCOMBAT") == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_IconDebuffPosition_DropDown()
      --HealBot_setCall("HealBot_Options_IconDebuffPosition_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["IconPosition"]), 1 do
        info.text=HealBot_Options_Lists["IconPosition"][j];
        info.func=function(self)
                        if hbv_Skins_GetIconVar("DEBUFFONBAR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]) ~= self:GetID() then
                            hbv_Skins_SetIconVar(self:GetID(), "DEBUFFONBAR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
                            UIDropDownMenu_SetText(HealBot_Options_IconDebuffPosition,HealBot_Options_Lists["IconPosition"][hbv_Skins_GetIconVar("DEBUFFONBAR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])])
                            local list=HealBot_Options_AnchorList(hbv_Skins_GetIconVar("DEBUFFONBAR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]), false)
                            if hbv_Skins_GetIconVar("DEBUFFONBAR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]) == 1 then
                                UIDropDownMenu_SetText(HealBot_Options_IconDebuffAnchor,list[hbv_Skins_GetIconVar("DEBUFFANCHOR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])])
                            elseif hbv_Skins_GetIconVar("DEBUFFONBAR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]) == 2 then
                                if hbv_Skins_GetIconVar("DEBUFFANCHOR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])>4 then
                                    hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("DEBUFFANCHOR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])-4, "DEBUFFANCHOR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
                                end
                                UIDropDownMenu_SetText(HealBot_Options_IconDebuffAnchor,list[hbv_Skins_GetIconVar("DEBUFFANCHOR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])])
                            else
                                if hbv_Skins_GetIconVar("DEBUFFANCHOR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])>2 then
                                    hbv_Skins_SetIconVar(1, "DEBUFFANCHOR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
                                end
                                UIDropDownMenu_SetText(HealBot_Options_IconDebuffAnchor,list[hbv_Skins_GetIconVar("DEBUFFANCHOR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])])
                            end
                            HealBot_Options_framesChanged(true, true)
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetIconVar("DEBUFFONBAR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_IconDebuffIconSet_DropDown()
      --HealBot_setCall("HealBot_Options_IconDebuffIconSet_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["IconDebuffSets"]), 1 do
        info.text=HealBot_Options_Lists["IconDebuffSets"][j];
        info.func=function(self)
                        if hb_lVars["DebuffIconSet"] ~= self:GetID() then
                           hb_lVars["DebuffIconSet"]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_IconDebuffIconSet,HealBot_Options_Lists["IconDebuffSets"][hb_lVars["DebuffIconSet"]])
                            HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
                        end
                    end
        info.checked=false;
        if hb_lVars["DebuffIconSet"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_IconBuffIconSet_DropDown()
      --HealBot_setCall("HealBot_Options_IconBuffIconSet_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["IconBuffSets"]), 1 do
        info.text=HealBot_Options_Lists["IconBuffSets"][j];
        info.func=function(self)
                        if hb_lVars["BuffIconSet"] ~= self:GetID() then
                           hb_lVars["BuffIconSet"]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_IconBuffIconSet,HealBot_Options_Lists["IconBuffSets"][hb_lVars["BuffIconSet"]])
                            HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
                        end
                    end
        info.checked=false;
        if hb_lVars["BuffIconSet"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_IconBuffPosition_DropDown()
      --HealBot_setCall("HealBot_Options_IconBuffPosition_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["IconPosition"]), 1 do
        info.text=HealBot_Options_Lists["IconPosition"][j];
        info.func=function(self)
                        if hbv_Skins_GetIconVar("BUFFONBAR", hb_lVars["Frame"], hb_lVars["BuffIconSet"]) ~= self:GetID() then
                            hbv_Skins_SetIconVar(self:GetID(), "BUFFONBAR", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
                            UIDropDownMenu_SetText(HealBot_Options_IconBuffPosition,HealBot_Options_Lists["IconPosition"][hbv_Skins_GetIconVar("BUFFONBAR", hb_lVars["Frame"], hb_lVars["BuffIconSet"])])
                            local list=HealBot_Options_AnchorList(hbv_Skins_GetIconVar("BUFFONBAR", hb_lVars["Frame"], hb_lVars["BuffIconSet"]), false)
                            if hbv_Skins_GetIconVar("BUFFONBAR", hb_lVars["Frame"], hb_lVars["BuffIconSet"]) == 1 then
                                UIDropDownMenu_SetText(HealBot_Options_IconBuffAnchor,list[hbv_Skins_GetIconVar("BUFFANCHOR", hb_lVars["Frame"], hb_lVars["BuffIconSet"])])
                            elseif hbv_Skins_GetIconVar("BUFFONBAR", hb_lVars["Frame"], hb_lVars["BuffIconSet"]) == 2 then
                                if hbv_Skins_GetIconVar("BUFFANCHOR", hb_lVars["Frame"], hb_lVars["BuffIconSet"])>4 then
                                    hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("BUFFANCHOR", hb_lVars["Frame"], hb_lVars["BuffIconSet"])-4, "BUFFANCHOR", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
                                end
                                UIDropDownMenu_SetText(HealBot_Options_IconBuffAnchor,list[hbv_Skins_GetIconVar("BUFFANCHOR", hb_lVars["Frame"], hb_lVars["BuffIconSet"])])
                            else
                                if hbv_Skins_GetIconVar("BUFFANCHOR", hb_lVars["Frame"], hb_lVars["BuffIconSet"])>2 then
                                    hbv_Skins_SetIconVar(2, "BUFFANCHOR", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
                                end
                                UIDropDownMenu_SetText(HealBot_Options_IconBuffAnchor,list[hbv_Skins_GetIconVar("BUFFANCHOR", hb_lVars["Frame"], hb_lVars["BuffIconSet"])])
                            end
                            HealBot_Options_framesChanged(true, true)
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetIconVar("BUFFONBAR", hb_lVars["Frame"], hb_lVars["BuffIconSet"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_IconExtraPosition_DropDown(object, id, eId)
      --HealBot_setCall("HealBot_Options_IconExtraPosition_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["IconPosition"]), 1 do
        info.text=HealBot_Options_Lists["IconPosition"][j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("Icons", id, hb_lVars["Frame"]) ~= self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "Icons", id, hb_lVars["Frame"])
                            UIDropDownMenu_SetText(object,HealBot_Options_Lists["IconPosition"][hbv_Skins_GetFrameVar("Icons", id, hb_lVars["Frame"])])
                            if eId == 91 then
                                hbv_Skins_SetFrameVar(1, "Icons", "CLASSANCHOR", hb_lVars["Frame"])
                                UIDropDownMenu_SetText(HealBot_Options_IconClassAnchor,HEALBOT_OPTIONS_ANCHORLEFT)
                            elseif eId == 92 then
                                hbv_Skins_SetFrameVar(1, "Icons", "TARGETANCHOR", hb_lVars["Frame"])
                                UIDropDownMenu_SetText(HealBot_Options_IconTargetAnchor,HEALBOT_OPTIONS_ANCHORLEFT)
                            elseif eId == 93 then
                                hbv_Skins_SetFrameVar(1, "Icons", "RCANCHOR", hb_lVars["Frame"])
                                UIDropDownMenu_SetText(HealBot_Options_IconRCAnchor,HEALBOT_OPTIONS_ANCHORLEFT)
                            elseif eId == 94 then
                                hbv_Skins_SetFrameVar(1, "Icons", "OORANCHOR", hb_lVars["Frame"])
                                UIDropDownMenu_SetText(HealBot_Options_IconOORArrowAnchor,HEALBOT_OPTIONS_ANCHORLEFT)
                            elseif eId == 95 then
                                hbv_Skins_SetFrameVar(1, "Icons", "RANKANCHOR", hb_lVars["Frame"])
                                UIDropDownMenu_SetText(HealBot_Options_IconRankAnchor,HEALBOT_OPTIONS_ANCHORLEFT)
                            elseif eId == 96 then
                                hbv_Skins_SetFrameVar(1, "Icons", "COMBATANCHOR", hb_lVars["Frame"])
                                UIDropDownMenu_SetText(HealBot_Options_IconCombatAnchor,HEALBOT_OPTIONS_ANCHORLEFT)
                            end
                            HealBot_Update_RemoveExtraIcons(eId)
                            HealBot_Options_framesChanged(true, true)
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Icons", id, hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_IconClassPosition_DropDown()
      --HealBot_setCall("HealBot_Options_IconClassPosition_DropDown")
    HealBot_Options_IconExtraPosition_DropDown(HealBot_Options_IconClassPosition, "CLASSONBAR", 91)
end

function HealBot_Options_IconRankPosition_DropDown()
      --HealBot_setCall("HealBot_Options_IconRankPosition_DropDown")
    HealBot_Options_IconExtraPosition_DropDown(HealBot_Options_IconRankPosition, "RANKONBAR", 95)
end

function HealBot_Options_IconTargetPosition_DropDown()
      --HealBot_setCall("HealBot_Options_IconTargetPosition_DropDown")
    HealBot_Options_IconExtraPosition_DropDown(HealBot_Options_IconTargetAnchor, "TARGETONBAR", 92)
end

function HealBot_Options_IconCombatPosition_DropDown()
      --HealBot_setCall("HealBot_Options_IconCombatPosition_DropDown")
    HealBot_Options_IconExtraPosition_DropDown(HealBot_Options_IconCombatPosition, "COMBATONBAR", 96)
end

function HealBot_Options_IconRCPosition_DropDown()
      --HealBot_setCall("HealBot_Options_IconRCPosition_DropDown")
    HealBot_Options_IconExtraPosition_DropDown(HealBot_Options_IconRCPosition, "RCONBAR", 93)
end

function HealBot_Options_IconOORArrowPosition_DropDown()
      --HealBot_setCall("HealBot_Options_IconOORArrowPosition_DropDown")
    HealBot_Options_IconExtraPosition_DropDown(HealBot_Options_IconOORArrowPosition, "OORONBAR", 94)
end

function HealBot_Options_AnchorList(onBar, Extra)
      --HealBot_setCall("HealBot_Options_AnchorList")
    local list={}
    if Extra then
        if onBar == 3 then
            list={
                HEALBOT_OPTIONS_ANCHORLEFT,
                HEALBOT_OPTIONS_ANCHORRIGHT,
                HEALBOT_OPTIONS_ANCHORCENTER,
            }
        elseif onBar == 2 then
            list={
                HEALBOT_OPTIONS_ANCHORLEFT,
                HEALBOT_OPTIONS_ANCHORRIGHT,
            }
        else
            list={
                HEALBOT_OPTIONS_ANCHORLEFT,
                HEALBOT_OPTIONS_ANCHORRIGHT,
                HEALBOT_OPTIONS_ANCHORTOP,
                HEALBOT_OPTIONS_ANCHORBOTTOM,
                HEALBOT_OPTIONS_ANCHORTOPLEFT,
                HEALBOT_OPTIONS_ANCHORTOPRIGHT,
                HEALBOT_OPTIONS_ANCHORBOTTOMLEFT,
                HEALBOT_OPTIONS_ANCHORBOTTOMRIGHT,
            }
        end
    elseif onBar == 1 then
        list ={
            HEALBOT_OPTIONS_ANCHORBOTTOMLEFT,
            HEALBOT_OPTIONS_ANCHORBOTTOMRIGHT,
            HEALBOT_OPTIONS_ANCHORTOPLEFT,
            HEALBOT_OPTIONS_ANCHORTOPRIGHT,
            HEALBOT_OPTIONS_ICONONBARANCHOR05,
            HEALBOT_OPTIONS_ICONONBARANCHOR06,
            HEALBOT_OPTIONS_ICONONBARANCHOR07,
            HEALBOT_OPTIONS_ICONONBARANCHOR08,
        }
    elseif onBar == 2 then
        list={
            HEALBOT_OPTIONS_ANCHORBOTTOMLEFT,
            HEALBOT_OPTIONS_ANCHORBOTTOMRIGHT,
            HEALBOT_OPTIONS_ANCHORTOPLEFT,
            HEALBOT_OPTIONS_ANCHORTOPRIGHT,
        }
    else
        list={
            HEALBOT_OPTIONS_ANCHORLEFT,
            HEALBOT_OPTIONS_ANCHORRIGHT,
        }
    end
    return list
end

function HealBot_Options_IconDebuffAnchor_DropDown()
      --HealBot_setCall("HealBot_Options_IconDebuffAnchor_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local list=HealBot_Options_AnchorList(hbv_Skins_GetIconVar("DEBUFFONBAR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]), false)
    for j=1, getn(list), 1 do
        info.text=list[j];
        info.func=function(self)
                        if hbv_Skins_GetIconVar("DEBUFFANCHOR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]) ~= self:GetID() then
                            hbv_Skins_SetIconVar(self:GetID(), "DEBUFFANCHOR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])
                            UIDropDownMenu_SetText(HealBot_Options_IconDebuffAnchor,list[hbv_Skins_GetIconVar("DEBUFFANCHOR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])])
                            HealBot_Options_framesChanged(true, true)
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetIconVar("DEBUFFANCHOR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_IconBuffAnchor_DropDown()
      --HealBot_setCall("HealBot_Options_IconBuffAnchor_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local list=HealBot_Options_AnchorList(hbv_Skins_GetIconVar("BUFFONBAR", hb_lVars["Frame"], hb_lVars["BuffIconSet"]), false)
    for j=1, getn(list), 1 do
        info.text=list[j];
        info.func=function(self)
                        if hbv_Skins_GetIconVar("BUFFANCHOR", hb_lVars["Frame"], hb_lVars["BuffIconSet"]) ~= self:GetID() then
                            hbv_Skins_SetIconVar(self:GetID(), "BUFFANCHOR", hb_lVars["Frame"], hb_lVars["BuffIconSet"])
                            UIDropDownMenu_SetText(HealBot_Options_IconBuffAnchor,list[hbv_Skins_GetIconVar("BUFFANCHOR", hb_lVars["Frame"], hb_lVars["BuffIconSet"])])
                            HealBot_Options_framesChanged(true, true)
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetIconVar("BUFFANCHOR", hb_lVars["Frame"], hb_lVars["BuffIconSet"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_IconAnchor_DropDown(object, id, listid, liststate)
      --HealBot_setCall("HealBot_Options_IconAnchor_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local list=HealBot_Options_AnchorList(hbv_Skins_GetFrameVar("Icons", listid, hb_lVars["Frame"]), liststate)
    for j=1, getn(list), 1 do
        info.text=list[j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("Icons", id, hb_lVars["Frame"]) ~= self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "Icons", id, hb_lVars["Frame"])
                            UIDropDownMenu_SetText(object,list[hbv_Skins_GetFrameVar("Icons", id, hb_lVars["Frame"])])
                            HealBot_Options_framesChanged(true, true)
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Icons", id, hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_IconClassAnchor_DropDown()
      --HealBot_setCall("HealBot_Options_IconClassAnchor_DropDown")
    HealBot_Options_IconAnchor_DropDown(HealBot_Options_IconClassAnchor, "CLASSANCHOR", "CLASSONBAR", true)
end

function HealBot_Options_IconRankAnchor_DropDown()
      --HealBot_setCall("HealBot_Options_IconRankAnchor_DropDown")
    HealBot_Options_IconAnchor_DropDown(HealBot_Options_IconRankAnchor, "RANKANCHOR", "RANKONBAR", true)
end

function HealBot_Options_IconTargetAnchor_DropDown()
      --HealBot_setCall("HealBot_Options_IconTargetAnchor_DropDown")
    HealBot_Options_IconAnchor_DropDown(HealBot_Options_IconTargetAnchor, "TARGETANCHOR", "TARGETONBAR", true)
end

function HealBot_Options_IconCombatAnchor_DropDown()
      --HealBot_setCall("HealBot_Options_IconCombatAnchor_DropDown")
    HealBot_Options_IconAnchor_DropDown(HealBot_Options_IconCombatAnchor, "COMBATANCHOR", "COMBATONBAR", true)
end

function HealBot_Options_IconRCAnchor_DropDown()
      --HealBot_setCall("HealBot_Options_IconRCAnchor_DropDown")
    HealBot_Options_IconAnchor_DropDown(HealBot_Options_IconRCAnchor, "RCANCHOR", "RCONBAR", true)
end

function HealBot_Options_IconOORArrowAnchor_DropDown()
      --HealBot_setCall("HealBot_Options_IconOORArrowAnchor_DropDown")
    HealBot_Options_IconAnchor_DropDown(HealBot_Options_IconOORArrowAnchor, "OORANCHOR", "OORONBAR", true)
end

-------------------------------------------

function HealBot_Options_BarHealthIncHeal_DropDown()
      --HealBot_setCall("HealBot_Options_BarHealthIncHeal_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_BarHealthIncHeal_List), 1 do
        info.text=HealBot_Options_BarHealthIncHeal_List[j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarText", "INCHEALS", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarText", "INCHEALS", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_BarHealthIncHeal,HealBot_Options_BarHealthIncHeal_List[hbv_Skins_GetFrameVar("BarText", "INCHEALS", hb_lVars["Frame"])])
                            HealBot_Timers_Set("INIT","SeparateInHealsAbsorbs")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarText", "INCHEALS", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BarHealthIncAbsorb_DropDown()
      --HealBot_setCall("HealBot_Options_BarHealthIncAbsorb_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_BarHealthIncAbsorb_List), 1 do
        info.text=HealBot_Options_BarHealthIncAbsorb_List[j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarText", "INCABSORBS", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarText", "INCABSORBS", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_BarHealthIncAbsorb,HealBot_Options_BarHealthIncAbsorb_List[hbv_Skins_GetFrameVar("BarText", "INCABSORBS", hb_lVars["Frame"])])
                            HealBot_Timers_Set("INIT","SeparateInHealsAbsorbs")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarText", "INCABSORBS", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BarHealthOverHeal_DropDown()
      --HealBot_setCall("HealBot_Options_BarHealthOverHeal_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_BarHealthOverHeal_List), 1 do
        info.text=HealBot_Options_BarHealthOverHeal_List[j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarText", "OVERHEAL", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarText", "OVERHEAL", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_BarHealthOverHeal,HealBot_Options_BarHealthOverHeal_List[hbv_Skins_GetFrameVar("BarText", "OVERHEAL", hb_lVars["Frame"])])
                            HealBot_Timers_Set("INIT","SeparateInHealsAbsorbs")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarText", "OVERHEAL", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BarHealthInFormat_DropDown(object, id)
      --HealBot_setCall("HealBot_Options_BarHealthInFormat_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["OverHealFormat"]), 1 do
        info.text=HealBot_Options_Lists["OverHealFormat"][j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarText", id, hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarText", id, hb_lVars["Frame"])
                            UIDropDownMenu_SetText(object,HealBot_Options_Lists["OverHealFormat"][hbv_Skins_GetFrameVar("BarText", id, hb_lVars["Frame"])])
                            HealBot_Timers_Set("SKINS","SkinsFormat")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarText", id, hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BarHealthOverHealFormat_DropDown()
      --HealBot_setCall("HealBot_Options_BarHealthOverHealFormat_DropDown")
    HealBot_Options_BarHealthInFormat_DropDown(HealBot_Options_BarHealthOverHealFormat, "OVERHEALFORMAT")
end

function HealBot_Options_BarHealthInHealFormat_DropDown()
      --HealBot_setCall("HealBot_Options_BarHealthInHealFormat_DropDown")
    HealBot_Options_BarHealthInFormat_DropDown(HealBot_Options_BarHealthInHealFormat, "SEPARATEFORMAT")
end

function HealBot_Options_BarHealthInColour_DropDown(object, id)
      --HealBot_setCall("HealBot_Options_BarHealthInColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["OverHealColour"]), 1 do
        info.text=HealBot_Options_Lists["OverHealColour"][j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarText", id, hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarText", id, hb_lVars["Frame"])
                            UIDropDownMenu_SetText(object,HealBot_Options_Lists["OverHealColour"][hbv_Skins_GetFrameVar("BarText", id, hb_lVars["Frame"])])
                            HealBot_Timers_Set("SKINS","SetBarsTextColour")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarText", id, hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BarHealthOverHealColour_DropDown()
      --HealBot_setCall("HealBot_Options_BarHealthOverHealColour_DropDown")
    HealBot_Options_BarHealthInColour_DropDown(HealBot_Options_BarHealthOverHealColour, "OVERHEALCOL")
end

function HealBot_Options_BarHealthInHealColour_DropDown()
      --HealBot_setCall("HealBot_Options_BarHealthInHealColour_DropDown")
    HealBot_Options_BarHealthInColour_DropDown(HealBot_Options_BarHealthInHealColour, "SEPARATECOL")
end

function HealBot_Options_BarHealthCustomColour_DropDown()
      --HealBot_setCall("HealBot_Options_BarHealthCustomColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["HealthCustomColour"]), 1 do
        info.text=HealBot_Options_Lists["HealthCustomColour"][j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarText", "HEALEXTRACOL", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarText", "HEALEXTRACOL", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_BarHealthCustomColour,HealBot_Options_Lists["HealthCustomColour"][hbv_Skins_GetFrameVar("BarText", "HEALEXTRACOL", hb_lVars["Frame"])])
                            HealBot_Timers_Set("SKINS","TextExtraCustomCols")
                            HealBot_Timers_Set("SKINS","TextUpdateHealth")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarText", "HEALEXTRACOL", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

local function HealBot_Options_BarHealthTextPosition_DropDown()
      --HealBot_setCall("HealBot_Options_BarHealthTextPosition_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_BarHealthAnchor_List), 1 do
        info.text=HealBot_Options_BarHealthAnchor_List[j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarText", "HLTHTXTANCHOR", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarText", "HLTHTXTANCHOR", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_BarHealthTextPosition, HealBot_Options_BarHealthAnchor_List[hbv_Skins_GetFrameVar("BarText", "HLTHTXTANCHOR", hb_lVars["Frame"])])
                            HealBot_Text_setTextLen(hb_lVars["Frame"])
                            HealBot_Options_framesChanged(false, false, false, true)
                            HealBot_Timers_Set("SKINS","SetSkinText")
                            if hbv_Skins_GetFrameVar("BarText", "HLTHTXTANCHOR", hb_lVars["Frame"]) == 4 or self:GetID() == 4 then
                                HealBot_Timers_Set("SKINS","TextUpdateNames",true)
                            end
                            HealBot_Timers_Set("SKINS","TextUpdateHealth",true)
                            HealBot_Options_HealthAnchor_Options()
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarText", "HLTHTXTANCHOR", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

local function HealBot_Options_BarAggroTextPosition_DropDown()
      --HealBot_setCall("HealBot_Options_BarAggroTextPosition_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["BarAggroTextAnchor"]), 1 do
        info.text=HealBot_Options_Lists["BarAggroTextAnchor"][j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarText", "AGGROTXTANCHOR", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarText", "AGGROTXTANCHOR", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_BarAggroTextPosition, HealBot_Options_Lists["BarAggroTextAnchor"][hbv_Skins_GetFrameVar("BarText", "AGGROTXTANCHOR", hb_lVars["Frame"])])
                            HealBot_Options_framesChanged(false, false, false, true)
                            HealBot_Timers_Set("SKINS","TextUpdateAggro",true)
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarText", "AGGROTXTANCHOR", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

local function HealBot_Options_BarNameTextPosition_DropDown()
      --HealBot_setCall("HealBot_Options_BarNameTextPosition_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["BarNameTextAnchor"]), 1 do
        info.text=HealBot_Options_Lists["BarNameTextAnchor"][j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarText", "ALIGN", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarText", "ALIGN", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_BarNameTextPosition, HealBot_Options_Lists["BarNameTextAnchor"][hbv_Skins_GetFrameVar("BarText", "ALIGN", hb_lVars["Frame"])])
                            HealBot_Options_framesChanged(false, false, false, true)
                --            HealBot_Timers_Set("SKINS","SetSkinText")
                            if HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then 
                                if hb_lVars["TestBarsOn"] then
                                    HealBot_Timers_Set("SKINS","UpdateTextButtons")
                                else
                                    HealBot_Timers_Set("SKINS","TextUpdateNames",true)
                                    if hbv_Skins_GetFrameVar("BarText", "HLTHTXTANCHOR", hb_lVars["Frame"])>4 then
                                        HealBot_Timers_Set("SKINS","TextUpdateHealth",true)
                                    end
                                end
                            end
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarText", "ALIGN", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_AuxTextAlign_DropDown()
      --HealBot_setCall("HealBot_Options_AuxTextAlign_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["BarNameTextAnchor"]), 1 do
        info.text=HealBot_Options_Lists["BarNameTextAnchor"][j];
        info.func=function(self)
                        if hbv_Aux_GetBarTextVar("ALIGN", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])~=self:GetID() then
                            hbv_Aux_SetBarTextVar(self:GetID(), "ALIGN", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])
                            UIDropDownMenu_SetText(HealBot_Options_AuxTextAlign, HealBot_Options_Lists["BarNameTextAnchor"][hbv_Aux_GetBarTextVar("ALIGN", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])])
                            HealBot_Options_framesChanged(false, false, false, true)
                            C_Timer.After(0.25, function() HealBot_Update_TextAux(hb_lVars["AuxTxtBar"]) end)
                        end
                    end
        info.checked=false;
        if hbv_Aux_GetBarTextVar("ALIGN", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BarStateTextPosition_DropDown()
      --HealBot_setCall("HealBot_Options_BarStateTextPosition_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["BarStateTextAnchor"]), 1 do
        info.text=HealBot_Options_Lists["BarStateTextAnchor"][j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarText", "STATETXTANCHOR", hb_lVars["Frame"]) ~= self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarText", "STATETXTANCHOR", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_BarStateTextPosition, HealBot_Options_Lists["BarStateTextAnchor"][hbv_Skins_GetFrameVar("BarText", "STATETXTANCHOR", hb_lVars["Frame"])])
                            HealBot_Timers_Set("SKINS","TagWithName")
                            HealBot_Options_framesChanged(false, false, false, true)
                            HealBot_Timers_Set("SKINS","TextUpdateState",true)
                            HealBot_Options_StateUseNameFontString_Options()
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarText", "STATETXTANCHOR", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

--------------------------------------------------------------------------------

function HealBot_Options_EnemyCombat_DropDown(object, id)
      --HealBot_setCall("HealBot_Options_EnemyCombat_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_EnemyCombat_List), 1 do
        info.text=HealBot_Options_EnemyCombat_List[j];
        info.func=function(self)
                        if hbv_Skins_GetVar("Enemy", id)~=self:GetID() then
                            hbv_Skins_SetVar(self:GetID(), "Enemy", id)
                            UIDropDownMenu_SetText(object,HealBot_Options_EnemyCombat_List[hbv_Skins_GetVar("Enemy", id)])
                            HealBot_Timers_setLuVars("ResetSkins", true)
                            HealBot_Timers_Set("OOC","UpdateEnemyFrames")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetVar("Enemy", id) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_EnemyCombatSelf_DropDown()
      --HealBot_setCall("HealBot_Options_EnemyCombatSelf_DropDown")
    HealBot_Options_EnemyCombat_DropDown(HealBot_Options_EnemyCombatSelf, "INCOMBATSHOWSELF")
end

function HealBot_Options_EnemyCombatFocus_DropDown()
      --HealBot_setCall("HealBot_Options_EnemyCombatFocus_DropDown")
    HealBot_Options_EnemyCombat_DropDown(HealBot_Options_EnemyCombatFocus, "INCOMBATSHOWFOCUS")
end

function HealBot_Options_EnemyCombatTanks_DropDown()
      --HealBot_setCall("HealBot_Options_EnemyCombatTanks_DropDown")
    HealBot_Options_EnemyCombat_DropDown(HealBot_Options_EnemyCombatTanks, "INCOMBATSHOWTANK")
end

function HealBot_Options_EnemyCombatGroup_DropDown()
      --HealBot_setCall("HealBot_Options_EnemyCombatGroup_DropDown")
    HealBot_Options_EnemyCombat_DropDown(HealBot_Options_EnemyCombatGroup, "INCOMBATSHOWGROUP")
end

function HealBot_Options_EnemyCombatRaid_DropDown()
      --HealBot_setCall("HealBot_Options_EnemyCombatGroup_DropDown")
    HealBot_Options_EnemyCombat_DropDown(HealBot_Options_EnemyCombatRaid, "INCOMBATSHOWRAID")
end

function HealBot_Options_EnemyCombatMyTargets_DropDown()
      --HealBot_setCall("HealBot_Options_EnemyCombatMyTargets_DropDown")
    HealBot_Options_EnemyCombat_DropDown(HealBot_Options_EnemyCombatMyTargets, "INCOMBATSHOWLIST")
end

function HealBot_Options_EnemyCombatArena_DropDown()
      --HealBot_setCall("HealBot_Options_EnemyCombatArena_DropDown")
    HealBot_Options_EnemyCombat_DropDown(HealBot_Options_EnemyCombatArena, "INCOMBATSHOWARENA")
end

function HealBot_Options_EnemyExists_DropDown(object, id)
      --HealBot_setCall("HealBot_Options_EnemyExists_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_EnemyOOC_List), 1 do
        info.text=HealBot_Options_EnemyOOC_List[j];
        info.func=function(self)
                        if hbv_Skins_GetVar("Enemy", id)~=self:GetID() then
                            hbv_Skins_SetVar(self:GetID(), "Enemy", id)
                            UIDropDownMenu_SetText(object,HealBot_Options_EnemyOOC_List[hbv_Skins_GetVar("Enemy", id)])
                            HealBot_Timers_setLuVars("ResetSkins", true)
                            HealBot_Timers_Set("OOC","UpdateEnemyFrames")
                            HealBot_Timers_Set("RESET","Quick",0.5)
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetVar("Enemy", id) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_EnemyExistsPlayerTargets_DropDown()
      --HealBot_setCall("HealBot_Options_EnemyExistsPlayerTargets_DropDown")
    HealBot_Options_EnemyExists_DropDown(HealBot_Options_EnemyExistsPlayerTargets, "EXISTSHOWPTAR")
end

function HealBot_Options_EnemyExistsFocus_DropDown()
      --HealBot_setCall("HealBot_Options_EnemyExistsFocus_DropDown")
    HealBot_Options_EnemyExists_DropDown(HealBot_Options_EnemyExistsFocus, "EXISTSHOWFOCUS")
end

function HealBot_Options_EnemyExistsTankTargets_DropDown()
      --HealBot_setCall("HealBot_Options_EnemyExistsTankTargets_DropDown")
    HealBot_Options_EnemyExists_DropDown(HealBot_Options_EnemyExistsTankTargets, "EXISTSHOWTANK")
end

function HealBot_Options_EnemyExistsGroupTargets_DropDown()
      --HealBot_setCall("HealBot_Options_EnemyExistsGroupTargets_DropDown")
    HealBot_Options_EnemyExists_DropDown(HealBot_Options_EnemyExistsGroupTargets, "EXISTSHOWGROUP")
end

function HealBot_Options_EnemyExistsRaidTargets_DropDown()
      --HealBot_setCall("HealBot_Options_EnemyExistsGroupTargets_DropDown")
    HealBot_Options_EnemyExists_DropDown(HealBot_Options_EnemyExistsRaidTargets, "EXISTSHOWRAID")
end

function HealBot_Options_EnemyExistsMyTargets_DropDown()
      --HealBot_setCall("HealBot_Options_EnemyExistsMyTargets_DropDown")
    HealBot_Options_EnemyExists_DropDown(HealBot_Options_EnemyExistsMyTargets, "EXISTSHOWMYTAR")
end

function HealBot_Options_EnemyExistsArena_DropDown()
      --HealBot_setCall("HealBot_Options_EnemyExistsArena_DropDown")
    HealBot_Options_EnemyExists_DropDown(HealBot_Options_EnemyExistsArena, "EXISTSHOWARENA")
end

function HealBot_Options_UseFrame_DropDown(object, id)
      --HealBot_setCall("HealBot_Options_EnemyExists_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["EnemyUseFrame"]), 1 do
        info.text=HealBot_Options_Lists["EnemyUseFrame"][j];
        info.func=function(self)
                        if hbv_Skins_GetVar("Enemy", id)~=self:GetID() then
                            hbv_Skins_SetVar(self:GetID(), "Enemy", id)
                            UIDropDownMenu_SetText(object,HealBot_Options_Lists["EnemyUseFrame"][hbv_Skins_GetVar("Enemy", id)])
                            HealBot_Timers_setLuVars("ResetSkins", true)
                            --HealBot_Timers_Set("OOC","UpdateEnemyFrames")
                            HealBot_Timers_Set("OOC","ValidateEnemyPlayerFrames")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetVar("Enemy", id) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_UseFrameSelf_DropDown()
      --HealBot_setCall("HealBot_Options_UseFrameGroup_DropDown")
    HealBot_Options_UseFrame_DropDown(HealBot_Options_UseFrameSelf, "SELFUSEFRAME")
end

function HealBot_Options_UseFrameMyTargets_DropDown()
      --HealBot_setCall("HealBot_Options_UseFrameGroup_DropDown")
    HealBot_Options_UseFrame_DropDown(HealBot_Options_UseFrameMyTargets, "PRIVATELISTUSEFRAME")
end

function HealBot_Options_UseFrameTanks_DropDown()
      --HealBot_setCall("HealBot_Options_UseFrameGroup_DropDown")
    HealBot_Options_UseFrame_DropDown(HealBot_Options_UseFrameTanks, "TANKUSEFRAME")
end

function HealBot_Options_UseFrameGroup_DropDown()
      --HealBot_setCall("HealBot_Options_UseFrameGroup_DropDown")
    HealBot_Options_UseFrame_DropDown(HealBot_Options_UseFrameGroup, "GROUPUSEFRAME")
end

function HealBot_Options_UseFrameRaid_DropDown()
      --HealBot_setCall("HealBot_Options_UseFrameGroup_DropDown")
    HealBot_Options_UseFrame_DropDown(HealBot_Options_UseFrameRaid, "RAIDUSEFRAME")
end

--------------------------------------------------------------------------------

function HealBot_Options_BarHealthColour_DropDown()
      --HealBot_setCall("HealBot_Options_BarHealthColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_BarHealthColour_List), 1 do
        info.text=HealBot_Options_BarHealthColour_List[j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarCol", "HLTH", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarCol", "HLTH", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_BarHealthColour,HealBot_Options_BarHealthColour_List[hbv_Skins_GetFrameVar("BarCol", "HLTH", hb_lVars["Frame"])])
                            HealBot_Timers_Set("SKINS","SkinsFormat")
                            HealBot_Options_SetBarsTextColour()
                            HealBot_Panel_resetTestCols(true)
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarCol", "HLTH", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BarHealthBackColour_DropDown()
      --HealBot_setCall("HealBot_Options_BarHealthBackColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["BarBack"]), 1 do
        info.text=HealBot_Options_Lists["BarBack"][j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarCol", "BACK", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarCol", "BACK", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_BarHealthBackColour,HealBot_Options_Lists["BarBack"][hbv_Skins_GetFrameVar("BarCol", "BACK", hb_lVars["Frame"])])
                            HealBot_Timers_Set("SKINS","SkinsFormat")
                            HealBot_Timers_Set("SKINS","UpdateBackground")
                            HealBot_Timers_Set("SKINS","ZeroHiddenButtons")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarCol", "BACK", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BarBorderColour_DropDown()
      --HealBot_setCall("HealBot_Options_BarBorderColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["BarBackBorder"]), 1 do
        info.text=HealBot_Options_Lists["BarBackBorder"][j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarCol", "BORDER", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarCol", "BORDER", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_BarBorderColour,HealBot_Options_Lists["BarBackBorder"][hbv_Skins_GetFrameVar("BarCol", "BORDER", hb_lVars["Frame"])])
                            HealBot_Timers_Set("SKINS","SkinsFormat")
                            HealBot_Timers_Set("SKINS","UpdateBackground")
                            HealBot_Options_framesChanged(true)
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarCol", "BORDER", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_EmergBarCol_DropDown()
      --HealBot_setCall("HealBot_EmergBarCol_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_BarHealthColour_List), 1 do
        info.text=HealBot_Options_BarHealthColour_List[j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("Emerg", "BARCOL", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "Emerg", "BARCOL", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_EmergBarCol,HealBot_Options_BarHealthColour_List[hbv_Skins_GetFrameVar("Emerg", "BARCOL", hb_lVars["Frame"])])
                            HealBot_Options_framesChanged(true)
                            HealBot_Timers_Set("SKINS","UpdateEmergBars")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Emerg", "BARCOL", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_EmergBarColBuffGlow_DropDown()
      --HealBot_setCall("HealBot_EmergBarCol_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["EmergGlow"]), 1 do
        info.text=HealBot_Options_Lists["EmergGlow"][j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("Emerg", "BUFFGLOW", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "Emerg", "BUFFGLOW", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_EmergBarColBuffGlow,HealBot_Options_Lists["EmergGlow"][hbv_Skins_GetFrameVar("Emerg", "BUFFGLOW", hb_lVars["Frame"])])
                            HealBot_Timers_Set("LAST","UpdateEmergIconGlow")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Emerg", "BUFFGLOW", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_EmergBarColDebuffGlow_DropDown()
      --HealBot_setCall("HealBot_EmergBarCol_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["EmergGlow"]), 1 do
        info.text=HealBot_Options_Lists["EmergGlow"][j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("Emerg", "DEBUFFGLOW", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "Emerg", "DEBUFFGLOW", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_EmergBarColDebuffGlow,HealBot_Options_Lists["EmergGlow"][hbv_Skins_GetFrameVar("Emerg", "DEBUFFGLOW", hb_lVars["Frame"])])
                            HealBot_Timers_Set("LAST","UpdateEmergIconGlow")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Emerg", "DEBUFFGLOW", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

-------------------------------------------

function HealBot_Options_Theme_DropDown()
      --HealBot_setCall("HealBot_Options_Theme_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["Themes"]), 1 do
        info.text=HealBot_Options_Lists["Themes"][j];
        info.func=function(self)
                        if HealBot_Globals.OptionsTheme~=self:GetID() then
                            HealBot_Globals.OptionsTheme=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_Theme,HealBot_Options_Lists["Themes"][HealBot_Globals.OptionsTheme])
                            HealBot_Action_StickyFrameIndCols()
                            HealBot_Options_SetTheme("Theme")
                            HealBot_Timers_InitExtraOptions()
                        end
                    end
        info.checked=false;
        if HealBot_Globals.OptionsTheme == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

-------------------------------------------

function HealBot_Options_NameTextColour_DropDown()
      --HealBot_setCall("HealBot_Options_NameTextColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_BarHealthColour_List), 1 do
        info.text=HealBot_Options_BarHealthColour_List[j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarTextCol", "NAME", hb_lVars["Frame"]) ~= self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarTextCol", "NAME", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_NameTextColour,HealBot_Options_BarHealthColour_List[hbv_Skins_GetFrameVar("BarTextCol", "NAME", hb_lVars["Frame"])])
                            HealBot_Timers_Set("SKINS","SkinBarTextColours")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarTextCol", "NAME", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_StateTextColour_DropDown()
      --HealBot_setCall("HealBot_Options_StateTextColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_BarHealthColour_List), 1 do
        info.text=HealBot_Options_BarHealthColour_List[j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarTextCol", "STATE", hb_lVars["Frame"]) ~= self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarTextCol", "STATE", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_StateTextColour,HealBot_Options_BarHealthColour_List[hbv_Skins_GetFrameVar("BarTextCol", "STATE", hb_lVars["Frame"])])
                            HealBot_Timers_Set("SKINS","SkinBarTextColours")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarTextCol", "STATE", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_HealthTextColour_DropDown()
      --HealBot_setCall("HealBot_Options_HealthTextColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_BarHealthColour_List), 1 do
        info.text=HealBot_Options_BarHealthColour_List[j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarTextCol", "HLTH", hb_lVars["Frame"]) ~= self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarTextCol", "HLTH", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_HealthTextColour,HealBot_Options_BarHealthColour_List[hbv_Skins_GetFrameVar("BarTextCol", "HLTH", hb_lVars["Frame"])])
                            HealBot_Timers_Set("SKINS","SkinBarTextColours")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarTextCol", "HLTH", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_AggroTextColour_DropDown()
      --HealBot_setCall("HealBot_Options_AggroTextColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_BarHealthColour_List), 1 do
        info.text=HealBot_Options_BarHealthColour_List[j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarTextCol", "AGGRO", hb_lVars["Frame"]) ~= self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarTextCol", "AGGRO", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_AggroTextColour,HealBot_Options_BarHealthColour_List[hbv_Skins_GetFrameVar("BarTextCol", "AGGRO", hb_lVars["Frame"])])
                            HealBot_Timers_Set("SKINS","SkinBarTextColours")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarTextCol", "AGGRO", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_AuxTextColour_DropDown()
      --HealBot_setCall("HealBot_Options_AuxTextColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_AuxBarColours_List), 1 do
        info.text=HealBot_Options_AuxBarColours_List[j];
        info.func=function(self)
                        if hbv_Aux_GetBarTextVar("COLTYPE", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])~=self:GetID() then
                            hbv_Aux_SetBarTextVar(self:GetID(), "COLTYPE", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])
                            UIDropDownMenu_SetText(HealBot_Options_AuxTextColour,HealBot_Options_AuxBarColours_List[hbv_Aux_GetBarTextVar("COLTYPE", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])])
                            HealBot_Timers_Set("AUX","ResetTextButtons")
                            if hb_lVars["TestBarsOn"] and HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then HealBot_Timers_Set("AUX","TestUpdate") end
                        end
                    end
        info.checked=false;
        if hbv_Aux_GetBarTextVar("COLTYPE", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

-------------------------------------------

function HealBot_Options_BarIncHealColour_DropDown()
      --HealBot_setCall("HealBot_Options_BarIncHealColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_BarIncHealColour_List), 1 do
        info.text=HealBot_Options_BarIncHealColour_List[j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarIACol", "IC", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarIACol", "IC", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_BarIncHealColour,HealBot_Options_BarIncHealColour_List[hbv_Skins_GetFrameVar("BarIACol", "IC", hb_lVars["Frame"])])
                            if hb_lVars["TestBarsOn"] and HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then HealBot_Timers_Set("AUX","TestUpdate") end
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarIACol", "IC", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

-------------------------------------------

function HealBot_Options_AbsorbColour_DropDown()
      --HealBot_setCall("HealBot_Options_AbsorbColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_AbsorbColour_List), 1 do
        info.text=HealBot_Options_AbsorbColour_List[j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarIACol", "AC", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarIACol", "AC", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_AbsorbColour,HealBot_Options_AbsorbColour_List[hbv_Skins_GetFrameVar("BarIACol", "AC", hb_lVars["Frame"])])
                            if hb_lVars["TestBarsOn"] and HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then HealBot_Timers_Set("AUX","TestUpdate") end
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarIACol", "AC", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

-------------------------------------------
local function HealBot_Options_BarHealthType_DropDown()
      --HealBot_setCall("HealBot_Options_BarHealthType_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_BarHealthType_List), 1 do
        info.text=HealBot_Options_BarHealthType_List[j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("BarText", "HLTHTYPE", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "BarText", "HLTHTYPE", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_BarHealthType, HealBot_Options_BarHealthType_List[hbv_Skins_GetFrameVar("BarText", "HLTHTYPE", hb_lVars["Frame"])])
                            HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
                            HealBot_Timers_Set("SKINS","SkinsFormat")
                            HealBot_Options_HealthUpdateText()
                            HealBot_Panel_resetTestCols()
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarText", "HLTHTYPE", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

--------------------------------------------------------------------------------

function HealBot_Options_SetCastModifierId()
      --HealBot_setCall("HealBot_Options_SetCastModifierId")
    if not hb_lVars["ModKeyShift"] and not hb_lVars["ModKeyCtrl"] and not hb_lVars["ModKeyAlt"] then
        HealBot_Options_ComboButtons_Modifier=1
    elseif not hb_lVars["ModKeyCtrl"] and not hb_lVars["ModKeyAlt"] then
        HealBot_Options_ComboButtons_Modifier=2
    elseif not hb_lVars["ModKeyShift"] and not hb_lVars["ModKeyAlt"] then
        HealBot_Options_ComboButtons_Modifier=3
    elseif not hb_lVars["ModKeyShift"] and not hb_lVars["ModKeyCtrl"] then
        HealBot_Options_ComboButtons_Modifier=4
    elseif not hb_lVars["ModKeyAlt"] then
        HealBot_Options_ComboButtons_Modifier=5
    elseif not hb_lVars["ModKeyCtrl"] then
        HealBot_Options_ComboButtons_Modifier=6
    elseif not hb_lVars["ModKeyShift"] then
        HealBot_Options_ComboButtons_Modifier=7
    else
        HealBot_Options_ComboButtons_Modifier=8
    end
end

function HealBot_Options_ModKeyShift_OnClick(self)
      --HealBot_setCall("HealBot_Options_ModKeyShift_OnClick")
    if hb_lVars["ModKeyShift"]~=self:GetChecked() then
        hb_lVars["ModKeyShift"]=self:GetChecked()
        HealBot_Options_SetCastModifierId()
        HealBot_Timers_Set("INIT","SpellsTabText")
    end
end

function HealBot_Options_ModKeyCtrl_OnClick(self)
      --HealBot_setCall("HealBot_Options_ModKeyCtrl_OnClick")
    if hb_lVars["ModKeyCtrl"]~=self:GetChecked() then
        hb_lVars["ModKeyCtrl"]=self:GetChecked()
        HealBot_Options_SetCastModifierId()
        HealBot_Timers_Set("INIT","SpellsTabText")
    end
end

function HealBot_Options_ModKeyAlt_OnClick(self)
      --HealBot_setCall("HealBot_Options_ModKeyAlt_OnClick")
    if hb_lVars["ModKeyAlt"]~=self:GetChecked() then
        hb_lVars["ModKeyAlt"]=self:GetChecked()
        HealBot_Options_SetCastModifierId()
        HealBot_Timers_Set("INIT","SpellsTabText")
    end
end

function HealBot_Options_UseIconCmds_OnClick(self)
      --HealBot_setCall("HealBot_Options_UseIconCmds_OnClick")
    if HealBot_Globals.UseIconCommands~=self:GetChecked() then
        HealBot_Globals.UseIconCommands=self:GetChecked()
        HealBot_Options_framesChanged(true, true)
    end
end

function HealBot_Options_SpellTargetLastTarget_OnClick(self)
      --HealBot_setCall("HealBot_Options_SpellTargetLastTarget_OnClick")
    if HealBot_Config_Spells.SpellTargetLastTarget[hb_lVars["ActionBarsComboTxt"]]~=self:GetChecked() then
        HealBot_Config_Spells.SpellTargetLastTarget[hb_lVars["ActionBarsComboTxt"]]=self:GetChecked()
        HealBot_SpellAutoButton_PrepAttribs()
    end
end

--------------------------------------------------------------------------------

function HealBot_Options_SkinsSetCastModifierId()
      --HealBot_setCall("HealBot_Options_SkinsSetCastModifierId")
    if not hb_lVars["SkinsModKeyShift"] and not hb_lVars["SkinsModKeyCtrl"] and not hb_lVars["SkinsModKeyAlt"] then
        HealBot_Options_SkinsComboButtons_Modifier=1
    elseif not hb_lVars["SkinsModKeyCtrl"] and not hb_lVars["SkinsModKeyAlt"] then
        HealBot_Options_SkinsComboButtons_Modifier=2
    elseif not hb_lVars["SkinsModKeyShift"] and not hb_lVars["SkinsModKeyAlt"] then
        HealBot_Options_SkinsComboButtons_Modifier=3
    elseif not hb_lVars["SkinsModKeyShift"] and not hb_lVars["SkinsModKeyCtrl"] then
        HealBot_Options_SkinsComboButtons_Modifier=4
    elseif not hb_lVars["SkinsModKeyAlt"] then
        HealBot_Options_SkinsComboButtons_Modifier=5
    elseif not hb_lVars["SkinsModKeyCtrl"] then
        HealBot_Options_SkinsComboButtons_Modifier=6
    elseif not hb_lVars["SkinsModKeyShift"] then
        HealBot_Options_SkinsComboButtons_Modifier=7
    else
        HealBot_Options_SkinsComboButtons_Modifier=8
    end
end

--------------------------------------------------------------------------------

function HealBot_Options_ButtonCastMethod_DropDown()
      --HealBot_setCall("HealBot_Options_ButtonCastMethod_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_ButtonCastMethod_List), 1 do
        info.text=HealBot_Options_ButtonCastMethod_List[j];
        info.func=function(self)
                        local x=HealBot_Config_Spells.ButtonCastMethod
                        HealBot_Config_Spells.ButtonCastMethod=self:GetID()
                        if x~=HealBot_Config_Spells.ButtonCastMethod then
                            UIDropDownMenu_SetText(HealBot_Options_ButtonCastMethod, HealBot_Options_ButtonCastMethod_List[HealBot_Config_Spells.ButtonCastMethod])
                            HealBot_Timers_Set("OOC","RegisterForClicks")
                        end
                    end
        info.checked=false;
        if HealBot_Config_Spells.ButtonCastMethod == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end


--------------------------------------------------------------------------------

function HealBot_Options_TestBarsProfile_DropDown()
      --HealBot_setCall("HealBot_Options_TestBarsProfile_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_TestBarsProfile_List), 1 do
        info.text=HealBot_Options_TestBarsProfile_List[j];
        info.func=function(self)
                        local x=HealBot_Globals.TestBars["PROFILE"]
                        HealBot_Globals.TestBars["PROFILE"]=self:GetID()
                        if x~=HealBot_Globals.TestBars["PROFILE"] then
                            UIDropDownMenu_SetText(HealBot_Options_TestBarsProfile, HealBot_Options_TestBarsProfile_List[HealBot_Globals.TestBars["PROFILE"]])
                            HealBot_Panel_resetTestCols()
                        end
                    end
        info.checked=false;
        if HealBot_Globals.TestBars["PROFILE"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_TestShowDebuffIcons_OnClick(self)
      --HealBot_setCall("HealBot_Options_TestShowDebuffIcons_OnClick")
    if HealBot_Globals.TestBarsIcons["DEBUFF"]~=self:GetChecked() then
        HealBot_Globals.TestBarsIcons["DEBUFF"]=self:GetChecked()
        HealBot_Panel_resetTestCols()
    end
end

function HealBot_Options_TestShowBuffIcons_OnClick(self)
      --HealBot_setCall("HealBot_Options_TestShowBuffIcons_OnClick")
    if HealBot_Globals.TestBarsIcons["BUFF"]~=self:GetChecked() then
        HealBot_Globals.TestBarsIcons["BUFF"]=self:GetChecked()
        HealBot_Panel_resetTestCols()
    end
end

function HealBot_Options_TestShowExtraIcons_OnClick(self)
      --HealBot_setCall("HealBot_Options_TestShowExtraIcons_OnClick")
    if HealBot_Globals.TestBarsIcons["EXTRA"]~=self:GetChecked() then
        HealBot_Globals.TestBarsIcons["EXTRA"]=self:GetChecked()
        HealBot_Panel_resetTestCols()
    end
end
--------------------------------------------------------------------------------

function HealBot_OptionBinds_Level1Info(object, info, index)
      --HealBot_setCall("HealBot_OptionBinds_Level1Info")
    for j=1, 3 do
        info.text=HealBot_Options_BindsKeyListRead[j];
        info.func=function(self)
                        if HealBot_SpellBinds_GetData(index)~=self:GetID() then
                            HealBot_SpellBinds_SetData(self:GetID(), index)
                            UIDropDownMenu_SetText(object,HealBot_Options_BindsKeyListRead[HealBot_SpellBinds_GetData(index)])
                            HealBot_Options_CheckBindsOnChange(HealBot_SpellBinds_GetData(index), index)
                        end
                    end
        info.checked=false;
        if HealBot_SpellBinds_GetData(index) == j then info.checked=true end
        UIDropDownMenu_AddButton(info, 1);
    end
    wipe(info)
    info.disabled=true
    info.notCheckable=true
    UIDropDownMenu_AddButton(info)
    info.disabled=false
    info.hasArrow=true
    info.notCheckable=true
    info.keepShownOnClick=false
    info.text="     0 - 9"
    info.menuList=1
    UIDropDownMenu_AddButton(info)
    info.text="     NumPad 0 - 9"
    info.menuList=2
    UIDropDownMenu_AddButton(info)
    info.text="     A - M"
    info.menuList=3
    UIDropDownMenu_AddButton(info)
    info.text="     N - Z"
    info.menuList=4
    UIDropDownMenu_AddButton(info)
    info.text="     Nav Keys"
    info.menuList=5
    UIDropDownMenu_AddButton(info)
    info.text="     Extra Keys"
    info.menuList=6
    UIDropDownMenu_AddButton(info)
    info.text="     Function Keys"
    info.menuList=7
    UIDropDownMenu_AddButton(info)
end

function HealBot_OptionBinds_09_Info(object, info, level, index)
      --HealBot_setCall("HealBot_OptionBinds_09_Info")
    for j=4, 13, 1 do
        info.text=HealBot_Options_BindsKeyListRead[j];
        info.func=function(self)
                        if HealBot_SpellBinds_GetData(index)~=self:GetID()+3 then
                            HealBot_SpellBinds_SetData(self:GetID()+3, index)
                            UIDropDownMenu_SetText(object,HealBot_Options_BindsKeyListRead[HealBot_SpellBinds_GetData(index)])
                            HealBot_Options_CheckBindsOnChange(HealBot_SpellBinds_GetData(index), index)
                        end
                    end
        info.checked=false;
        if HealBot_SpellBinds_GetData(index) == j then info.checked=true end
        UIDropDownMenu_AddButton(info, level);
    end
end

function HealBot_OptionBinds_num09_Info(object, info, level, index)
      --HealBot_setCall("HealBot_OptionBinds_num09_Info")
    for j=14, 23, 1 do
        info.text=HealBot_Options_BindsKeyListRead[j];
        info.func=function(self)
                        if HealBot_SpellBinds_GetData(index)~=self:GetID()+13 then
                            HealBot_SpellBinds_SetData(self:GetID()+13, index)
                            UIDropDownMenu_SetText(object,HealBot_Options_BindsKeyListRead[HealBot_SpellBinds_GetData(index)])
                            HealBot_Options_CheckBindsOnChange(HealBot_SpellBinds_GetData(index), index)
                        end
                    end
        info.checked=false;
        if HealBot_SpellBinds_GetData(index) == j then info.checked=true end
        UIDropDownMenu_AddButton(info, level);
    end
end

function HealBot_OptionBinds_am_Info(object, info, level, index)
      --HealBot_setCall("HealBot_OptionBinds_am_Info")
    for j=24, 36, 1 do
        info.text=HealBot_Options_BindsKeyListRead[j];
        info.func=function(self)
                        if HealBot_SpellBinds_GetData(index)~=self:GetID()+23 then
                            HealBot_SpellBinds_SetData(self:GetID()+23, index)
                            UIDropDownMenu_SetText(object,HealBot_Options_BindsKeyListRead[HealBot_SpellBinds_GetData(index)])
                            HealBot_Options_CheckBindsOnChange(HealBot_SpellBinds_GetData(index), index)
                        end
                    end
        info.checked=false;
        if HealBot_SpellBinds_GetData(index) == j then info.checked=true end
        UIDropDownMenu_AddButton(info, level);
    end
end

function HealBot_OptionBinds_nz_Info(object, info, level, index)
      --HealBot_setCall("HealBot_OptionBinds_nz_Info")
    for j=37, 49, 1 do
        info.text=HealBot_Options_BindsKeyListRead[j];
        info.func=function(self)
                        if HealBot_SpellBinds_GetData(index)~=self:GetID()+36 then
                            HealBot_SpellBinds_SetData(self:GetID()+36, index)
                            UIDropDownMenu_SetText(object,HealBot_Options_BindsKeyListRead[HealBot_SpellBinds_GetData(index)])
                            HealBot_Options_CheckBindsOnChange(HealBot_SpellBinds_GetData(index), index)
                        end
                    end
        info.checked=false;
        if HealBot_SpellBinds_GetData(index) == j then info.checked=true end
        UIDropDownMenu_AddButton(info, level);
    end
end

function HealBot_OptionBinds_nav_Info(object, info, level, index)
      --HealBot_setCall("HealBot_OptionBinds_nav_Info")
    for j=50, 59, 1 do
        info.text=HealBot_Options_BindsKeyListRead[j];
        info.func=function(self)
                        if HealBot_SpellBinds_GetData(index)~=self:GetID()+49 then
                            HealBot_SpellBinds_SetData(self:GetID()+49, index)
                            UIDropDownMenu_SetText(object,HealBot_Options_BindsKeyListRead[HealBot_SpellBinds_GetData(index)])
                            HealBot_Options_CheckBindsOnChange(HealBot_SpellBinds_GetData(index), index)
                        end
                    end
        info.checked=false;
        if HealBot_SpellBinds_GetData(index) == j then info.checked=true end
        UIDropDownMenu_AddButton(info, level);
    end
end

function HealBot_OptionBinds_extra_Info(object, info, level, index)
      --HealBot_setCall("HealBot_OptionBinds_extra_Info")
    for j=60, 73, 1 do
        info.text=HealBot_Options_BindsKeyListRead[j];
        info.func=function(self)
                        if HealBot_SpellBinds_GetData(index)~=self:GetID()+59 then
                            HealBot_SpellBinds_SetData(self:GetID()+59, index)
                            UIDropDownMenu_SetText(object,HealBot_Options_BindsKeyListRead[HealBot_SpellBinds_GetData(index)])
                            HealBot_Options_CheckBindsOnChange(HealBot_SpellBinds_GetData(index), index)
                        end
                    end
        info.checked=false;
        if HealBot_SpellBinds_GetData(index) == j then info.checked=true end
        UIDropDownMenu_AddButton(info, level);
    end
end

function HealBot_OptionBinds_fkeys_Info(object, info, level, index)
      --HealBot_setCall("HealBot_OptionBinds_fkeys_Info")
    for j=74, 85, 1 do
        info.text=HealBot_Options_BindsKeyListRead[j];
        info.func=function(self)
                        if HealBot_SpellBinds_GetData(index)~=self:GetID()+73 then
                            HealBot_SpellBinds_SetData(self:GetID()+73, index)
                            UIDropDownMenu_SetText(object,HealBot_Options_BindsKeyListRead[HealBot_SpellBinds_GetData(index)])
                            HealBot_Options_CheckBindsOnChange(HealBot_SpellBinds_GetData(index), index)
                        end
                    end
        info.checked=false;
        if HealBot_SpellBinds_GetData(index) == j then info.checked=true end
        UIDropDownMenu_AddButton(info, level);
    end
end

function HealBot_OptionBinds_DropDown(self, level, menuList, index, object)
      --HealBot_setCall("HealBot_OptionBinds_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    info.keepShownOnClick=false
    if level == 1 then
        HealBot_OptionBinds_Level1Info(object, info, index)
    elseif menuList == 1 then
        HealBot_OptionBinds_09_Info(object, info, level, index)
    elseif menuList == 2 then
        HealBot_OptionBinds_num09_Info(object, info, level, index)
    elseif menuList == 3 then
        HealBot_OptionBinds_am_Info(object, info, level, index)
    elseif menuList == 4 then
        HealBot_OptionBinds_nz_Info(object, info, level, index)
    elseif menuList == 5 then
        HealBot_OptionBinds_nav_Info(object, info, level, index)
    elseif menuList == 6 then
        HealBot_OptionBinds_extra_Info(object, info, level, index)
    elseif menuList == 7 then
        HealBot_OptionBinds_fkeys_Info(object, info, level, index)
    end
end

function HealBot_Options_Bind1_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_Bind1_DropDown")
    HealBot_OptionBinds_DropDown(self, level, menuList, 1, HealBot_Options_Bind1)
end

function HealBot_Options_Bind2_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_Bind2_DropDown")
    HealBot_OptionBinds_DropDown(self, level, menuList, 2, HealBot_Options_Bind2)
end

function HealBot_Options_Bind3_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_Bind3_DropDown")
    HealBot_OptionBinds_DropDown(self, level, menuList, 3, HealBot_Options_Bind3)
end

function HealBot_Options_Bind4_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_Bind4_DropDown")
    HealBot_OptionBinds_DropDown(self, level, menuList, 4, HealBot_Options_Bind4)
end

function HealBot_Options_Bind5_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_Bind5_DropDown")
    HealBot_OptionBinds_DropDown(self, level, menuList, 5, HealBot_Options_Bind5)
end

function HealBot_Options_InitBinds()
      --HealBot_setCall("HealBot_Options_InitBinds")
    HealBot_Options_Bind1.initialize=HealBot_Options_Bind1_DropDown
    UIDropDownMenu_SetText(HealBot_Options_Bind1,HealBot_Options_BindsKeyListRead[HealBot_SpellBinds_GetData(1)] or HEALBOT_WORDS_NONE)
	HealBot_Options_Bind2.initialize=HealBot_Options_Bind2_DropDown
    UIDropDownMenu_SetText(HealBot_Options_Bind2,HealBot_Options_BindsKeyListRead[HealBot_SpellBinds_GetData(2)] or HEALBOT_WORDS_NONE)
	HealBot_Options_Bind3.initialize=HealBot_Options_Bind3_DropDown
    UIDropDownMenu_SetText(HealBot_Options_Bind3,HealBot_Options_BindsKeyListRead[HealBot_SpellBinds_GetData(3)] or HEALBOT_WORDS_NONE)
	HealBot_Options_Bind4.initialize=HealBot_Options_Bind4_DropDown
    UIDropDownMenu_SetText(HealBot_Options_Bind4,HealBot_Options_BindsKeyListRead[HealBot_SpellBinds_GetData(4)] or HEALBOT_WORDS_NONE)
	HealBot_Options_Bind5.initialize=HealBot_Options_Bind5_DropDown
    UIDropDownMenu_SetText(HealBot_Options_Bind5,HealBot_Options_BindsKeyListRead[HealBot_SpellBinds_GetData(5)] or HEALBOT_WORDS_NONE)
end

--------------------------------------------------------------------------------

hb_lVars["hbLangs"]=3

function HealBot_Options_hbLangs_DropDown()
      --HealBot_setCall("HealBot_Options_hbLangs_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_hbLangs_List), 1 do
        info.text=HealBot_Options_hbLangs_List[j];
        info.func=function(self)
                        hb_lVars["hbLangs"]=self:GetID()
                        UIDropDownMenu_SetText(HealBot_Options_hbLangs, HealBot_Options_hbLangs_List[hb_lVars["hbLangs"]])
                    end
        info.checked=false;
        if hb_lVars["hbLangs"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_LangsButton_OnClick(self)
      --HealBot_setCall("HealBot_Options_LangsButton_OnClick")
    if hb_lVars["hbLangs"] == 1 then
        HealBot_Options_Lang("zhCN", true)
    elseif hb_lVars["hbLangs"] == 2 then
        HealBot_Options_Lang("enUK", true)
    elseif hb_lVars["hbLangs"] == 3 then
        HealBot_Options_Lang("enUS", true)
    elseif hb_lVars["hbLangs"] == 4 then
        HealBot_Options_Lang("frFR", true)
    elseif hb_lVars["hbLangs"] == 5 then
        HealBot_Options_Lang("deDE", true)
    elseif hb_lVars["hbLangs"] == 6 then
        HealBot_Options_Lang("grGR", true)
    elseif hb_lVars["hbLangs"] == 7 then
        HealBot_Options_Lang("huHU", true)
    elseif hb_lVars["hbLangs"] == 8 then
        HealBot_Options_Lang("itIT", true)
    elseif hb_lVars["hbLangs"] == 9 then
        HealBot_Options_Lang("koKR", true)
    elseif hb_lVars["hbLangs"] == 10 then
        HealBot_Options_Lang("esMX", true)
    elseif hb_lVars["hbLangs"] == 11 then
        HealBot_Options_Lang("ptBR", true)
    elseif hb_lVars["hbLangs"] == 12 then
        HealBot_Options_Lang("ruRU", true)
    elseif hb_lVars["hbLangs"] == 13 then
        HealBot_Options_Lang("esES", true)
    elseif hb_lVars["hbLangs"] == 14 then
        HealBot_Options_Lang("zhTW", true)
    end
end

--------------------------------------------------------------------------------

hb_lVars["hbCommands"]=1

function HealBot_Options_hbCommands_DropDown()
      --HealBot_setCall("HealBot_Options_hbCommands_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_hbCommands_List), 1 do
        info.text=HealBot_Options_hbCommands_List[j];
        info.func=function(self)
                        hb_lVars["hbCommands"]=self:GetID()
                        UIDropDownMenu_SetText(HealBot_Options_hbCommands, HealBot_Options_hbCommands_List[hb_lVars["hbCommands"]])
                    end
        info.checked=false;
        if hb_lVars["hbCommands"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_ToggleMainAssist()
      --HealBot_setCall("HealBot_Options_ToggleMainAssist")
    if HealBot_Globals.IncMainAssist then
        HealBot_Globals.IncMainAssist=false
        HealBot_AddChat(HEALBOT_CHAT_MAINASSISTOFF)
    else
        HealBot_Globals.IncMainAssist=true
        HealBot_AddChat(HEALBOT_CHAT_MAINASSISTON)
    end
    HealBot_Timers_Set("OOCNT","RefreshPartyNextRecalcPlayers")
end

function HealBot_Options_ToggleClearInspect()
    if HealBot_Globals.ClearInspect then
        HealBot_Globals.ClearInspect=false
        HealBot_AddChat(HEALBOT_CLEARINSPECTOFF)
    else
        HealBot_Globals.ClearInspect=true
        HealBot_AddChat(HEALBOT_CLEARINSPECTON)
    end
end

function HealBot_Options_ToggleSuppressSetting(settingType)
      --HealBot_setCall("HealBot_Options_ToggleSuppressSetting")
    if settingType == "sound" then
        if HealBot_Globals.MacroSuppressSound then
            HealBot_Globals.MacroSuppressSound=false
            HealBot_AddChat(HEALBOT_CHAT_MACROSOUNDON)
        else
            HealBot_Globals.MacroSuppressSound=true
            HealBot_AddChat(HEALBOT_CHAT_MACROSOUNDOFF)
        end
        HealBot_Comms_MacroSuppressSound()
    elseif settingType == "error" then
        if HealBot_Globals.MacroSuppressError then
            HealBot_Globals.MacroSuppressError=false
            HealBot_AddChat(HEALBOT_CHAT_MACROERRORON)
        else
            HealBot_Globals.MacroSuppressError=true
            HealBot_AddChat(HEALBOT_CHAT_MACROERROROFF)
        end
        HealBot_Comms_MacroSuppressError()
    end
    HealBot_Timers_Set("INIT","PrepSetAllAttribs",true)
end

function HealBot_Options_CommandsButton_OnClick(self)
      --HealBot_setCall("HealBot_Options_CommandsButton_OnClick")
    if hb_lVars["hbCommands"] == 2 then
        HealBot_Panel_ClearBlackList()
    elseif hb_lVars["hbCommands"] == 3 then
        HealBot_Copy_SpellCombos()
    elseif hb_lVars["hbCommands"] == 4 then
        HealBot_Reset_Icons()
    elseif hb_lVars["hbCommands"] == 5 then
        HealBot_SetResetFlag("FRAMES")
    elseif hb_lVars["hbCommands"] == 6 then
        HealBot_Reset_Buffs()
    elseif hb_lVars["hbCommands"] == 7 then
        HealBot_Reset_Cures()
    elseif hb_lVars["hbCommands"] == 8 then
        HealBot_Timers_Set("RESET","CustomDebuffs")
    elseif hb_lVars["hbCommands"] == 9 then
        HealBot_Timers_Set("RESET","Skins")
    elseif hb_lVars["hbCommands"] == 10 then
        HealBot_Reset_Spells()
    elseif hb_lVars["hbCommands"] == 11 then
        HealBot_MountsPets_DislikeMount("Dislike")
    elseif hb_lVars["hbCommands"] == 12 then
        HealBot_MountsPets_DislikeMount("Exclude")
    elseif hb_lVars["hbCommands"] == 13 then
        HealBot_Options_ToggleSuppressSetting("error")
    elseif hb_lVars["hbCommands"] == 14 then
        HealBot_Options_ToggleSuppressSetting("sound")
    elseif hb_lVars["hbCommands"] == 15 then
        HealBot_Options_ToggleCustomCuresCastBy()
    elseif hb_lVars["hbCommands"] == 16 then
        HealBot_Options_ToggleMainAssist()
    elseif hb_lVars["hbCommands"] == 17 then
        HealBot_Include_Skin(HEALBOT_SORTBY_GROUP, false)
    elseif hb_lVars["hbCommands"] == 18 then
        HealBot_Include_Skin(HEALBOT_OPTIONS_RAID25, false)
    elseif hb_lVars["hbCommands"] == 19 then
        HealBot_Include_Skin(HEALBOT_OPTIONS_RAID40, false)
    elseif hb_lVars["hbCommands"] == 20 then
        HealBot_Options_ToggleClearInspect()
    elseif hb_lVars["hbCommands"] == 21 then
        HealBot_Util_ToggleNumSuffix()
    end
end

--------------------------------------------------------------------------------

function HealBot_Options_FrameStrata_DropDown()
      --HealBot_setCall("HealBot_Options_FrameStrata_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["FrameStrata"]), 1 do
        info.text=HealBot_Options_Lists["FrameStrata"][j];
        info.func=function(self)
                        if HealBot_Globals.FrameStrata~=HealBot_Options_Lists["FrameStrata"][self:GetID()] then
                            HealBot_Globals.FrameStrata=HealBot_Options_Lists["FrameStrata"][self:GetID()]
                            UIDropDownMenu_SetText(HealBot_Options_FrameStrata, HealBot_Globals.FrameStrata)
                            --HealBot_Options_ReloadUI()
                            HealBot_Timers_Set("OOC","FrameStrata",true)
                        end
                    end
        info.checked=false;
        if HealBot_Globals.FrameStrata == HealBot_Options_Lists["FrameStrata"][j] then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_FrameStrataIC_DropDown()
      --HealBot_setCall("HealBot_Options_FrameStrataIC_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["FrameStrata"]), 1 do
        info.text=HealBot_Options_Lists["FrameStrata"][j];
        info.func=function(self)
                        if HealBot_Globals.FrameStrataIC~=HealBot_Options_Lists["FrameStrata"][self:GetID()] then
                            HealBot_Globals.FrameStrataIC=HealBot_Options_Lists["FrameStrata"][self:GetID()]
                            UIDropDownMenu_SetText(HealBot_Options_FrameStrataIC, HealBot_Globals.FrameStrataIC)
                            --HealBot_Options_ReloadUI()
                            HealBot_Timers_Set("OOC","FrameStrata",true)
                        end
                    end
        info.checked=false;
        if HealBot_Globals.FrameStrataIC == HealBot_Options_Lists["FrameStrata"][j] then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end


hb_lVars["hbProfile"]=1

function HealBot_Options_hbProfile_DropDown()
      --HealBot_setCall("HealBot_Options_hbProfile_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_hbProfile_List), 1 do
        info.text=HealBot_Options_hbProfile_List[j];
        info.func=function(self)
                        HealBot_Config.Profile=self:GetID()
                        UIDropDownMenu_SetText(HealBot_Options_hbProfile, HealBot_Options_hbProfile_List[HealBot_Config.Profile])
                    end
        info.checked=false;
        if HealBot_Config.Profile == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_hbProfile_OnClick(self)
      --HealBot_setCall("HealBot_Options_hbProfile_OnClick")
    HealBot_Options_LoadProfile()
end

function HealBot_Options_ProfileSpellCheck(sName,cType)
      --HealBot_setCall("HealBot_Options_ProfileSpellCheck")
    local sType,sID=string.split(":", sName)
    if sID then sID, _=string.split("^", sID) end
    if sType == "S" and HealBot_Spells_KnownByName(sID) then
        return true
    elseif GetMacroIndexByName(sName)>0 then
        return true
    elseif sType == "I" and HealBot_IsKnownItem(sID) then
        return true
    elseif sType == "C" and HealBot_Action_SpellCmdText(cType, sID) then
        return true
    elseif sType == "E" then
        if sID then return true end
    end
    return false
end

function HealBot_Options_hbProfile_setGlobalSpells(combo, globalcombo, maxButtons, cType)
      --HealBot_setCall("HealBot_Options_hbProfile_setGlobalSpells")
    local button,key,sType,sID,sName=nil,nil,nil,nil,nil
    local HealBot_Keys_List=HealBot_Action_retComboKeysList()
    for z=1,maxButtons do
        button=HealBot_Options_ComboClass_Button(z)
        for y=1, getn(HealBot_Keys_List), 1 do
            key=HealBot_Keys_List[y]..button
            if globalcombo[key] and HealBot_Options_ProfileSpellCheck(globalcombo[key],cType) then
                combo[key]=globalcombo[key]
            elseif combo[key] then
                sID=GetMacroIndexByName(combo[key])
                if sID>0 and sID<121 then
                    sType="M"
                else
                    sType,sID=string.split(":", combo[key])
                end
                if sID and sType~="S" then
                    combo[key]=nil
                end
            end
        end
    end
end

function HealBot_Options_ValidSpell(sType, sID, gCheck)
      --HealBot_setCall("HealBot_Options_KnownSpellCheckSetColour")
    if sType and not sID and HealBot_Spells_KnownByName(sType) then
        sID=HealBot_Spells_KnownByName(sType)
    end
    if sType and sID then
        if gCheck<3 and (sType == "C" or sType == "E" or sType == "I") then
            return true
        elseif HealBot_Spells_KnownByID(sID) then
            return true
        end
    elseif GetMacroIndexByName(sType)>0 then
        return true
    end
    return false
end

function HealBot_Options_LoadProfileSpec(combo, speccombo)
      --HealBot_setCall("HealBot_Options_LoadProfileSpec")
    local sType, sID, sName="",0,""
    table.foreach(speccombo.EnabledKeyCombo, function (key,val)
        sType, sID=string.split(":", val)
        if sID then sID, sName=string.split("^", sID) end
        if HealBot_Options_ValidSpell(sType, sID, HealBot_Config.Profile) then
            combo.EnabledKeyCombo[key]=val;
            combo.EnabledSpellTarget[key]=speccombo.EnabledSpellTarget[key]
            combo.EnabledSpellTrinket1[key]=speccombo.EnabledSpellTrinket1[key]
            combo.EnabledSpellTrinket2[key]=speccombo.EnabledSpellTrinket2[key]
            combo.EnabledAvoidBlueCursor[key]=speccombo.EnabledAvoidBlueCursor[key]
        end
    end);
    table.foreach(speccombo.EnemyKeyCombo, function (key,val)
        sType, sID=string.split(":", val)
        if sID then sID, sName=string.split("^", sID) end
        if HealBot_Options_ValidSpell(sType, sID, HealBot_Config.Profile) then
            combo.EnemyKeyCombo[key]=val;
            combo.EnemySpellTarget[key]=speccombo.EnemySpellTarget[key]
            combo.EnemySpellTrinket1[key]=speccombo.EnemySpellTrinket1[key]
            combo.EnemySpellTrinket2[key]=speccombo.EnemySpellTrinket2[key]
            combo.EnemyAvoidBlueCursor[key]=speccombo.EnemyAvoidBlueCursor[key]
        end
    end);
    table.foreach(speccombo.EmergKeyCombo, function (key,val)
        sType, sID=string.split(":", val)
        if sID then sID, sName=string.split("^", sID) end
        if HealBot_Options_ValidSpell(sType, sID, HealBot_Config.Profile) then
            combo.EmergKeyCombo[key]=val;
            combo.EmergSpellTarget[key]=speccombo.EmergSpellTarget[key]
            combo.EmergSpellTrinket1[key]=speccombo.EmergSpellTrinket1[key]
            combo.EmergSpellTrinket2[key]=speccombo.EmergSpellTrinket2[key]
            combo.EmergAvoidBlueCursor[key]=speccombo.EmergAvoidBlueCursor[key]
        end
    end);
    table.foreach(combo.EnabledKeyCombo, function (key,val)
        sType, sID=string.split(":", val)
        if sID then sID, sName=string.split("^", sID) end
        if not HealBot_Options_ValidSpell(sType, sID, 1) and sType == "S" and sName then
            combo.EnabledKeyCombo[key]=sName
        end
    end);
    table.foreach(combo.EnemyKeyCombo, function (key,val)
        sType, sID=string.split(":", val)
        if sID then sID, sName=string.split("^", sID) end
        if not HealBot_Options_ValidSpell(sType, sID, 1) and sType == "S" and sName then
            combo.EnemyKeyCombo[key]=sName
        end
    end);
    table.foreach(combo.EmergKeyCombo, function (key,val)
        sType, sID=string.split(":", val)
        if sID then sID, sName=string.split("^", sID) end
        if not HealBot_Options_ValidSpell(sType, sID, 1) and sType == "S" and sName then
            combo.EmergKeyCombo[key]=sName
        end
    end);
    combo.SpellTargetLastTarget=HealBot_Options_copyTable(speccombo.SpellTargetLastTarget)
    if speccombo.Binds then combo.Binds=HealBot_Options_copyTable(speccombo.Binds) end
    combo.SpellTargetLastTarget=HealBot_Options_copyTable(speccombo.SpellTargetLastTarget)
    combo.ButtonCastMethod=speccombo.ButtonCastMethod
end

function HealBot_Options_LoadProfileCheckSpec(id)
    if HealBot_Spell_Loadouts[id] then
        local dat=HealBot_Util_Deserialize(HealBot_Spell_Loadouts[id])
        HealBot_Options_LoadProfileSpec(HealBot_Config_Spells, dat)
    end
end

function HealBot_Options_LoadProfile()
      --HealBot_setCall("HealBot_Options_LoadProfile")
      
    if HealBot_Data["PCLASSTRIM"] then
        HealBot_Config.SpecProfAtSave=HealBot_Action_GetSpecProf()
        if HealBot_Config.Profile>1 then
            local dat
            if HealBot_Class_Spells[HealBot_Data["PCLASSTRIM"]] then
                dat=HealBot_Util_Deserialize(HealBot_Class_Spells[HealBot_Data["PCLASSTRIM"]])
                HealBot_Config_Spells=HealBot_Options_copyTable(dat)
                table.foreach(HealBot_Config_SpellsDefaults, function (key,val)
                    if HealBot_Config_Spells[key]==nil then
                        HealBot_Config_Spells[key] = val;
                    end
                end);
            else
                HealBot_Options_SaveProfile("SPELLS")
            end
            if HealBot_Class_Buffs[HealBot_Data["PCLASSTRIM"]] then
                dat=HealBot_Util_Deserialize(HealBot_Class_Buffs[HealBot_Data["PCLASSTRIM"]])
                HealBot_Config_Buffs=HealBot_Options_copyTable(dat)
                table.foreach(HealBot_Config_BuffsDefaults, function (key,val)
                    if HealBot_Config_Buffs[key]==nil then
                        HealBot_Config_Buffs[key] = val;
                    end
                end);        
            else
                HealBot_Options_SaveProfile("BUFFS")
            end
            if HealBot_Class_Cures[HealBot_Data["PCLASSTRIM"]] then
                dat=HealBot_Util_Deserialize(HealBot_Class_Cures[HealBot_Data["PCLASSTRIM"]])
                HealBot_Config_Cures=HealBot_Options_copyTable(dat)
                table.foreach(HealBot_Config_CuresDefaults, function (key,val)
                    if HealBot_Config_Cures[key]==nil then
                        HealBot_Config_Cures[key] = val;
                    end
                end);
            else
                HealBot_Options_SaveProfile("CURES")
            end
            if HealBot_Config.Profile == 3 and HealBot_Class_Spells["GLOBAL"] then
                dat=HealBot_Util_Deserialize(HealBot_Class_Spells["GLOBAL"])
                HealBot_Options_hbProfile_setGlobalSpells(HealBot_Config_Spells.EnabledKeyCombo, dat.EnabledKeyCombo, 20, "ENABLED")
                HealBot_Options_hbProfile_setGlobalSpells(HealBot_Config_Spells.EnemyKeyCombo, dat.EnemyKeyCombo, 20, "ENEMY")
                HealBot_Options_hbProfile_setGlobalSpells(HealBot_Config_Spells.EmergKeyCombo, dat.EmergKeyCombo, 5, "EMERG")
                if dat.Binds then
                    for x=1,20 do
                        if dat.Binds[x] then
                            HealBot_SpellBinds_SetData(dat.Binds[x], x)
                        end
                    end
                end
            end
        end
        if HealBot_Spell_Loadouts[HealBot_Action_GetSpecID()] then
            HealBot_Options_LoadProfileCheckSpec(HealBot_Action_GetSpecID())
        end
        HealBot_Update_Skins()
        HealBot_Timers_InitExtraOptions()
        HealBot_Timers_Set("INIT","PrepSetAllAttribs",true)
    else
        HealBot_SetPlayerData()
        HealBot_Timers_Set("PLAYER","LoadProfile",true,true) -- All recall require a delay
    end
end

function HealBot_Options_hbProfile_saveGlobalCombo(combo, globalcombo, maxButtons)
      --HealBot_setCall("HealBot_Options_hbProfile_saveGlobalCombo")
    local button,sType,sID,key=nil,nil,nil
    local HealBot_Keys_List=HealBot_Action_retComboKeysList()
    for z=1,maxButtons do
        button=HealBot_Options_ComboClass_Button(z)
        for y=1, getn(HealBot_Keys_List), 1 do
            key=HealBot_Keys_List[y]..button
            if combo[key] then
                sID=GetMacroIndexByName(combo[key])
                if sID>0 and sID<121 then
                    sType="M"
                else
                    sType,sID=string.split(":", combo[key])
                end
                if sID and sType~="S" then
                    globalcombo[key]=combo[key]
                else
                    globalcombo[key]=nil
                end
            else
                globalcombo[key]=nil
            end
        end
    end
end

function HealBot_Options_CleanseProfile()
    for x=1,20 do
        if HealBot_Config_Spells.Binds and HealBot_Config_Spells.Binds[x] and HealBot_Config_Spells.Binds[x] == 1 then HealBot_Config_Spells.Binds[x]=nil end
    end
end

function HealBot_Options_SaveSpellsProfile(cType)
      --HealBot_setCall("HealBot_Options_SaveSpellsProfile")
    if HealBot_Data["PCLASSTRIM"] then
        if HealBot_Config.SpecProfAtSave == HealBot_Action_GetSpecProf() then
            if HealBot_Config.Profile>1 then
                local sType=cType or "ALL"
                local dat
                if sType == "SPELLS" or sType == "ALL" then
                    HealBot_Options_CleanseProfile()
                    dat=HealBot_Util_Serialize(HealBot_Config_Spells, true)
                    HealBot_Class_Spells[HealBot_Data["PCLASSTRIM"]]=dat
                    if HealBot_Config.Profile == 3 then
                        if not HealBot_Class_Spells["GLOBAL"] then
                            HealBot_Class_Spells["GLOBAL"]={}
                            HealBot_Class_Spells["GLOBAL"].EnabledKeyCombo={}
                            HealBot_Class_Spells["GLOBAL"].EnemyKeyCombo={}
                            HealBot_Class_Spells["GLOBAL"].EmergKeyCombo={}
                        end
                        if HealBot_Util_Deserialize(HealBot_Class_Spells["GLOBAL"]) then
                            dat=HealBot_Util_Deserialize(HealBot_Class_Spells["GLOBAL"])
                        else
                            dat=HealBot_Options_copyTable(HealBot_Class_Spells["GLOBAL"])
                        end
                        HealBot_Options_hbProfile_saveGlobalCombo(HealBot_Config_Spells.EnabledKeyCombo, dat.EnabledKeyCombo, 20)
                        HealBot_Options_hbProfile_saveGlobalCombo(HealBot_Config_Spells.EnemyKeyCombo, dat.EnemyKeyCombo, 20)
                        HealBot_Options_hbProfile_saveGlobalCombo(HealBot_Config_Spells.EmergKeyCombo, dat.EmergKeyCombo, 5)
                        for x=1,20 do
                            if HealBot_SpellBinds_GetData(x)>1 then
                                if not dat.Binds then dat.Binds={} end
                                dat.Binds[x]=HealBot_SpellBinds_GetData(x)
                            elseif dat.Binds then 
                                dat.Binds[x]=nil
                            end
                        end
                        dat=HealBot_Util_Serialize(dat, true)
                        HealBot_Class_Spells["GLOBAL"]=dat
                    end
                end
                if sType == "BUFFS" or sType == "ALL" then
                    dat=HealBot_Util_Serialize(HealBot_Config_Buffs, true)
                    HealBot_Class_Buffs[HealBot_Data["PCLASSTRIM"]]=dat
                end
                if sType == "CURES" or sType == "ALL" then
                    dat=HealBot_Util_Serialize(HealBot_Config_Cures, true)
                    HealBot_Class_Cures[HealBot_Data["PCLASSTRIM"]]=dat
                end
            end
            HealBot_Spell_Loadouts[HealBot_Action_GetSpecID()]=HealBot_Util_Serialize(HealBot_Config_Spells, true)--HealBot_Options_copyTable(HealBot_Config_Spells)
        else
            HealBot_Timers_Set("PLAYER","LoadProfile")
            HealBot_Timers_Set("OOC","SaveSpellsProfile",true)
        end
    else
        HealBot_SetPlayerData()
        HealBot_Timers_Set("OOC","SaveSpellsProfile",true,true)
    end
    HealBot_Timers_Set("OOC","PostSpellsChanged",true)
end

function HealBot_Options_SaveActionIconsProfile()
      --HealBot_setCall("HealBot_Options_SaveActionIconsProfile")
    if HealBot_Data["PGUID"] then
        local spec=HealBot_Action_GetActionIconSpec()
        HealBot_ActionIconsData_Loadouts[spec]=HealBot_Util_Serialize(HealBot_Skins_ActionIconsData[Healbot_Config_Skins.Current_Skin], true)
        HealBot_ActionIcons_Loadouts[spec]=HealBot_Util_Serialize(HealBot_Skins_ActionIcons[Healbot_Config_Skins.Current_Skin], true)
    end
end

function HealBot_Options_CopyActionIconsProfile(skinname)
      --HealBot_setCall("HealBot_Options_CopyActionIconsProfile")
    if HealBot_Data["PGUID"] then
        local spec=HealBot_Action_GetActionIconSpecWithSkin(skinname)
        if HealBot_ActionIconsData_Loadouts[spec] then
            HealBot_Skins_ActionIconsData[Healbot_Config_Skins.Current_Skin]=HealBot_Util_Deserialize(HealBot_ActionIconsData_Loadouts[spec])
        end
        if HealBot_ActionIcons_Loadouts[spec] then
            HealBot_Skins_ActionIcons[Healbot_Config_Skins.Current_Skin]=HealBot_Util_Deserialize(HealBot_ActionIcons_Loadouts[spec])
        end
        HealBot_Skins_ResetSkin("init")
        HealBot_Timers_Set("OOC","ActionIconsNumbers",true)
        HealBot_Timers_Set("OOC","SaveActionIconsProfile",true)
        HealBot_Options_TabRunOnce["CopyActionIconsProfile"]=nil
        HealBot_Options_SkinsFramesActionIconsGeneralTab("CopyActionIconsProfile")
        HealBot_Timers_TurboOn()
    end
end

function HealBot_Options_DeleteActionIconsProfile(skinname)
      --HealBot_setCall("HealBot_Options_DeleteActionIconsProfile")
    if HealBot_Data["PGUID"] then
        local spec=HealBot_Action_GetActionIconSpecWithSkin(skinname)
        HealBot_ActionIconsData_Loadouts[spec]=nil
        HealBot_ActionIcons_Loadouts[spec]=nil
    end
end

function HealBot_Options_SaveProfile()
      --HealBot_setCall("HealBot_Options_SaveProfile")
    HealBot_Timers_Set("OOC","SaveSpellsProfile",true,true)
    HealBot_Timers_Set("OOC","SaveActionIconsProfile",true,true)
end
--------------------------------------------------------------------------------

hb_lVars["hbFAQ"]=1
function HealBot_Options_FAQ_DropDown()
      --HealBot_setCall("HealBot_Options_FAQ_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, #HEALBOT_ABOUT_FAQ_QUESTIONS, 1 do
        info.text=HEALBOT_ABOUT_FAQ_QUESTIONS[j];
        info.func=function(self)
                        hb_lVars["hbFAQ"]=self:GetID()
                        UIDropDownMenu_SetText(HealBot_Options_FAQ, HEALBOT_ABOUT_FAQ_QUESTIONS[hb_lVars["hbFAQ"]])
                        local g=_G["HealBot_Options_FAQAnswerTextD"]
                        g:SetText(HEALBOT_ABOUT_FAQ_ANSWERS[hb_lVars["hbFAQ"]])
                    end
        info.checked=false;
        if hb_lVars["hbFAQ"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

--------------------------------------------------------------------------------

function HealBot_Options_EmergencyFClass_DropDown()
      --HealBot_setCall("HealBot_Options_EmergencyFClass_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_EmergencyFClass_List), 1 do
        info.text=HealBot_Options_EmergencyFClass_List[j];
        info.func=function(self)
                        HealBot_Globals.EmergencyFClass=self:GetID()
                        UIDropDownMenu_SetText(HealBot_Options_EmergencyFClass, HealBot_Options_EmergencyFClass_List[HealBot_Globals.EmergencyFClass])
                        HealBot_Options_EFClass_Reset()
                    end
        info.checked=false;
        if HealBot_Globals.EmergencyFClass == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_EFClass_Reset()
      --HealBot_setCall("HealBot_Options_EFClass_Reset")
    if HealBot_Globals.EmergencyFClass == 1 then
        HealBot_Options_EFClassDruid:SetChecked(HealBot_Globals.EmergIncMelee[HEALBOT_DRUID]);
        HealBot_Options_EFClassHunter:SetChecked(HealBot_Globals.EmergIncMelee[HEALBOT_HUNTER]);
        HealBot_Options_EFClassMage:SetChecked(HealBot_Globals.EmergIncMelee[HEALBOT_MAGE]);
        HealBot_Options_EFClassPaladin:SetChecked(HealBot_Globals.EmergIncMelee[HEALBOT_PALADIN]);
        HealBot_Options_EFClassPriest:SetChecked(HealBot_Globals.EmergIncMelee[HEALBOT_PRIEST]);
        HealBot_Options_EFClassRogue:SetChecked(HealBot_Globals.EmergIncMelee[HEALBOT_ROGUE]);
        HealBot_Options_EFClassShaman:SetChecked(HealBot_Globals.EmergIncMelee[HEALBOT_SHAMAN]);
        HealBot_Options_EFClassWarlock:SetChecked(HealBot_Globals.EmergIncMelee[HEALBOT_WARLOCK]);
        HealBot_Options_EFClassWarrior:SetChecked(HealBot_Globals.EmergIncMelee[HEALBOT_WARRIOR]);
        HealBot_Options_EFClassDemonHunter:SetChecked(HealBot_Globals.EmergIncMelee[HEALBOT_DEMONHUNTER]);
        HealBot_Options_EFClassDeathKnight:SetChecked(HealBot_Globals.EmergIncMelee[HEALBOT_DEATHKNIGHT]);
        HealBot_Options_EFClassMonk:SetChecked(HealBot_Globals.EmergIncMelee[HEALBOT_MONK]);
    elseif HealBot_Globals.EmergencyFClass == 2 then
        HealBot_Options_EFClassDruid:SetChecked(HealBot_Globals.EmergIncRange[HEALBOT_DRUID]);
        HealBot_Options_EFClassHunter:SetChecked(HealBot_Globals.EmergIncRange[HEALBOT_HUNTER]);
        HealBot_Options_EFClassMage:SetChecked(HealBot_Globals.EmergIncRange[HEALBOT_MAGE]);
        HealBot_Options_EFClassPaladin:SetChecked(HealBot_Globals.EmergIncRange[HEALBOT_PALADIN]);
        HealBot_Options_EFClassPriest:SetChecked(HealBot_Globals.EmergIncRange[HEALBOT_PRIEST]);
        HealBot_Options_EFClassRogue:SetChecked(HealBot_Globals.EmergIncRange[HEALBOT_ROGUE]);
        HealBot_Options_EFClassShaman:SetChecked(HealBot_Globals.EmergIncRange[HEALBOT_SHAMAN]);
        HealBot_Options_EFClassWarlock:SetChecked(HealBot_Globals.EmergIncRange[HEALBOT_WARLOCK]);
        HealBot_Options_EFClassWarrior:SetChecked(HealBot_Globals.EmergIncRange[HEALBOT_WARRIOR]);
        HealBot_Options_EFClassDemonHunter:SetChecked(HealBot_Globals.EmergIncRange[HEALBOT_DEMONHUNTER]);
        HealBot_Options_EFClassDeathKnight:SetChecked(HealBot_Globals.EmergIncRange[HEALBOT_DEATHKNIGHT]);
        HealBot_Options_EFClassMonk:SetChecked(HealBot_Globals.EmergIncRange[HEALBOT_MONK]);
    elseif HealBot_Globals.EmergencyFClass == 3 then
        HealBot_Options_EFClassDruid:SetChecked(HealBot_Globals.EmergIncHealers[HEALBOT_DRUID]);
        HealBot_Options_EFClassHunter:SetChecked(HealBot_Globals.EmergIncHealers[HEALBOT_HUNTER]);
        HealBot_Options_EFClassMage:SetChecked(HealBot_Globals.EmergIncHealers[HEALBOT_MAGE]);
        HealBot_Options_EFClassPaladin:SetChecked(HealBot_Globals.EmergIncHealers[HEALBOT_PALADIN]);
        HealBot_Options_EFClassPriest:SetChecked(HealBot_Globals.EmergIncHealers[HEALBOT_PRIEST]);
        HealBot_Options_EFClassRogue:SetChecked(HealBot_Globals.EmergIncHealers[HEALBOT_ROGUE]);
        HealBot_Options_EFClassShaman:SetChecked(HealBot_Globals.EmergIncHealers[HEALBOT_SHAMAN]);
        HealBot_Options_EFClassWarlock:SetChecked(HealBot_Globals.EmergIncHealers[HEALBOT_WARLOCK]);
        HealBot_Options_EFClassWarrior:SetChecked(HealBot_Globals.EmergIncHealers[HEALBOT_WARRIOR]);
        HealBot_Options_EFClassDemonHunter:SetChecked(HealBot_Globals.EmergIncHealers[HEALBOT_DEMONHUNTER]);
        HealBot_Options_EFClassDeathKnight:SetChecked(HealBot_Globals.EmergIncHealers[HEALBOT_DEATHKNIGHT]);
        HealBot_Options_EFClassMonk:SetChecked(HealBot_Globals.EmergIncHealers[HEALBOT_MONK]);
    elseif HealBot_Globals.EmergencyFClass == 4 then
        HealBot_Options_EFClassDruid:SetChecked(HealBot_Globals.EmergIncCustom[HEALBOT_DRUID]);
        HealBot_Options_EFClassHunter:SetChecked(HealBot_Globals.EmergIncCustom[HEALBOT_HUNTER]);
        HealBot_Options_EFClassMage:SetChecked(HealBot_Globals.EmergIncCustom[HEALBOT_MAGE]);
        HealBot_Options_EFClassPaladin:SetChecked(HealBot_Globals.EmergIncCustom[HEALBOT_PALADIN]);
        HealBot_Options_EFClassPriest:SetChecked(HealBot_Globals.EmergIncCustom[HEALBOT_PRIEST]);
        HealBot_Options_EFClassRogue:SetChecked(HealBot_Globals.EmergIncCustom[HEALBOT_ROGUE]);
        HealBot_Options_EFClassShaman:SetChecked(HealBot_Globals.EmergIncCustom[HEALBOT_SHAMAN]);
        HealBot_Options_EFClassWarlock:SetChecked(HealBot_Globals.EmergIncCustom[HEALBOT_WARLOCK]);
        HealBot_Options_EFClassWarrior:SetChecked(HealBot_Globals.EmergIncCustom[HEALBOT_WARRIOR]);
        HealBot_Options_EFClassDemonHunter:SetChecked(HealBot_Globals.EmergIncCustom[HEALBOT_DEMONHUNTER]);
        HealBot_Options_EFClassDeathKnight:SetChecked(HealBot_Globals.EmergIncCustom[HEALBOT_DEATHKNIGHT]);
        HealBot_Options_EFClassMonk:SetChecked(HealBot_Globals.EmergIncCustom[HEALBOT_MONK]);
    end
    HealBot_Options_framesChanged(false)
end

--------------------------------------------------------------------------------
function HealBot_Options_ExtraSubSort_UpdateDropDown()
      --HealBot_setCall("HealBot_Options_ExtraSubSort_UpdateDropDown")
    HealBot_Options_ExtraSubSort.initialize=HealBot_Options_ExtraSubSort_DropDown
    UIDropDownMenu_SetText(HealBot_Options_ExtraSubSort,HealBot_Options_Sort_List[hbv_Skins_GetFrameVar("BarSort", "SUBORDER", hb_lVars["Frame"])])
end

function HealBot_Options_ExtraSubSort_SetAlpha()
      --HealBot_setCall("HealBot_Options_ExtraSubSort_SetAlpha")
    if hbv_Skins_GetFrameVar("BarSort", "RAIDORDER", hb_lVars["Frame"]) == 1 or
       hbv_Skins_GetFrameVar("BarSort", "RAIDORDER", hb_lVars["Frame"]) == 4 then
        HealBot_Options_ExtraSubSort:SetAlpha(0.4)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarSort", "RAIDORDER", hb_lVars["Frame"]), "BarSort", "SUBORDER", hb_lVars["Frame"])
        HealBot_Options_ExtraSubSort_UpdateDropDown()
    else
        HealBot_Options_ExtraSubSort:SetAlpha(1)
    end
end

function HealBot_Options_ExtraSort_DropDown()
      --HealBot_setCall("HealBot_Options_ExtraSort_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Sort_List), 1 do
        info.text=HealBot_Options_Sort_List[j];
        info.func=function(self)
                        hbv_Skins_SetFrameVar(self:GetID(), "BarSort", "RAIDORDER", hb_lVars["Frame"])
                        UIDropDownMenu_SetText(HealBot_Options_ExtraSort,HealBot_Options_Sort_List[hbv_Skins_GetFrameVar("BarSort", "RAIDORDER", hb_lVars["Frame"])])
                        HealBot_Options_framesChanged(false)
                        HealBot_Options_ExtraSubSort_SetAlpha()
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarSort", "RAIDORDER", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_ExtraSubSort_DropDown()
      --HealBot_setCall("HealBot_Options_ExtraSubSort_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Sort_List), 1 do
        info.text=HealBot_Options_Sort_List[j];
        info.func=function(self)
                        hbv_Skins_SetFrameVar(self:GetID(), "BarSort", "SUBORDER", hb_lVars["Frame"])
                        UIDropDownMenu_SetText(HealBot_Options_ExtraSubSort,HealBot_Options_Sort_List[hbv_Skins_GetFrameVar("BarSort", "SUBORDER", hb_lVars["Frame"])])
                        HealBot_Options_framesChanged(false)
                        HealBot_Options_ExtraSubSort_SetAlpha()
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarSort", "SUBORDER", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

--------------------------------------------------------------------------------
function HealBot_Options_Override_EffectsBarsUse_DropDown()
      --HealBot_setCall("HealBot_Options_Override_EffectsBarsUse_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_UseOverrides_List), 1 do
        info.text=HealBot_Options_UseOverrides_List[j];
        info.func=function(self)
                        HealBot_Globals.OverrideEffects["USEBARS"]=self:GetID()
                        UIDropDownMenu_SetText(HealBot_Options_Override_EffectsBarsUse,HealBot_Options_UseOverrides_List[HealBot_Globals.OverrideEffects["USEBARS"]])
                        HealBot_Timers_Set("LAST","OverrideEffectsUseToggle")
                    end
        info.checked=false;
        if HealBot_Globals.OverrideEffects["USEBARS"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_Override_EffectsUse_DropDown()
      --HealBot_setCall("HealBot_Options_Override_EffectsUse_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_UseOverrides_List), 1 do
        info.text=HealBot_Options_UseOverrides_List[j];
        info.func=function(self)
                        HealBot_Globals.OverrideEffects["USE"]=self:GetID()
                        UIDropDownMenu_SetText(HealBot_Options_Override_EffectsUse,HealBot_Options_UseOverrides_List[HealBot_Globals.OverrideEffects["USE"]])
                        HealBot_Timers_Set("LAST","OverrideEffectsUseToggle")
                    end
        info.checked=false;
        if HealBot_Globals.OverrideEffects["USE"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_Override_EffectsUse_Toggle()
      --HealBot_setCall("HealBot_Options_Override_EffectsUse_Toggle")
    HealBot_Options_DoEffects_DropDowns()
    if HealBot_Globals.OverrideEffects["USE"] == 1 then
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideUseHealthDrop",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideHealthDropPct",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideHealthDropSpeed",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideHealthDropCancel",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAuxBarFlashFreq",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAuxBarFlashAlphaMin",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAuxBarFlashAlphaMax",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideGoToAuxBarConfig",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideBorderHazardFreq",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideBorderHazardMinAlpha",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideGlowSizeBar",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideGlowSizeIcon",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_UseHealthDrop",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HealthDropPct",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HealthDropSpeed",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HealthDropCancel",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_AuxBarFlashFreq",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_AuxBarFlashAlphaMin",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_AuxBarFlashAlphaMax",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_GoToAuxBarConfig",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_BorderHazardFreq",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_BorderHazardMinAlpha",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_GlowSizeBar",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_GlowSizeIcon",true)
        g=_G["HealBot_OverrideHealthDrop_FontStr"]
        g:SetTextColor(1,1,1,0.4)
        g=_G["HealBot_SkinsOverrideBorderHazardText"]
        g:SetTextColor(1,1,1,0.4)
        g=_G["HealBot_SkinsOverrideGlowSizeText"]
        g:SetTextColor(1,1,1,0.4)
        g=_G["HealBot_OverrideAuxBarsAssign_FontStr"]
        g:SetTextColor(1,1,1,0.4)
        g=_G["HealBot_HealthDrop_FontStr"]
        g:SetTextColor(1,1,1,1)
        g=_G["HealBot_AuxBarsAssign_FontStr"]
        g:SetTextColor(1,1,1,1)
        g=_G["HealBot_SkinsBorderHazardText"]
        g:SetTextColor(1,1,1,1)
        g=_G["HealBot_SkinsGlowSizeText"]
        g:SetTextColor(1,1,1,1)
        HealBot_Options_Skin_EffectsOverrideLink:Hide()
        HealBot_Options_Override_EffectsSkinLink:Show()
    else
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideUseHealthDrop",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideHealthDropPct",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideHealthDropSpeed",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideHealthDropCancel",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAuxBarFlashFreq",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAuxBarFlashAlphaMin",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAuxBarFlashAlphaMax",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideGoToAuxBarConfig",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideBorderHazardFreq",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideBorderHazardMinAlpha",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideGlowSizeBar",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideGlowSizeIcon",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_UseHealthDrop",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HealthDropPct",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HealthDropSpeed",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HealthDropCancel",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_AuxBarFlashFreq",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_AuxBarFlashAlphaMin",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_AuxBarFlashAlphaMax",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_GoToAuxBarConfig",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_BorderHazardFreq",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_BorderHazardMinAlpha",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_GlowSizeBar",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_GlowSizeIcon",false)
        g=_G["HealBot_AuxBarsAssign_FontStr"]
        g:SetTextColor(1,1,1,0.4)
        g=_G["HealBot_SkinsBorderHazardText"]
        g:SetTextColor(1,1,1,0.4)
        g=_G["HealBot_SkinsGlowSizeText"]
        g:SetTextColor(1,1,1,0.4)
        g=_G["HealBot_HealthDrop_FontStr"]
        g:SetTextColor(1,1,1,0.4)
        g=_G["HealBot_OverrideHealthDrop_FontStr"]
        g:SetTextColor(1,1,1,1)
        g=_G["HealBot_SkinsOverrideGlowSizeText"]
        g:SetTextColor(1,1,1,1)
        g=_G["HealBot_SkinsOverrideBorderHazardText"]
        g:SetTextColor(1,1,1,1)
        g=_G["HealBot_OverrideAuxBarsAssign_FontStr"]
        g:SetTextColor(1,1,1,1)
        HealBot_Options_Override_EffectsSkinLink:Hide()
        HealBot_Options_Skin_EffectsOverrideLink:Show()
    end
    if HealBot_Globals.OverrideEffects["USEBARS"] == 1 then
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideBarUpdateFreq",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideUseFluidBars",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideGroupHealthMinUnits",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideGroupHealthThres",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideGroupHealthDimming",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideHotBarHealthThres",false)
        for x=1,8 do
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideEFGroup"..x,false)
        end
        for x=1,8 do
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_EFGroup"..x,true)
        end
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideFocusGroupDimming",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideEFGroupRaidOnly",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideHotBarDimming",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_UseFluidBars",true)
        HealBot_Options_UseOverrideFocusGroups:SetAlpha(0.4)
        HealBot_Options_OverrideHotBarDebuffPrio:SetAlpha(0.4)
        HealBot_Options_OverrideGroupHealthRange:SetAlpha(0.4)
        HealBot_Options_UseFocusGroups:SetAlpha(1)
        HealBot_Options_HotBarDebuffPrio:SetAlpha(1)
        HealBot_Options_GroupHealthRange:SetAlpha(1)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_BarUpdateFreq",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_FocusGroupDimming",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_EFGroupRaidOnly",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_GroupHealthMinUnits",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_GroupHealthThres",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_GroupHealthDimming",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HotBarDimming",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HotBarHealthThres",true)
        g=_G["HealBot_OverrideEffectsFluid_FontStr"]
        g:SetTextColor(1,1,1,0.4)
        g=_G["HealBot_OverrideHotBars_FontStr"]
        g:SetTextColor(1,1,1,0.4)
        g=_G["HealBot_SkinsOverrideFocusGroupsText"]
        g:SetTextColor(1,1,1,0.4)
        g=_G["HealBot_SkinsOverrideFocusGroupsIncText"]
        g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                       OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                       OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                       0.4)
        g=_G["HealBot_OverrideGroupBars_FontStr"]
        g:SetTextColor(1,1,1,0.4)
        g=_G["HealBot_SkinsFocusGroupsText"]
        g:SetTextColor(1,1,1,1)
        HealBot_Options_SetLabel("HealBot_SkinsFocusGroupsIncText",HEALBOT_OPTIONS_EMERGFILTERGROUPS)
        g=_G["HealBot_HotBars_FontStr"]
        g:SetTextColor(1,1,1,1)
        g=_G["HealBot_EffectsFluid_FontStr"]
        g:SetTextColor(1,1,1,1)
        g=_G["HealBot_GroupBars_FontStr"]
        g:SetTextColor(1,1,1,1)
        HealBot_Options_Override_EffectsSkinBarsLink:Show()
        HealBot_Options_Skin_EffectsOverrideBarsLink:Hide()
    else
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideUseFluidBars",true)
        for x=1,8 do
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideEFGroup"..x,true)
        end
        for x=1,8 do
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_EFGroup"..x,false)
        end
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideFocusGroupDimming",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideEFGroupRaidOnly",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideGroupHealthMinUnits",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideGroupHealthThres",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideGroupHealthDimming",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideHotBarDimming",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideHotBarHealthThres",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_UseFluidBars",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideBarUpdateFreq",true)
        HealBot_Options_UseOverrideFocusGroups:SetAlpha(1)
        HealBot_Options_OverrideHotBarDebuffPrio:SetAlpha(1)
        HealBot_Options_OverrideGroupHealthRange:SetAlpha(1)
        HealBot_Options_UseFocusGroups:SetAlpha(0.4)
        HealBot_Options_HotBarDebuffPrio:SetAlpha(0.4)
        HealBot_Options_GroupHealthRange:SetAlpha(0.4)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_BarUpdateFreq",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_FocusGroupDimming",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_EFGroupRaidOnly",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_GroupHealthMinUnits",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_GroupHealthThres",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_GroupHealthDimming",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HotBarDimming",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HotBarHealthThres",false)
        g=_G["HealBot_EffectsFluid_FontStr"]
        g:SetTextColor(1,1,1,0.4)
        g=_G["HealBot_HotBars_FontStr"]
        g:SetTextColor(1,1,1,0.4)
        g=_G["HealBot_SkinsFocusGroupsText"]  
        g:SetTextColor(1,1,1,0.4)
        g=_G["HealBot_SkinsFocusGroupsIncText"]
        g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                       OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                       OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                       0.4)
        g=_G["HealBot_GroupBars_FontStr"]
        g:SetTextColor(1,1,1,0.4)
        g=_G["HealBot_OverrideHotBars_FontStr"]
        g:SetTextColor(1,1,1,1)
        g=_G["HealBot_SkinsOverrideFocusGroupsText"]
        HealBot_Options_SetLabel("HealBot_SkinsOverrideFocusGroupsIncText",HEALBOT_OPTIONS_EMERGFILTERGROUPS)
        g:SetTextColor(1,1,1,1)
        g=_G["HealBot_OverrideEffectsFluid_FontStr"]
        g:SetTextColor(1,1,1,1)
        g=_G["HealBot_OverrideGroupBars_FontStr"]
        g:SetTextColor(1,1,1,1)
        HealBot_Options_Override_EffectsSkinBarsLink:Hide()
        HealBot_Options_Skin_EffectsOverrideBarsLink:Show()
    end
    HealBot_Timers_Set("AUX","BarFlashAlphaMinMax",true)
    HealBot_Timers_Set("LAST","BarFreqVars",true)
    HealBot_Timers_Set("SKINS","SetFocusGroups",true)
    --HealBot_Options_DoEffects_DropDowns()
    --if HealBot_Globals.OverrideEffects["FLUIDBARS"]~=hbv_Skins_GetBoolean("General", "FLUIDBARS") then
    --    HealBot_Timers_Set("AUX","UpdateAllAuxByType")
    --else
        HealBot_Timers_Set("SKINS","FluidFlashInUse",true)
    --end
end

function HealBot_Options_Override_ColoursClassUse_DropDown()
      --HealBot_setCall("HealBot_Options_Override_ColoursClassUse_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_UseOverrides_List), 1 do
        info.text=HealBot_Options_UseOverrides_List[j];
        info.func=function(self)
                        if HealBot_Globals.OverrideColours["USECLASS"]~=self:GetID() then
                            HealBot_Globals.OverrideColours["USECLASS"]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_Override_ColoursClassUse,HealBot_Options_UseOverrides_List[HealBot_Globals.OverrideColours["USECLASS"]])
                            HealBot_Timers_Set("LAST","OverrideClassColourUseToggle")
                        end
                    end
        info.checked=false;
        if HealBot_Globals.OverrideColours["USECLASS"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_Override_ColoursClassUse_Toggle()
      --HealBot_setCall("HealBot_Options_Override_ColoursClassUse_Toggle")
    if HealBot_Globals.OverrideColours["USECLASS"] == 1 then
        HealBot_Options_Override_ColClassTxt:SetAlpha(0.4)
        HealBot_OverrideColClassDeathKnightpickt:SetAlpha(0.4)
        HealBot_OverrideColClassDeathKnightpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassDeathKnightPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassDeathKnightResetColour",false)
        HealBot_OverrideColClassDemonHunterpickt:SetAlpha(0.4)
        HealBot_OverrideColClassDemonHunterpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassDemonHunterPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassDemonHunterResetColour",false)
        HealBot_OverrideColClassDruidpickt:SetAlpha(0.4)
        HealBot_OverrideColClassDruidpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassDruidPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassDruidResetColour",false)
        HealBot_OverrideColClassEvokerpickt:SetAlpha(0.4)
        HealBot_OverrideColClassEvokerpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassEvokerPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassEvokerResetColour",false)
        HealBot_OverrideColClassHunterpickt:SetAlpha(0.4)
        HealBot_OverrideColClassHunterpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassHunterPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassHunterResetColour",false)
        HealBot_OverrideColClassMagepickt:SetAlpha(0.4)
        HealBot_OverrideColClassMagepick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassMagePresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassMageResetColour",false)
        HealBot_OverrideColClassMonkpickt:SetAlpha(0.4)
        HealBot_OverrideColClassMonkpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassMonkPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassMonkResetColour",false)
        HealBot_OverrideColClassPaladinpickt:SetAlpha(0.4)
        HealBot_OverrideColClassPaladinpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassPaladinPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassPaladinResetColour",false)
        HealBot_OverrideColClassPriestpickt:SetAlpha(0.4)
        HealBot_OverrideColClassPriestpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassPriestPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassPriestResetColour",false)
        HealBot_OverrideColClassRoguepickt:SetAlpha(0.4)
        HealBot_OverrideColClassRoguepick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassRoguePresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassRogueResetColour",false)
        HealBot_OverrideColClassShamanpickt:SetAlpha(0.4)
        HealBot_OverrideColClassShamanpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassShamanPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassShamanResetColour",false)
        HealBot_OverrideColClassWarlockpickt:SetAlpha(0.4)
        HealBot_OverrideColClassWarlockpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassWarlockPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassWarlockResetColour",false)
        HealBot_OverrideColClassWarriorpickt:SetAlpha(0.4)
        HealBot_OverrideColClassWarriorpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassWarriorPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassWarriorResetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassResetAllColour",false)

        HealBot_Options_Skins_ColClassTxt:SetAlpha(1)
        HealBot_ColClassDeathKnightpickt:SetAlpha(1)
        HealBot_ColClassDeathKnightpick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("ClassDeathKnight") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassDeathKnightPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassDeathKnightResetColour",true)
        HealBot_ColClassDemonHunterpickt:SetAlpha(1)
        HealBot_ColClassDemonHunterpick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("ClassDemonHunter") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassDemonHunterPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassDemonHunterResetColour",true)
        HealBot_ColClassDruidpickt:SetAlpha(1)
        HealBot_ColClassDruidpick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("ClassDruid") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassDruidPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassDruidResetColour",true)
        HealBot_ColClassEvokerpickt:SetAlpha(1)
        HealBot_ColClassEvokerpick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("ClassEvoker") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassEvokerPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassEvokerResetColour",true)
        HealBot_ColClassHunterpickt:SetAlpha(1)
        HealBot_ColClassHunterpick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("ClassHunter") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassHunterPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassHunterResetColour",true)
        HealBot_ColClassMagepickt:SetAlpha(1)
        HealBot_ColClassMagepick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("ClassMage") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassMagePresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassMageResetColour",true)
        HealBot_ColClassMonkpickt:SetAlpha(1)
        HealBot_ColClassMonkpick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("ClassMonk") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassMonkPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassMonkResetColour",true)
        HealBot_ColClassPaladinpickt:SetAlpha(1)
        HealBot_ColClassPaladinpick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("ClassPaladin") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassPaladinPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassPaladinResetColour",true)
        HealBot_ColClassPriestpickt:SetAlpha(1)
        HealBot_ColClassPriestpick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("ClassPriest") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassPriestPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassPriestResetColour",true)
        HealBot_ColClassRoguepickt:SetAlpha(1)
        HealBot_ColClassRoguepick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("ClassRogue") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassRoguePresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassRogueResetColour",true)
        HealBot_ColClassShamanpickt:SetAlpha(1)
        HealBot_ColClassShamanpick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("ClassShaman") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassShamanPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassShamanResetColour",true)
        HealBot_ColClassWarlockpickt:SetAlpha(1)
        HealBot_ColClassWarlockpick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("ClassWarlock") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassWarlockPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassWarlockResetColour",true)
        HealBot_ColClassWarriorpickt:SetAlpha(1)
        HealBot_ColClassWarriorpick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("ClassWarrior") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassWarriorPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassWarriorResetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassResetAllColour",true)
        HealBot_Options_Override_ColoursClassSkinLink:Show()
        HealBot_Options_Skin_ColoursClassOverrideLink:Hide()
    else
        HealBot_Options_Override_ColClassTxt:SetAlpha(1)
        HealBot_OverrideColClassDeathKnightpickt:SetAlpha(1)
        HealBot_OverrideColClassDeathKnightpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideClassDeathKnight") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassDeathKnightPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassDeathKnightResetColour",true)
        HealBot_OverrideColClassDemonHunterpickt:SetAlpha(1)
        HealBot_OverrideColClassDemonHunterpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideClassDemonHunter") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassDemonHunterPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassDemonHunterResetColour",true)
        HealBot_OverrideColClassDruidpickt:SetAlpha(1)
        HealBot_OverrideColClassDruidpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideClassDruid") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassDruidPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassDruidResetColour",true)
        HealBot_OverrideColClassEvokerpickt:SetAlpha(1)
        HealBot_OverrideColClassEvokerpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideClassEvoker") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassEvokerPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassEvokerResetColour",true)
        HealBot_OverrideColClassHunterpickt:SetAlpha(1)
        HealBot_OverrideColClassHunterpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideClassHunter") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassHunterPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassHunterResetColour",true)
        HealBot_OverrideColClassMagepickt:SetAlpha(1)
        HealBot_OverrideColClassMagepick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideClassMage") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassMagePresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassMageResetColour",true)
        HealBot_OverrideColClassMonkpickt:SetAlpha(1)
        HealBot_OverrideColClassMonkpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideClassMonk") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassMonkPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassMonkResetColour",true)
        HealBot_OverrideColClassPaladinpickt:SetAlpha(1)
        HealBot_OverrideColClassPaladinpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideClassPaladin") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassPaladinPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassPaladinResetColour",true)
        HealBot_OverrideColClassPriestpickt:SetAlpha(1)
        HealBot_OverrideColClassPriestpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideClassPriest") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassPriestPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassPriestResetColour",true)
        HealBot_OverrideColClassRoguepickt:SetAlpha(1)
        HealBot_OverrideColClassRoguepick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideClassRogue") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassRoguePresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassRogueResetColour",true)
        HealBot_OverrideColClassShamanpickt:SetAlpha(1)
        HealBot_OverrideColClassShamanpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideClassShaman") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassShamanPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassShamanResetColour",true)
        HealBot_OverrideColClassWarlockpickt:SetAlpha(1)
        HealBot_OverrideColClassWarlockpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideClassWarlock") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassWarlockPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassWarlockResetColour",true)
        HealBot_OverrideColClassWarriorpickt:SetAlpha(1)
        HealBot_OverrideColClassWarriorpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideClassWarrior") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassWarriorPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassWarriorResetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColClassResetAllColour",true)

        HealBot_Options_Skins_ColClassTxt:SetAlpha(0.4)
        HealBot_ColClassDeathKnightpickt:SetAlpha(0.4)
        HealBot_ColClassDeathKnightpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassDeathKnightPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassDeathKnightResetColour",false)
        HealBot_ColClassDemonHunterpickt:SetAlpha(0.4)
        HealBot_ColClassDemonHunterpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassDemonHunterPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassDemonHunterResetColour",false)
        HealBot_ColClassDruidpickt:SetAlpha(0.4)
        HealBot_ColClassDruidpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassDruidPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassDruidResetColour",false)
        HealBot_ColClassEvokerpickt:SetAlpha(0.4)
        HealBot_ColClassEvokerpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassEvokerPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassEvokerResetColour",false)
        HealBot_ColClassHunterpickt:SetAlpha(0.4)
        HealBot_ColClassHunterpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassHunterPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassHunterResetColour",false)
        HealBot_ColClassMagepickt:SetAlpha(0.4)
        HealBot_ColClassMagepick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassMagePresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassMageResetColour",false)
        HealBot_ColClassMonkpickt:SetAlpha(0.4)
        HealBot_ColClassMonkpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassMonkPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassMonkResetColour",false)
        HealBot_ColClassPaladinpickt:SetAlpha(0.4)
        HealBot_ColClassPaladinpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassPaladinPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassPaladinResetColour",false)
        HealBot_ColClassPriestpickt:SetAlpha(0.4)
        HealBot_ColClassPriestpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassPriestPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassPriestResetColour",false)
        HealBot_ColClassRoguepickt:SetAlpha(0.4)
        HealBot_ColClassRoguepick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassRoguePresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassRogueResetColour",false)
        HealBot_ColClassShamanpickt:SetAlpha(0.4)
        HealBot_ColClassShamanpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassShamanPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassShamanResetColour",false)
        HealBot_ColClassWarlockpickt:SetAlpha(0.4)
        HealBot_ColClassWarlockpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassWarlockPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassWarlockResetColour",false)
        HealBot_ColClassWarriorpickt:SetAlpha(0.4)
        HealBot_ColClassWarriorpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassWarriorPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassWarriorResetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColClassResetAllColour",false)
        HealBot_Options_Override_ColoursClassSkinLink:Hide()
        HealBot_Options_Skin_ColoursClassOverrideLink:Show()
    end
    HealBot_Timers_Set("LAST","ClassColourUpdate")
end

function HealBot_Options_Override_ColoursRoleUse_DropDown()
      --HealBot_setCall("HealBot_Options_Override_ColoursRoleUse_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_UseOverrides_List), 1 do
        info.text=HealBot_Options_UseOverrides_List[j];
        info.func=function(self)
                        if HealBot_Globals.OverrideColours["USEROLE"]~=self:GetID() then
                            HealBot_Globals.OverrideColours["USEROLE"]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_Override_ColoursRoleUse,HealBot_Options_UseOverrides_List[HealBot_Globals.OverrideColours["USEROLE"]])
                            HealBot_Timers_Set("LAST","OverrideRoleColourUseToggle")
                        end
                    end
        info.checked=false;
        if HealBot_Globals.OverrideColours["USEROLE"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_Override_ColoursRoleUse_Toggle()
      --HealBot_setCall("HealBot_Options_Override_ColoursRoleUse_Toggle")
    if HealBot_Globals.OverrideColours["USEROLE"] == 1 then
        HealBot_Options_Override_ColRoleTxt:SetAlpha(0.4)
        HealBot_OverrideColRoleTankpickt:SetAlpha(0.4)
        HealBot_OverrideColRoleTankpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColRoleTankPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColRoleTankResetColour",false)
        HealBot_OverrideColRoleHealpickt:SetAlpha(0.4)
        HealBot_OverrideColRoleHealpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColRoleHealPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColRoleHealResetColour",false)
        HealBot_OverrideColRoleDPSpickt:SetAlpha(0.4)
        HealBot_OverrideColRoleDPSpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColRoleDPSPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColRoleDPSResetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColRoleResetAllColour",false)

        HealBot_Options_Skins_ColRoleTxt:SetAlpha(1)
        HealBot_ColRoleTankpickt:SetAlpha(1)
        HealBot_ColRoleTankpick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("RoleTank") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColRoleTankPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColRoleTankResetColour",true)
        HealBot_ColRoleHealpickt:SetAlpha(1)
        HealBot_ColRoleHealpick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("RoleHeal") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColRoleHealPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColRoleHealResetColour",true)
        HealBot_ColRoleDPSpickt:SetAlpha(1)
        HealBot_ColRoleDPSpick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("RoleDPS") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColRoleDPSPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColRoleDPSResetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColRoleResetAllColour",true)
        HealBot_Options_Override_ColoursRoleSkinLink:Show()
        HealBot_Options_Skin_ColoursRoleOverrideLink:Hide()
    else
        HealBot_Options_Override_ColRoleTxt:SetAlpha(1)
        HealBot_OverrideColRoleTankpickt:SetAlpha(1)
        HealBot_OverrideColRoleTankpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideRoleTank") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColRoleTankPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColRoleTankResetColour",true)
        HealBot_OverrideColRoleHealpickt:SetAlpha(1)
        HealBot_OverrideColRoleHealpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideRoleHeal") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColRoleHealPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColRoleHealResetColour",true)
        HealBot_OverrideColRoleDPSpickt:SetAlpha(1)
        HealBot_OverrideColRoleDPSpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideRoleDPS") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColRoleDPSPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColRoleDPSResetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColRoleResetAllColour",true)

        HealBot_Options_Skins_ColRoleTxt:SetAlpha(0.4)
        HealBot_ColRoleTankpickt:SetAlpha(0.4)
        HealBot_ColRoleTankpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColRoleTankPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColRoleTankResetColour",false)
        HealBot_ColRoleHealpickt:SetAlpha(0.4)
        HealBot_ColRoleHealpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColRoleHealPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColRoleHealResetColour",false)
        HealBot_ColRoleDPSpickt:SetAlpha(0.4)
        HealBot_ColRoleDPSpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColRoleDPSPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColRoleDPSResetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColRoleResetAllColour",false)
        HealBot_Options_Skin_ColoursRoleOverrideLink:Show()
        HealBot_Options_Override_ColoursRoleSkinLink:Hide()
    end
    HealBot_Timers_Set("LAST","RoleColourUpdate")
end

function HealBot_Options_Override_ColoursPowerUse_DropDown()
      --HealBot_setCall("HealBot_Options_Override_ColoursPowerUse_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_UseOverrides_List), 1 do
        info.text=HealBot_Options_UseOverrides_List[j];
        info.func=function(self)
                        if HealBot_Globals.OverrideColours["USEPOWER"]~=self:GetID() then
                            HealBot_Globals.OverrideColours["USEPOWER"]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_Override_ColoursPowerUse,HealBot_Options_UseOverrides_List[HealBot_Globals.OverrideColours["USEPOWER"]])
                            HealBot_Timers_Set("LAST","OverridePowerColourUseToggle")
                        end
                    end
        info.checked=false;
        if HealBot_Globals.OverrideColours["USEPOWER"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_Override_ColoursPowerAlt_DropDown()
      --HealBot_setCall("HealBot_Options_Override_ColoursPowerUse_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    if HealBot_Globals.OverrideColours["USEPOWER"] == 1 then
        info.text=" "
        UIDropDownMenu_AddButton(info);
    else
        for j=1, getn(HealBot_Options_Lists["PowerAlt"]), 1 do
            info.text=HealBot_Options_Lists["PowerAlt"][j];
            info.func=function(self)
                            if (HealBot_Globals.OverrideColours["POWERALT"] or -1)+2 ~= self:GetID() then
                                HealBot_Globals.OverrideColours["POWERALT"]=self:GetID() - 2
                                UIDropDownMenu_SetText(HealBot_Options_Override_ColoursPowerAlt,HealBot_Options_Lists["PowerAlt"][self:GetID()])
                                HealBot_Timers_Set("AUX","UpdateAllAuxPowerBars")
                            end
                        end
            info.checked=false;
            if (HealBot_Globals.OverrideColours["POWERALT"] or -1)+2 == j then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_SkinColPowerAlt_DropDown()
      --HealBot_setCall("HealBot_Options_Override_ColoursPowerUse_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    if HealBot_Globals.OverrideColours["USEPOWER"] == 2 then
        info.text=" "
        UIDropDownMenu_AddButton(info);
    else
        for j=1, getn(HealBot_Options_Lists["PowerAlt"]), 1 do
            info.text=HealBot_Options_Lists["PowerAlt"][j];
            info.func=function(self)
                            if hbv_Skins_GetVar("General", "POWERALT")+2 ~= self:GetID() then
                                hbv_Skins_SetVar(self:GetID() - 2, "General", "POWERALT")
                                UIDropDownMenu_SetText(HealBot_Options_SkinColPowerAlt,HealBot_Options_Lists["PowerAlt"][self:GetID()])
                                HealBot_Timers_Set("AUX","UpdateAllAuxPowerBars")
                            end
                        end
            info.checked=false;
            if hbv_Skins_GetVar("General", "POWERALT")+2 == j then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_Override_ColoursAdaptiveUse_DropDown()
      --HealBot_setCall("HealBot_Options_Override_ColoursAdaptiveUse_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_UseOverrides_List), 1 do
        info.text=HealBot_Options_UseOverrides_List[j];
        info.func=function(self)
                        if HealBot_Globals.OverrideColours["USEADAPTIVE"]~=self:GetID() then
                            HealBot_Globals.OverrideColours["USEADAPTIVE"]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_Override_ColoursAdaptiveUse,HealBot_Options_UseOverrides_List[HealBot_Globals.OverrideColours["USEADAPTIVE"]])
                            HealBot_Timers_Set("LAST","OverrideAdaptiveColourUseToggle")
                        end
                    end
        info.checked=false;
        if HealBot_Globals.OverrideColours["USEADAPTIVE"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_Override_ColoursAdaptiveUse_Toggle()
      --HealBot_setCall("HealBot_Options_Override_ColoursAdaptiveUse_Toggle")
    if HealBot_Globals.OverrideColours["USEADAPTIVE"] == 1 then
        HealBot_Options_Override_ColAdaptiveTxt:SetAlpha(0.4)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive1Down",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive2Up",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive2Down",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive3Up",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive3Down",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive4Up",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive4Down",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive5Up",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive5Down",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive6Up",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive6Down",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive7Up",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive7Down",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive8Up",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive8Down",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive9Up",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive9Down",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive10Up",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive10Down",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive11Up",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptivePlugin",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptivePluginButton",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveRecentHeals",false)
        healbotOverride_ColoursAdaptiveRecentHealspick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAdaptiveRecentHealsPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveRecentHealsResetColour",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveThreat",false)
        healbotOverride_ColoursAdaptiveThreatpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAdaptiveThreatPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveThreatResetColour",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveDebuffs",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveDebuffButton",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveAggro",false)
        healbotOverride_ColoursAdaptiveAggropick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAdaptiveAggroPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveAggroResetColour",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveHighlight",false)
        healbotOverride_ColoursAdaptiveHighlightpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAdaptiveHighlightPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveHighlightResetColour",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveTarget",false)
        healbotOverride_ColoursAdaptiveTargetpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAdaptiveTargetPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveTargetResetColour",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveOOR",false)
        healbotOverride_ColoursAdaptiveOORpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAdaptiveOORPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveOORResetColour",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveBuffs",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveBuffsButton",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveOverheals",false)
        healbotOverride_ColoursAdaptiveOverhealspick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAdaptiveOverhealsPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveOverhealsResetColour",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveAbsorbs",false)
        healbotOverride_ColoursAdaptiveAbsorbspick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAdaptiveAbsorbsPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveAbsorbsResetColour",false)
        HealBot_Options_Skins_ColAdaptiveTxt:SetAlpha(1)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive1Down",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive2Up",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive2Down",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive3Up",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive3Down",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive4Up",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive4Down",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive5Up",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive5Down",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive6Up",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive6Down",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive7Up",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive7Down",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive8Up",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive8Down",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive9Up",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive9Down",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive10Up",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive10Down",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive11Up",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptivePlugin",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptivePluginButton",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveRecentHeals",true)
        HealBot_Options_ColoursAdaptiveRecentHealspick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("SkinAdaptiveRecentHeals") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinAdaptiveRecentHealsPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveRecentHealsResetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveThreat",true)
        HealBot_Options_ColoursAdaptiveThreatpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("SkinAdaptiveThreat") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinAdaptiveThreatPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveThreatResetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveDebuffs",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveDebuffButton",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveAggro",true)
        HealBot_Options_ColoursAdaptiveAggropick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("SkinAdaptiveAggro") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinAdaptiveAggroPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveAggroResetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveHighlight",true)
        HealBot_Options_ColoursAdaptiveHighlightpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("SkinAdaptiveHighlight") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinAdaptiveHighlightPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveHighlightResetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveTarget",true)
        HealBot_Options_ColoursAdaptiveTargetpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("SkinAdaptiveTarget") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinAdaptiveTargetPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveTargetResetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveOOR",true)
        HealBot_Options_ColoursAdaptiveOORpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("SkinAdaptiveOOR") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinAdaptiveOORPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveOORResetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveBuffs",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveBuffsButton",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveOverheals",true)
        HealBot_Options_ColoursAdaptiveOverhealspick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("SkinAdaptiveOverheals") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinAdaptiveOverhealsPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveOverhealsResetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveAbsorbs",true)
        HealBot_Options_ColoursAdaptiveAbsorbspick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("SkinAdaptiveAbsorbs") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinAdaptiveAbsorbsPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveAbsorbsResetColour",true)
        HealBot_Options_Override_ColoursAdaptiveSkinLink:Show()
        HealBot_Options_Skin_ColoursAdaptiveOverrideLink:Hide()
    else
        HealBot_Options_Override_ColAdaptiveTxt:SetAlpha(1)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive1Down",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive2Up",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive2Down",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive3Up",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive3Down",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive4Up",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive4Down",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive5Up",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive5Down",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive6Up",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive6Down",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive7Up",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive7Down",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive8Up",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive8Down",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive9Up",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive9Down",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive10Up",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive10Down",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptive11Up",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptivePlugin",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptivePluginButton",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveRecentHeals",true)
        healbotOverride_ColoursAdaptiveRecentHealspick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideAdaptiveRecentHeals") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAdaptiveRecentHealsPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveRecentHealsResetColour",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveThreat",true)
        healbotOverride_ColoursAdaptiveThreatpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideAdaptiveThreat") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAdaptiveThreatPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveThreatResetColour",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveDebuffs",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveDebuffButton",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveAggro",true)
        healbotOverride_ColoursAdaptiveAggropick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideAdaptiveAggro") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAdaptiveAggroPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveAggroResetColour",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveHighlight",true)
        healbotOverride_ColoursAdaptiveHighlightpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideAdaptiveHighlight") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAdaptiveHighlightPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveHighlightResetColour",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveTarget",true)
        healbotOverride_ColoursAdaptiveTargetpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideAdaptiveTarget") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAdaptiveTargetPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveTargetResetColour",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveOOR",true)
        healbotOverride_ColoursAdaptiveOORpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideAdaptiveOOR") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAdaptiveOORPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveOORResetColour",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveBuffs",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveBuffsButton",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveOverheals",true)
        healbotOverride_ColoursAdaptiveOverhealspick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideAdaptiveOverheals") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAdaptiveOverhealsPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveOverhealsResetColour",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveAbsorbs",true)
        healbotOverride_ColoursAdaptiveAbsorbspick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverrideAdaptiveAbsorbs") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAdaptiveAbsorbsPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("healbotOverride_ColoursAdaptiveAbsorbsResetColour",true)
        HealBot_Options_Skins_ColAdaptiveTxt:SetAlpha(0.4)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive1Down",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive2Up",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive2Down",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive3Up",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive3Down",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive4Up",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive4Down",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive5Up",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive5Down",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive6Up",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive6Down",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive7Up",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive7Down",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive8Up",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive8Down",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive9Up",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive9Down",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive10Up",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive10Down",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptive11Up",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptivePlugin",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptivePluginButton",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveRecentHeals",false)
        HealBot_Options_ColoursAdaptiveRecentHealspick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinAdaptiveRecentHealsPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveRecentHealsResetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveThreat",false)
        HealBot_Options_ColoursAdaptiveThreatpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinAdaptiveThreatPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveThreatResetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveDebuffs",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveDebuffButton",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveAggro",false)
        HealBot_Options_ColoursAdaptiveAggropick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinAdaptiveAggroPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveAggroResetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveHighlight",false)
        HealBot_Options_ColoursAdaptiveHighlightpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinAdaptiveHighlightPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveHighlightResetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveTarget",false)
        HealBot_Options_ColoursAdaptiveTargetpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinAdaptiveTargetPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveTargetResetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveOOR",false)
        HealBot_Options_ColoursAdaptiveOORpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinAdaptiveOORPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveOORResetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveBuffs",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveBuffsButton",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveOverheals",false)
        HealBot_Options_ColoursAdaptiveOverhealspick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinAdaptiveOverhealsPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveOverhealsResetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveAbsorbs",false)
        HealBot_Options_ColoursAdaptiveAbsorbspick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinAdaptiveAbsorbsPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ColoursAdaptiveAbsorbsResetColour",false)
        HealBot_Options_Skin_ColoursAdaptiveOverrideLink:Show()
        HealBot_Options_Override_ColoursAdaptiveSkinLink:Hide()
    end
    HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
end

function HealBot_Options_Override_ColoursPowerUse_Toggle()
      --HealBot_setCall("HealBot_Options_Override_ColoursPowerUse_Toggle")
    HealBot_Options_SkinColPowerAlt.initialize=HealBot_Options_SkinColPowerAlt_DropDown
    HealBot_Options_Override_ColoursPowerAlt.initialize=HealBot_Options_Override_ColoursPowerAlt_DropDown
    if HealBot_Globals.OverrideColours["USEPOWER"] == 1 then
        HealBot_Options_Override_ColPowerTxt:SetAlpha(0.4)
        HealBot_OverrideColPowerAstralpickt:SetAlpha(0.4)
        HealBot_OverrideColPowerAstralpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerAstralPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerAstralResetColour",false)
        HealBot_OverrideColPowerEnergypickt:SetAlpha(0.4)
        HealBot_OverrideColPowerEnergypick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerEnergyPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerEnergyResetColour",false)
        HealBot_OverrideColPowerFocuspickt:SetAlpha(0.4)
        HealBot_OverrideColPowerFocuspick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerFocusPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerFocusResetColour",false)
        HealBot_OverrideColPowerFurypickt:SetAlpha(0.4)
        HealBot_OverrideColPowerFurypick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerFuryPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerFuryResetColour",false)
        HealBot_OverrideColPowerManapickt:SetAlpha(0.4)
        HealBot_OverrideColPowerManapick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerManaPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerManaResetColour",false)
        HealBot_OverrideColPowerRagepickt:SetAlpha(0.4)
        HealBot_OverrideColPowerRagepick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerRagePresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerRageResetColour",false)
        HealBot_OverrideColPowerRunicpickt:SetAlpha(0.4)
        HealBot_OverrideColPowerRunicpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerRunicPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerRunicResetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerResetAllColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColoursHidePowerAlt",false)
        HealBot_Options_Override_ColoursPowerAlt:SetAlpha(0.4)
        UIDropDownMenu_SetText(HealBot_Options_Override_ColoursPowerAlt," ")

        HealBot_Options_Skins_ColPowerTxt:SetAlpha(1)
        HealBot_ColPowerAstralpickt:SetAlpha(1)
        HealBot_Options_SkinColPowerAlt:SetAlpha(1)
        local x=hbv_Skins_GetVar("General", "POWERALT") + 2
        UIDropDownMenu_SetText(HealBot_Options_SkinColPowerAlt, HealBot_Options_Lists["PowerAlt"][x])
        HealBot_ColPowerAstralpick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("PowerAstral") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerAstralPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerAstralResetColour",true)
        HealBot_ColPowerEnergypickt:SetAlpha(1)
        HealBot_ColPowerEnergypick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("PowerEnergy") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerEnergyPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerEnergyResetColour",true)
        HealBot_ColPowerFocuspickt:SetAlpha(1)
        HealBot_ColPowerFocuspick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("PowerFocus") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerFocusPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerFocusResetColour",true)
        HealBot_ColPowerFurypickt:SetAlpha(1)
        HealBot_ColPowerFurypick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("PowerFury") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerFuryPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerFuryResetColour",true)
        HealBot_ColPowerManapickt:SetAlpha(1)
        HealBot_ColPowerManapick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("PowerMana") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerManaPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerManaResetColour",true)
        HealBot_ColPowerRagepickt:SetAlpha(1)
        HealBot_ColPowerRagepick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("PowerRage") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerRagePresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerRageResetColour",true)
        HealBot_ColPowerRunicpickt:SetAlpha(1)
        HealBot_ColPowerRunicpick:SetScript('OnMouseDown', function() HealBot_SkinColorpick_OnClick("PowerRunic") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerRunicPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerRunicResetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerResetAllColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColHidePowerAlt",true)
        HealBot_Options_Override_ColoursPowerSkinLink:Show()
        HealBot_Options_Skin_ColoursPowerOverrideLink:Hide()
    else
        HealBot_Options_Override_ColPowerTxt:SetAlpha(1)
        HealBot_OverrideColPowerAstralpickt:SetAlpha(1)
        HealBot_Options_Override_ColoursPowerAlt:SetAlpha(1)
        local x=(HealBot_Globals.OverrideColours["POWERALT"] or -1) + 2
        UIDropDownMenu_SetText(HealBot_Options_Override_ColoursPowerAlt, HealBot_Options_Lists["PowerAlt"][x])
        HealBot_OverrideColPowerAstralpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverridePowerAstral") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerAstralPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerAstralResetColour",true)
        HealBot_OverrideColPowerEnergypickt:SetAlpha(1)
        HealBot_OverrideColPowerEnergypick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverridePowerEnergy") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerEnergyPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerEnergyResetColour",true)
        HealBot_OverrideColPowerFocuspickt:SetAlpha(1)
        HealBot_OverrideColPowerFocuspick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverridePowerFocus") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerFocusPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerFocusResetColour",true)
        HealBot_OverrideColPowerFurypickt:SetAlpha(1)
        HealBot_OverrideColPowerFurypick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverridePowerFury") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerFuryPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerFuryResetColour",true)
        HealBot_OverrideColPowerManapickt:SetAlpha(1)
        HealBot_OverrideColPowerManapick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverridePowerMana") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerManaPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerManaResetColour",true)
        HealBot_OverrideColPowerRagepickt:SetAlpha(1)
        HealBot_OverrideColPowerRagepick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverridePowerRage") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerRagePresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerRageResetColour",true)
        HealBot_OverrideColPowerRunicpickt:SetAlpha(1)
        HealBot_OverrideColPowerRunicpick:SetScript('OnMouseDown', function() HealBot_OverrideColorpick_OnClick("OverridePowerRunic") end)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerRunicPresetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerRunicResetColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColPowerResetAllColour",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideColoursHidePowerAlt",true)

        HealBot_Options_Skins_ColPowerTxt:SetAlpha(0.4)
        HealBot_ColPowerAstralpickt:SetAlpha(0.4)
        HealBot_Options_SkinColPowerAlt:SetAlpha(0.4)
        UIDropDownMenu_SetText(HealBot_Options_SkinColPowerAlt," ")
        HealBot_ColPowerAstralpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerAstralPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerAstralResetColour",false)
        HealBot_ColPowerEnergypickt:SetAlpha(0.4)
        HealBot_ColPowerEnergypick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerEnergyPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerEnergyResetColour",false)
        HealBot_ColPowerFocuspickt:SetAlpha(0.4)
        HealBot_ColPowerFocuspick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerFocusPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerFocusResetColour",false)
        HealBot_ColPowerFurypickt:SetAlpha(0.4)
        HealBot_ColPowerFurypick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerFuryPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerFuryResetColour",false)
        HealBot_ColPowerManapickt:SetAlpha(0.4)
        HealBot_ColPowerManapick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerManaPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerManaResetColour",false)
        HealBot_ColPowerRagepickt:SetAlpha(0.4)
        HealBot_ColPowerRagepick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerRagePresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerRageResetColour",false)
        HealBot_ColPowerRunicpickt:SetAlpha(0.4)
        HealBot_ColPowerRunicpick:SetScript('OnMouseDown', nil)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerRunicPresetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerRunicResetColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColPowerResetAllColour",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SkinColHidePowerAlt",false)
        HealBot_Options_Skin_ColoursPowerOverrideLink:Show()
        HealBot_Options_Override_ColoursPowerSkinLink:Hide()
    end
    HealBot_Timers_Set("LAST","PowerColourUpdate")
end

function HealBot_Options_Override_ChatUse_DropDown()
      --HealBot_setCall("HealBot_Options_Override_ChatUse_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_UseOverrides_List), 1 do
        info.text=HealBot_Options_UseOverrides_List[j];
        info.func=function(self)
                        HealBot_Globals.OverrideChat["USE"]=self:GetID()
                        UIDropDownMenu_SetText(HealBot_Options_Override_ChatUse,HealBot_Options_UseOverrides_List[HealBot_Globals.OverrideChat["USE"]])
                        HealBot_Timers_Set("CHAT","OverrideChatUseToggle")
                    end
        info.checked=false;
        if HealBot_Globals.OverrideChat["USE"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_Override_ChatUse_Toggle()
      --HealBot_setCall("HealBot_Options_Override_ChatUse_Toggle")
    if HealBot_Globals.OverrideChat["USE"] == 1 then
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideCastNotify1",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideCastNotify2",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideCastNotify3",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideCastNotify4",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideCastNotify5",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideCastNotify6",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideCastNotifyResOnly",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideNotifyOtherMsg",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAfterCombatOOM",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAfterCombatOOMValue",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_CastNotify1",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_CastNotify2",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_CastNotify3",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_CastNotify4",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_CastNotify5",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_CastNotify6",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_CastNotifyResOnly",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_NotifyOtherMsg",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_AfterCombatOOM",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_AfterCombatOOMValue",true)
        HealBot_Options_Override_ChatSkinLink:Show()
        HealBot_Options_Skin_ChatOverrideLink:Hide()
    else
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideCastNotify1",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideCastNotify2",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideCastNotify3",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideCastNotify4",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideCastNotify5",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideCastNotify6",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideCastNotifyResOnly",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideNotifyOtherMsg",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAfterCombatOOM",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAfterCombatOOMValue",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_CastNotify1",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_CastNotify2",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_CastNotify3",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_CastNotify4",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_CastNotify5",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_CastNotify6",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_CastNotifyResOnly",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_NotifyOtherMsg",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_AfterCombatOOM",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_AfterCombatOOMValue",false)
        HealBot_Options_Skin_ChatOverrideLink:Show()
        HealBot_Options_Override_ChatSkinLink:Hide()
    end
    HealBot_Timers_Set("CHAT","SetChat")
end

function HealBot_Options_SetChat()
      --HealBot_setCall("HealBot_Options_SetChat")
    if HealBot_Globals.OverrideChat["USE"] == 1 then
        HealBot_setLuVars("EOCOOM", hbv_Skins_GetBoolean("Chat", "EOCOOM"))
        HealBot_setLuVars("EOCOOMV", hbv_Skins_GetVar("Chat", "EOCOOMV"))
        HealBot_Events_setLuVars("ChatMSG", hbv_Skins_GetVar("Chat", "MSG"))
        HealBot_Events_setLuVars("ChatRESONLY", hbv_Skins_GetBoolean("Chat", "RESONLY"))
        HealBot_Events_setLuVars("ChatNOTIFY", hbv_Skins_GetVar("Chat", "NOTIFY"))
    else
        HealBot_setLuVars("EOCOOM", HealBot_Globals.OverrideChat["EOCOOM"])
        HealBot_setLuVars("EOCOOMV", HealBot_Globals.OverrideChat["EOCOOMV"])
        HealBot_Events_setLuVars("ChatMSG", HealBot_Globals.OverrideChat["MSG"])
        HealBot_Events_setLuVars("ChatRESONLY", HealBot_Globals.OverrideChat["RESONLY"])
        HealBot_Events_setLuVars("ChatNOTIFY", HealBot_Globals.OverrideChat["NOTIFY"])
    end
end

function HealBot_Options_Override_FramesUse_DropDown()
      --HealBot_setCall("HealBot_Options_Override_FramesUse_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_UseOverrides_List), 1 do
        info.text=HealBot_Options_UseOverrides_List[j];
        info.func=function(self)
                        HealBot_Globals.OverrideFrames["USE"]=self:GetID()
                        UIDropDownMenu_SetText(HealBot_Options_Override_FramesUse,HealBot_Options_UseOverrides_List[HealBot_Globals.OverrideFrames["USE"]])
                        HealBot_Timers_Set("LAST","OverrideFramesUseToggle")
                    end
        info.checked=false;
        if HealBot_Globals.OverrideFrames["USE"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_Override_FramesUse_Toggle()
      --HealBot_setCall("HealBot_Options_Override_FramesUse_Toggle")
    if HealBot_Globals.OverrideFrames["USE"] == 1 then
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAlwaysRunEvents",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverridePartyFrames",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverridePlayerTargetFrames",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideFocusFrame",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideMiniBossFrames",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideRaidFrames",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_AlwaysRunEvents",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_PartyFrames",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_PlayerTargetFrames",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_MiniBossFrames",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_FocusFrame",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_RaidFrames",true)
        g=_G["HealBot_GeneralSkinBlizz_FontStr"]
        g:SetTextColor(1,1,1,1)
        g=_G["HealBot_OverrideGeneralSkinBlizz_FontStr"]
        g:SetTextColor(1,1,1,0.4)
        HealBot_Options_Skin_FrameBlizzOverrideLink:Hide()
        HealBot_Options_Override_FramesSkinLink:Show()
    else
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideAlwaysRunEvents",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverridePartyFrames",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverridePlayerTargetFrames",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideFocusFrame",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideMiniBossFrames",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_OverrideRaidFrames",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_AlwaysRunEvents",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_PartyFrames",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_PlayerTargetFrames",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_MiniBossFrames",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_FocusFrame",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_RaidFrames",false)
        g=_G["HealBot_GeneralSkinBlizz_FontStr"]
        g:SetTextColor(1,1,1,0.4)
        g=_G["HealBot_OverrideGeneralSkinBlizz_FontStr"]
        g:SetTextColor(1,1,1,1)
        HealBot_Options_Override_FramesSkinLink:Hide()
        HealBot_Options_Skin_FrameBlizzOverrideLink:Show()
    end
    HealBot_Options_SetFrames()
    HealBot_Timers_ToggleBlizzardFrames()
end

function HealBot_Options_SetFrames()
      --HealBot_setCall("HealBot_Options_SetFrames")
    if HealBot_Globals.OverrideFrames["USE"] == 1 then
        HealBot_setLuVars("HIDEPARTYF", hbv_Skins_GetBoolean("General", "HIDEPARTYF"))
        HealBot_setLuVars("HIDEPTF", hbv_Skins_GetBoolean("General", "HIDEPTF"))
        HealBot_setLuVars("HIDEFOCUSF", hbv_Skins_GetBoolean("General", "HIDEFOCUSF"))
        HealBot_setLuVars("HIDEBOSSF", hbv_Skins_GetBoolean("General", "HIDEBOSSF"))
        HealBot_setLuVars("HIDERAIDF", hbv_Skins_GetBoolean("General", "HIDERAIDF"))
        hb_lVars["RUNBLIZZEVENTS"]=hbv_Skins_GetBoolean("General", "RUNBLIZZEVENTS")
    else
        HealBot_setLuVars("HIDEPARTYF", HealBot_Globals.OverrideFrames["HIDEPARTYF"])
        HealBot_setLuVars("HIDEPTF", HealBot_Globals.OverrideFrames["HIDEPTF"])
        HealBot_setLuVars("HIDEFOCUSF", HealBot_Globals.OverrideFrames["HIDEFOCUSF"])
        HealBot_setLuVars("HIDEBOSSF", HealBot_Globals.OverrideFrames["HIDEBOSSF"])
        HealBot_setLuVars("HIDERAIDF", HealBot_Globals.OverrideFrames["HIDERAIDF"])
        hb_lVars["RUNBLIZZEVENTS"]=HealBot_Globals.OverrideFrames["RUNBLIZZEVENTS"]
    end
end
--------------------------------------------------------------------------------

hb_lVars["ActionBarsCombo"]=1
hb_lVars["ActionBarsComboTxt"]="Enabled"
hb_lVars["hbIconHelpSelectID"]=0
function HealBot_Options_ActionBarsCombo_DropDown()
      --HealBot_setCall("HealBot_Options_ActionBarsCombo_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_ActionBarsCombo_List), 1 do
        info.text=HealBot_Options_ActionBarsCombo_List[j];
        info.func=function(self)
                        hb_lVars["ActionBarsCombo"]=self:GetID()
                        if hb_lVars["ActionBarsCombo"] == 1 then
                            hb_lVars["ActionBarsComboTxt"]="Enabled"
                        elseif hb_lVars["ActionBarsCombo"] == 2 then
                            hb_lVars["ActionBarsComboTxt"]="Enemy"
                        elseif hb_lVars["ActionBarsCombo"] == 3 then
                            hb_lVars["ActionBarsComboTxt"]="Emerg"
                        end
                        UIDropDownMenu_SetText(HealBot_Options_ActionBarsCombo,HealBot_Options_ActionBarsCombo_List[hb_lVars["ActionBarsCombo"]])
                        HealBot_Timers_Set("INIT","SpellsTabText")
                        if hb_lVars["ActionBarsCombo"]<4 and hb_lVars["hbIconHelpSelectID"]>0 then
                            HealBot_Options_HelpSpellsSelect_HideIconDropdown(hb_lVars["hbIconHelpSelectID"])
                        end
                    end
        info.checked=false;
        if hb_lVars["ActionBarsCombo"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

local cursorIcon={}
cursorIcon.OnFrame=0
function HealBot_Options_CursorChanged(isDefault, newCursorType)
      --HealBot_setCall("HealBot_Options_CursorChanged")
    if newCursorType == 0 and cursorIcon.OnFrame>0 and cursorIcon.infoType then
        HealBot_Options_CursorUpdateIcon(cursorIcon.infoType, cursorIcon.OnFrame, cursorIcon.info)
    end
end

function HealBot_Options_ButtonIcon_OnEnter(id)
      --HealBot_setCall("HealBot_Options_ButtonIcon_OnEnter")
    if cursorIcon.RightClick then cursorIcon.OnFrame=id end
    HealBot_Options_Show_Help("SPELLSICON",true)
    local infoType, info1, _, info3=GetCursorInfo()
    if infoType then
        cursorIcon.infoType=infoType
        if infoType == "item" then
            cursorIcon.info="I:"..info1
        elseif infoType == "spell" then
            cursorIcon.info="S:"..info3
        elseif infoType == "macro" then
            cursorIcon.info=info1
        end
    else
        cursorIcon.infoType=false
    end
end

function HealBot_Options_ButtonIcon_OnLeave()
      --HealBot_setCall("HealBot_Options_ButtonIcon_OnLeave")
    cursorIcon.OnFrame=0
    HealBot_Options_Show_Help("SPELLSICON",false)
end

function HealBot_Options_RightOnFrame(id)
      --HealBot_setCall("HealBot_Options_RightOnFrame")
    cursorIcon.RightClick=true
    cursorIcon.OnFrame=id
end

function HealBot_Options_ButtonIcon_OnMouseDown(self, button, id)
      --HealBot_setCall("HealBot_Options_ButtonIcon_OnMouseDown")
    if button == "RightButton" and self.infoType and self.infoID then
        cursorIcon.infoType=self.infoType
        cursorIcon.info=self.info
        if self.infoType == "item" then
            PickupItem(self.infoID)
            HealBot_Options_RightOnFrame(id)
            HealBot_Options_CursorUpdateIcon("nil", id)
        elseif self.infoType == "spell" then
            HealBot_WoWAPI_SpellPickup(self.infoID)
            HealBot_Options_RightOnFrame(id)
            HealBot_Options_CursorUpdateIcon("nil", id)
        elseif self.infoType == "macro" then
            PickupMacro(self.infoID)
            HealBot_Options_RightOnFrame(id)
            HealBot_Options_CursorUpdateIcon("nil", id)
        end
    else
        HealBot_Options_OnReceiveInfo(id)
    end
end

function HealBot_Options_CursorUpdateIcon(infoType, id, info)
      --HealBot_setCall("HealBot_Options_CursorUpdateIcon")
    local object=_G["HealBot_Options_Button"..id.."Icon"]
    if infoType == "nil" then
        object.infoType=false
        object.infoID=false
        object.info=false
        if id == 9 then
            object=_G["HealBot_Options_ActionIconsConfigAbility"]
        else
            object=_G["HealBot_Options_Button"..id]
        end
        object:SetText("")
    else
        local prevType,prevID,prevInfo=nil,nil,nil
        if object.infoType and object.infoID then
            prevType,prevID,prevInfo=object.infoType,object.infoID,object.info
        else
            cursorIcon.RightClick=false
        end
        if id == 9 then
            object=_G["HealBot_Options_ActionIconsConfigAbility"]
            if infoType == "spell" or infoType == "item" then
                info=HealBot_ActionIcons_GetSpell(info)
            else
                info=GetMacroInfo(info)
            end
        else
            local cType=HealBot_Options_GetComboType()
            local modifier=HealBot_Options_ComboButton_ModifierKey(HealBot_Options_ComboButtons_Modifier)
            object=_G["HealBot_Options_Button"..id]
            if infoType == "spell" or infoType == "item" then
                HealBot_Action_SetSpell(cType, HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(id)), info)
                info=HealBot_Action_GetSpell(cType, HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(id)))
            else
                info=GetMacroInfo(info)
            end
        end
        object:SetText(info or "")
        if prevType then
            cursorIcon.infoType=prevType
            cursorIcon.info=prevInfo
            if prevType == "item" then
                PickupItem(prevID)
            elseif prevType == "spell" then
                HealBot_WoWAPI_SpellPickup(prevID)
            elseif prevType == "macro" then
                PickupMacro(prevID)
            end
        end
    end
end

function HealBot_Options_OnReceiveInfo(id)
      --HealBot_setCall("HealBot_Options_OnReceiveInfo")
    local infoType, info1, _, info3=GetCursorInfo()
    if infoType then
        if infoType == "item" then
            HealBot_Options_CursorUpdateIcon(infoType, id, "I:"..info1)
        elseif infoType == "spell" then
            HealBot_Options_CursorUpdateIcon(infoType, id, "S:"..info3)
        elseif infoType == "macro" then
            local name=GetMacroInfo(info1)
            HealBot_Options_CursorUpdateIcon(infoType, id, name)
        end
    end
end

function HealBot_Options_OnReceiveDrag(self, id)
      --HealBot_setCall("HealBot_Options_OnReceiveDrag")
    HealBot_Options_OnReceiveInfo(id)
end

local HealBot_Options_SCAC={ [1]=HEALBOT_WOWMENU,
                               [2]=HEALBOT_TOGGLE_ENABLED,
                               [3]=HEALBOT_HBMENU
                             }
function HealBot_Options_ComboClass_SetIcon(bNo, cType, cKey, info)
      --HealBot_setCall("HealBot_Options_ComboClass_SetIcon")
    local object=_G["HealBot_Options_Button"..bNo.."Icon"]
    local sText, sIcon, sType, sID
    if bNo == 9 then
        sText, sIcon, sType, sID=HealBot_ActionIcons_GetSpell(info)
    else
        sText, sIcon, sType, sID=HealBot_Action_GetSpell(cType, cKey)
    end
    if object then
        if sIcon then
            object:SetNormalTexture(sIcon)
            object.infoType=sType
            object.infoID=sID
            object.info=sText
        else
            object:SetNormalTexture([[Interface\Addons\HealBot\Images\frame\icon_outline]])
            object.infoType=false
            object.infoID=false
            object.info=false
        end
    end
end

function HealBot_Options_GetComboType()
      --HealBot_setCall("HealBot_Options_GetComboType")
    local cType="ICON"
    if hb_lVars["ActionBarsCombo"] == 1 then
        cType="ENABLED"
    elseif hb_lVars["ActionBarsCombo"] == 2 then
        cType="ENEMY"
    elseif hb_lVars["ActionBarsCombo"] == 3 then
        cType="EMERG"
    end
    return cType
end

function HealBot_Options_ComboClass_Text()
      --HealBot_setCall("HealBot_Options_ComboClass_Text")
    local combo=nil
    local cType=HealBot_Options_GetComboType()
    local modifier=HealBot_Options_ComboButton_ModifierKey(HealBot_Options_ComboButtons_Modifier)
    HealBot_Action_ClearSpellCache(cType)

    HealBot_Options_Button1:SetText(HealBot_Action_GetSpell(cType, HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(1))) or "")
    HealBot_Options_Button2:SetText(HealBot_Action_GetSpell(cType, HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(2))) or "")
    HealBot_Options_Button3:SetText(HealBot_Action_GetSpell(cType, HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(3))) or "")
    HealBot_Options_Button4:SetText(HealBot_Action_GetSpell(cType, HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(4))) or "")
    HealBot_Options_Button5:SetText(HealBot_Action_GetSpell(cType, HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(5))) or "")

    for x=1,5 do
        HealBot_Options_ComboClass_SetIcon(x, cType, HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(x)))
    end

    if cType == "ICON" then
        HealBot_SpellAutoTarget:Hide()
        HealBot_ShiftSpellAutoTarget:Hide()
        HealBot_CtrlSpellAutoTarget:Hide()
        HealBot_AltSpellAutoTarget:Hide()
        HealBot_CtrlShiftSpellAutoTarget:Hide()
        HealBot_Options_SpellTargetLastTarget:Hide()
        HealBot_SpellAutoTrinket1:Hide()
        HealBot_ShiftSpellAutoTrinket1:Hide()
        HealBot_CtrlSpellAutoTrinket1:Hide()
        HealBot_AltSpellAutoTrinket1:Hide()
        HealBot_CtrlShiftSpellAutoTrinket1:Hide()
        HealBot_SpellAutoTrinket2:Hide()
        HealBot_ShiftSpellAutoTrinket2:Hide()
        HealBot_CtrlSpellAutoTrinket2:Hide()
        HealBot_AltSpellAutoTrinket2:Hide()
        HealBot_CtrlShiftSpellAutoTrinket2:Hide()
        HealBot_AvoidBlueCursor:Hide()
        HealBot_ShiftAvoidBlueCursor:Hide()
        HealBot_CtrlAvoidBlueCursor:Hide()
        HealBot_AltAvoidBlueCursor:Hide()
        HealBot_CtrlShiftAvoidBlueCursor:Hide()
        HealBot_Options_Bind1:Hide()
        HealBot_Options_Button1Icon:Hide()
        HealBot_Options_Bind2:Hide()
        HealBot_Options_Bind3:Hide()
        HealBot_Options_Bind4:Hide()
        HealBot_Options_Bind5:Hide()
        HealBot_Options_Button1:ClearAllPoints()
        HealBot_Options_Button1:SetPoint("TOPLEFT",220,-155)
        HealBot_Options_UseIconCmds:Show()
    else
        HealBot_Options_Button1:ClearAllPoints()
        HealBot_Options_Button1:SetPoint("TOPLEFT",145,-155)
        HealBot_Options_Button1Icon:Show()
        HealBot_Options_UseIconCmds:Hide()
        HealBot_SpellAutoTarget:Show()
        HealBot_ShiftSpellAutoTarget:Show()
        HealBot_CtrlSpellAutoTarget:Show()
        HealBot_AltSpellAutoTarget:Show()
        HealBot_CtrlShiftSpellAutoTarget:Show()
        HealBot_Options_SpellTargetLastTarget:Show()
        HealBot_SpellAutoTrinket1:Show()
        HealBot_ShiftSpellAutoTrinket1:Show()
        HealBot_CtrlSpellAutoTrinket1:Show()
        HealBot_AltSpellAutoTrinket1:Show()
        HealBot_CtrlShiftSpellAutoTrinket1:Show()
        HealBot_SpellAutoTrinket2:Show()
        HealBot_ShiftSpellAutoTrinket2:Show()
        HealBot_CtrlSpellAutoTrinket2:Show()
        HealBot_AltSpellAutoTrinket2:Show()
        HealBot_CtrlShiftSpellAutoTrinket2:Show()
        HealBot_AvoidBlueCursor:Show()
        HealBot_ShiftAvoidBlueCursor:Show()
        HealBot_CtrlAvoidBlueCursor:Show()
        HealBot_AltAvoidBlueCursor:Show()
        HealBot_CtrlShiftAvoidBlueCursor:Show()
        HealBot_Options_Bind1:Show()
        HealBot_Options_Bind2:Show()
        HealBot_Options_Bind3:Show()
        HealBot_Options_Bind4:Show()
        HealBot_Options_Bind5:Show()

        HealBot_Options_SpellTargetLastTarget:SetChecked(HealBot_Config_Spells.SpellTargetLastTarget[hb_lVars["ActionBarsComboTxt"]])

        if hb_lVars["ActionBarsCombo"] == 1 then
            combo=HealBot_Config_Spells.EnabledSpellTarget;
        elseif hb_lVars["ActionBarsCombo"] == 2 then
            combo=HealBot_Config_Spells.EnemySpellTarget;
        elseif hb_lVars["ActionBarsCombo"] == 3 then
            combo=HealBot_Config_Spells.EmergSpellTarget;
        else
            combo=false
        end
        if combo then
            HealBot_SpellAutoTarget:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(1))] or false)
            HealBot_ShiftSpellAutoTarget:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(2))] or false)
            HealBot_CtrlSpellAutoTarget:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(3))] or false)
            HealBot_AltSpellAutoTarget:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(4))] or false)
            HealBot_CtrlShiftSpellAutoTarget:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(5))] or false)
        end
        if hb_lVars["ActionBarsCombo"] == 1 then
            combo=HealBot_Config_Spells.EnabledSpellTrinket1;
        elseif hb_lVars["ActionBarsCombo"] == 2 then
            combo=HealBot_Config_Spells.EnemySpellTrinket1;
        elseif hb_lVars["ActionBarsCombo"] == 3 then
            combo=HealBot_Config_Spells.EmergSpellTrinket1;
        else
            combo=false
        end
        if combo then
            HealBot_SpellAutoTrinket1:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(1))] or false)
            HealBot_ShiftSpellAutoTrinket1:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(2))] or false)
            HealBot_CtrlSpellAutoTrinket1:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(3))] or false)
            HealBot_AltSpellAutoTrinket1:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(4))] or false)
            HealBot_CtrlShiftSpellAutoTrinket1:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(5))] or false)
        end
        if hb_lVars["ActionBarsCombo"] == 1 then
            combo=HealBot_Config_Spells.EnabledSpellTrinket2;
        elseif hb_lVars["ActionBarsCombo"] == 2 then
            combo=HealBot_Config_Spells.EnemySpellTrinket2;
        elseif hb_lVars["ActionBarsCombo"] == 3 then
            combo=HealBot_Config_Spells.EmergSpellTrinket2;
        else
            combo=false
        end
        if combo then
            HealBot_SpellAutoTrinket2:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(1))] or false)
            HealBot_ShiftSpellAutoTrinket2:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(2))] or false)
            HealBot_CtrlSpellAutoTrinket2:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(3))] or false)
            HealBot_AltSpellAutoTrinket2:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(4))] or false)
            HealBot_CtrlShiftSpellAutoTrinket2:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(5))] or false)
        end
        if hb_lVars["ActionBarsCombo"] == 1 then
            combo=HealBot_Config_Spells.EnabledAvoidBlueCursor;
        elseif hb_lVars["ActionBarsCombo"] == 2 then
            combo=HealBot_Config_Spells.EnemyAvoidBlueCursor;
        elseif hb_lVars["ActionBarsCombo"] == 3 then
            combo=HealBot_Config_Spells.EmergAvoidBlueCursor;
        else
            combo=false
        end
        if combo then
            HealBot_AvoidBlueCursor:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(1))] or false)
            HealBot_ShiftAvoidBlueCursor:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(2))] or false)
            HealBot_CtrlAvoidBlueCursor:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(3))] or false)
            HealBot_AltAvoidBlueCursor:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(4))] or false)
            HealBot_CtrlShiftAvoidBlueCursor:SetChecked(combo[HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(5))] or false)
        end
    end
end

--------------------------------------------------------------------------------

hb_lVars["HelpSpellsComboID"]=0
hb_lVars["SkinsHealSpellsComboID"]=0
function HealBot_Options_SelectHealSpellsCombo_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_SelectHealSpellsCombo_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local spells=HealBot_Options_SelectAllSpellsCombo_list()
    if getn(spells)>10 then
        if level == 1 then
            for j=1, ceil(getn(spells)/10), 1 do
                local n=j*10
                if n > getn(spells) then n=getn(spells) end
                info.text="    "..((j*10)-9).." - "..n;
                info.hasArrow=true
                info.notCheckable=true
                info.menuList=j, true, j
                UIDropDownMenu_AddButton(info)
            end
        else
            local n=menuList*10
            if n > getn(spells) then n=getn(spells) end
            for j=((menuList*10)-9), n, 1 do
                local mText=spells[j]
                info.text=mText
                info.func=function(self)
                                hb_lVars["hbHelpSpellsSelect"]=self:GetText()
                                hb_lVars["HelpSpellsComboID"]=self:GetID()
                                UIDropDownMenu_SetText(HealBot_Options_SelectHealSpellsCombo,mText)
                            end
                info.checked=false;
                if hb_lVars["HelpSpellsComboID"] == j then info.checked=true end
                UIDropDownMenu_AddButton(info, level)
            end
        end
    else
        for j=1, getn(spells), 1 do
            local sName=spells[j]
            info.text=sName
            info.func=function(self)
                            hb_lVars["hbHelpSpellsSelect"]=self:GetText()
                            hb_lVars["HelpSpellsComboID"]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_SelectHealSpellsCombo,sName)
                        end
            info.checked=false;
            if hb_lVars["HelpSpellsComboID"] == j then info.checked=true; end
            UIDropDownMenu_AddButton(info);
        end
    end
end

--------------------------------------------------------------------------------

hb_lVars["MacrosComboID"]=0
hb_lVars["SkinsMacrosComboID"]=0
function HealBot_Options_UpdateMacrosList()
      --HealBot_setCall("HealBot_Options_UpdateMacrosList")
    local numglobal,numperchar=GetNumMacros();
    local totalMacros=numglobal+numperchar
    local hbMacroName=nil
    local macroList={}
    for x,_ in pairs(HealBot_Options_NoDuplcates) do
        HealBot_Options_NoDuplcates[x]=nil
    end
    for j=1, numglobal, 1 do
        hbMacroName=GetMacroInfo(j)
        if hbMacroName and not HealBot_Options_NoDuplcates[hbMacroName] then
            HealBot_Options_NoDuplcates[hbMacroName]=true
            table.insert(macroList,hbMacroName)
        end
    end
    for j=MAX_ACCOUNT_MACROS+1, numperchar+MAX_ACCOUNT_MACROS, 1 do
        hbMacroName=GetMacroInfo(j)
        if hbMacroName and not HealBot_Options_NoDuplcates[hbMacroName] then
            HealBot_Options_NoDuplcates[hbMacroName]=true
            table.insert(macroList,hbMacroName)
        end
    end
    table.sort(macroList)
    return macroList
end

function HealBot_Options_SelectMacrosCombo_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_SelectMacrosCombo_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local macroList=HealBot_Options_UpdateMacrosList()
    if getn(macroList)>10 then
        if level == 1 then
            for j=1, ceil(getn(macroList)/10), 1 do
                local n=j*10
                if n > getn(macroList) then n=getn(macroList) end
                info.text="    "..((j*10)-9).." - "..n;
                info.hasArrow=true
                info.notCheckable=true
                info.menuList=j, true, j
                UIDropDownMenu_AddButton(info)
            end
        else
            local n=menuList*10
            if n > getn(macroList) then n=getn(macroList) end
            for j=((menuList*10)-9), n, 1 do
                local mText=macroList[j]
                info.text=mText
                info.func=function(self)
                                hb_lVars["hbHelpMacroSelect"]=self:GetText()
                                hb_lVars["MacrosComboID"]=self:GetID()
                                UIDropDownMenu_SetText(HealBot_Options_SelectMacrosCombo,mText)
                            end
                info.checked=false;
                if hb_lVars["MacrosComboID"] == j then info.checked=true end
                UIDropDownMenu_AddButton(info, level)
            end
        end
    elseif getn(macroList)>0 then
        for j=1, getn(macroList), 1 do
            local mText=macroList[j]
            info.text=mText
            info.func=function(self)
                            hb_lVars["hbHelpMacroSelect"]=self:GetText()
                            hb_lVars["MacrosComboID"]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_SelectMacrosCombo,mText)
                        end
            info.checked=false;
            if hb_lVars["MacrosComboID"] == j then info.checked=true end
            UIDropDownMenu_AddButton(info)
        end
    else
        info.text=HEALBOT_TOOLTIP_NONE
        info.func=function(self)
                        hb_lVars["MacrosComboID"]=self:GetID()
                        UIDropDownMenu_SetText(HealBot_Options_SelectMacrosCombo,HEALBOT_TOOLTIP_NONE)
                    end
        info.checked=true;
        UIDropDownMenu_AddButton(info);
        hb_lVars["hbHelpMacroSelect"]=nil
    end
end

--------------------------------------------------------------------------------

function HealBot_Options_itemsByLevel()
      --HealBot_setCall("HealBot_Options_itemsByLevel")
    local hbLevel=UnitLevel("player")
    local hbItemsByLevel={}
    for x,_ in pairs(HealBot_Options_NoDuplcates) do
        HealBot_Options_NoDuplcates[x]=nil
    end
    local hbTmpText1=nil
    if HEALBOT_GAME_VERSION>3 then
        hbTmpText1=HealBot_WoWAPI_ItemInfo(19009) or "Healthstone"
        if not HealBot_Options_NoDuplcates[hbTmpText1] then
            table.insert(hbItemsByLevel,hbTmpText1)
            HealBot_Options_NoDuplcates[hbTmpText1]=true
        end
    else
        if hbLevel <= 20 then
            hbTmpText1=HealBot_WoWAPI_ItemInfo(19004) or "Minor Healthstone"
            table.insert(hbItemsByLevel,hbTmpText1)
            HealBot_Options_NoDuplcates[hbTmpText1]=true
        elseif hbLevel <= 30 then
            hbTmpText1=HealBot_WoWAPI_ItemInfo(19007) or "Lesser Healthstone"
            if not HealBot_Options_NoDuplcates[hbTmpText1] then
                table.insert(hbItemsByLevel,hbTmpText1)
                HealBot_Options_NoDuplcates[hbTmpText1]=true
            end
        elseif hbLevel <= 40 then
            hbTmpText1=HealBot_WoWAPI_ItemInfo(19009) or "Healthstone"
            if not HealBot_Options_NoDuplcates[hbTmpText1] then
                table.insert(hbItemsByLevel,hbTmpText1)
                HealBot_Options_NoDuplcates[hbTmpText1]=true
            end
        elseif hbLevel <= 50 then
            hbTmpText1=HealBot_WoWAPI_ItemInfo(19011) or "Greater Healthstone"
            if not HealBot_Options_NoDuplcates[hbTmpText1] then
                table.insert(hbItemsByLevel,hbTmpText1)
                HealBot_Options_NoDuplcates[hbTmpText1]=true
            end
        elseif hbLevel <= 60 then
            hbTmpText1=HealBot_WoWAPI_ItemInfo(9421) or "Major Healthstone"
            if not HealBot_Options_NoDuplcates[hbTmpText1] then
                table.insert(hbItemsByLevel,hbTmpText1)
                HealBot_Options_NoDuplcates[hbTmpText1]=true
            end
        elseif hbLevel <= 70 then
            hbTmpText1=HealBot_WoWAPI_ItemInfo(19008) or "Master Healthstone"
            if not HealBot_Options_NoDuplcates[hbTmpText1] then
                table.insert(hbItemsByLevel,hbTmpText1)
                HealBot_Options_NoDuplcates[hbTmpText1]=true
            end
        else
            hbTmpText1=HealBot_WoWAPI_ItemInfo(36892) or "Fel Healthstone"
            if not HealBot_Options_NoDuplcates[hbTmpText1] then
                table.insert(hbItemsByLevel,hbTmpText1)
                HealBot_Options_NoDuplcates[hbTmpText1]=true
            end
        end
    end
    return hbItemsByLevel
end

hb_lVars["ItemsComboID"]=0
hb_lVars["SkinsItemsComboID"]=0
local hbItemsIfExists={}
function HealBot_Options_ItemsInBag(cType)
      --HealBot_setCall("HealBot_Options_ItemsInBag")
    local HealBot_Options_SelectItemsCombo_List={}
    if cType == 2 then
        HealBot_Options_SelectItemsCombo_List={
            HEALBOT_WORDS_NONE,
        }
    else
        HealBot_Options_SelectItemsCombo_List=HealBot_Options_itemsByLevel()
        local ConsumableItems=HealBot_retConsumableItems()
        for _,iName in pairs(ConsumableItems) do
            table.insert(HealBot_Options_SelectItemsCombo_List, iName)
        end
    end
    return HealBot_Options_SelectItemsCombo_List
end

function HealBot_Options_SelectItemsCombo_DropDown()
      --HealBot_setCall("HealBot_Options_SelectItemsCombo_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local items=HealBot_Options_ItemsInBag(hb_lVars["ActionBarsCombo"])
    table.sort(items)
    for j=1, getn(items), 1 do
        local iName=items[j];
        info.text=iName
        info.func=function(self)
                        hb_lVars["hbHelpItemSelect"]=self:GetText()
                        hb_lVars["ItemsComboID"]=self:GetID()
                        UIDropDownMenu_SetText(HealBot_Options_SelectItemsCombo,iName)
                    end
        info.checked=false;
        if hb_lVars["ItemsComboID"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

--------------------------------------------------------------------------------

hb_lVars["CmdsComboID"]=0
hb_lVars["SkinsCmdsComboID"]=0
function HealBot_Options_SelectCmds_List(cType)
      --HealBot_setCall("HealBot_Options_SelectCmds_List")
    local HealBot_Options_SelectCmdsCombo_List={}
    if cType == 2 then
        HealBot_Options_SelectCmdsCombo_List={
                HEALBOT_DISABLED_TARGET,
                HEALBOT_WORD_FOCUS,
            }
    elseif cType == 4 then
        HealBot_Options_SelectCmdsCombo_List={
                HEALBOT_IGNOREAURAALL,
                HEALBOT_ICONRAISEPRIO1,
                HEALBOT_ICONRAISEPRIO3,
                HEALBOT_ICONLOWERPRIO1,
                HEALBOT_ICONLOWERPRIO3,
                HEALBOT_ICONBARCOLOURON,
                HEALBOT_ICONBARCOLOURCYCLE,
                HEALBOT_ICONBARCOLOUROFF,
                HEALBOT_ICONNEXTSET,
                HEALBOT_ICONPREVSET,
                HEALBOT_ICONGLOWON,
                HEALBOT_ICONGLOWCYCLE,
                HEALBOT_ICONGLOWOFF,
                HEALBOT_ICONRAISESCALE,
                HEALBOT_ICONRAISESCALE,
            }
    elseif HEALBOT_GAME_VERSION>3 then
        HealBot_Options_SelectCmdsCombo_List={
                HEALBOT_DISABLED_TARGET,
                HEALBOT_ASSIST,
                HEALBOT_WORD_FOCUS,
                HEALBOT_MENU,
                HEALBOT_HBMENU,
                HEALBOT_STOP,
                HEALBOT_MOUNTSPETS,
                HEALBOT_FAVMOUNT,
                HEALBOT_RANDOMMOUNT,
                HEALBOT_RANDOMGOUNDMOUNT,
                HEALBOT_FAVPET,
                HEALBOT_CANCELPLUGINALERT,
                HEALBOT_TARGETVEHICLE,
                HEALBOT_MOUSELOOK,
                HEALBOT_TOGGLE_MYTARGETS,
                HEALBOT_TOGGLE_PRIVTANKS,
                HEALBOT_TOGGLE_PRIVHEALS,
                HEALBOT_TOGGLE_PRIVDPS,
                HEALBOT_TOGGLE_PERMPRIVLISTS,
                HEALBOT_TOGGLE_PERMPRIVTANKS,
                HEALBOT_TOGGLE_PERMPRIVHEALS,
                HEALBOT_TOGGLE_PERMPRIVDPS,
            }
    else
        HealBot_Options_SelectCmdsCombo_List={
                HEALBOT_DISABLED_TARGET,
                HEALBOT_ASSIST,
                HEALBOT_WORD_FOCUS,
                HEALBOT_MENU,
                HEALBOT_HBMENU,
                HEALBOT_STOP,
                HEALBOT_CANCELPLUGINALERT,
                HEALBOT_MOUSELOOK,
                HEALBOT_TOGGLE_MYTARGETS,
                HEALBOT_TOGGLE_PRIVTANKS,
                HEALBOT_TOGGLE_PRIVHEALS,
                HEALBOT_TOGGLE_PRIVDPS,
                HEALBOT_TOGGLE_PERMPRIVLISTS,
                HEALBOT_TOGGLE_PERMPRIVTANKS,
                HEALBOT_TOGGLE_PERMPRIVHEALS,
                HEALBOT_TOGGLE_PERMPRIVDPS,
            }
    end
    return HealBot_Options_SelectCmdsCombo_List
end

function HealBot_Options_SelectCmdsCombo_DropDown()
      --HealBot_setCall("HealBot_Options_SelectCmdsCombo_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local cmdList=HealBot_Options_SelectCmds_List(hb_lVars["ActionBarsCombo"])
    for j=1, getn(cmdList), 1 do
        info.text=cmdList[j];
        info.func=function(self)
                        hb_lVars["hbHelpCmdsSelect"]=self:GetText()
                        hb_lVars["CmdsComboID"]=self:GetID()
                        UIDropDownMenu_SetText(HealBot_Options_SelectCmdsCombo,cmdList[hb_lVars["CmdsComboID"]])
                    end
        info.checked=false;
        if hb_lVars["CmdsComboID"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_RetEmote_List(lType)
      --HealBot_setCall("HealBot_Options_RetEmote_List")
    if lType == "CAT" then
        return HealBot_Options_EmoteCat_List
    elseif lType == "COMBAT" then
        return HealBot_Options_EmoteCombat_List
    elseif lType == "EMOTION" then
        return HealBot_Options_EmoteEmotion_List
    elseif lType == "HAPPY" then
        return HealBot_Options_EmoteHappy_List
    elseif lType == "GREET" then
        return HealBot_Options_EmoteGreet_List
    elseif lType == "OTHER" then
        return HealBot_Options_EmoteOther_List
    elseif lType == "RESPECT" then
        return HealBot_Options_EmoteRespect_List
    elseif lType == "UNHAPPY" then
        return HealBot_Options_EmoteUnhappy_List
    end
end

function HealBot_Options_SelectEmotesCombo_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_SelectEmotesCombo_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    if level == 1 then
        for j=1, getn(HealBot_Options_EmoteCat_List), 1 do
            info.text="    "..HealBot_Options_EmoteCat_List[j];
            info.hasArrow=true
            info.notCheckable=true
            info.menuList=HealBot_Options_EmoteCat_List[j], true, HealBot_Options_EmoteCat_List[j]
            UIDropDownMenu_AddButton(info)
        end
    elseif menuList == HEALBOT_EMOTE_CAT_COMBAT then
        for j=1, getn(HealBot_Options_EmoteCombat_List), 1 do
            info.text=HealBot_Options_EmoteCombat_List[j];
            info.func=function(self)
                        hb_lVars["hbHelpEmotesSelect"]=HEALBOT_EMOTE.."="..self:GetText()
                        UIDropDownMenu_SetText(HealBot_Options_SelectEmotesCombo, self:GetText())
                    end
            info.checked=false;
            UIDropDownMenu_AddButton(info, level);
        end
    elseif menuList == HEALBOT_EMOTE_CAT_EMOTION then
        for j=1, getn(HealBot_Options_EmoteEmotion_List), 1 do
            info.text=HealBot_Options_EmoteEmotion_List[j];
            info.func=function(self)
                        hb_lVars["hbHelpEmotesSelect"]=HEALBOT_EMOTE.."="..self:GetText()
                        UIDropDownMenu_SetText(HealBot_Options_SelectEmotesCombo, self:GetText())
                    end
            info.checked=false;
            UIDropDownMenu_AddButton(info, level);
        end
    elseif menuList == HEALBOT_EMOTE_CAT_HAPPY then
        for j=1, getn(HealBot_Options_EmoteHappy_List), 1 do
            info.text=HealBot_Options_EmoteHappy_List[j];
            info.func=function(self)
                        hb_lVars["hbHelpEmotesSelect"]=HEALBOT_EMOTE.."="..self:GetText()
                        UIDropDownMenu_SetText(HealBot_Options_SelectEmotesCombo, self:GetText())
                    end
            info.checked=false;
            UIDropDownMenu_AddButton(info, level);
        end
    elseif menuList == HEALBOT_EMOTE_CAT_GREET then
        for j=1, getn(HealBot_Options_EmoteGreet_List), 1 do
            info.text=HealBot_Options_EmoteGreet_List[j];
            info.func=function(self)
                        hb_lVars["hbHelpEmotesSelect"]=HEALBOT_EMOTE.."="..self:GetText()
                        UIDropDownMenu_SetText(HealBot_Options_SelectEmotesCombo, self:GetText())
                    end
            info.checked=false;
            UIDropDownMenu_AddButton(info, level);
        end
    elseif menuList == HEALBOT_EMOTE_CAT_OTHER then
        for j=1, getn(HealBot_Options_EmoteOther_List), 1 do
            info.text=HealBot_Options_EmoteOther_List[j];
            info.func=function(self)
                        hb_lVars["hbHelpEmotesSelect"]=HEALBOT_EMOTE.."="..self:GetText()
                        UIDropDownMenu_SetText(HealBot_Options_SelectEmotesCombo, self:GetText())
                    end
            info.checked=false;
            UIDropDownMenu_AddButton(info, level);
        end
    elseif menuList == HEALBOT_EMOTE_CAT_RESPECT then
        for j=1, getn(HealBot_Options_EmoteRespect_List), 1 do
            info.text=HealBot_Options_EmoteRespect_List[j];
            info.func=function(self)
                        hb_lVars["hbHelpEmotesSelect"]=HEALBOT_EMOTE.."="..self:GetText()
                        UIDropDownMenu_SetText(HealBot_Options_SelectEmotesCombo, self:GetText())
                    end
            info.checked=false;
            UIDropDownMenu_AddButton(info, level);
        end
    elseif menuList == HEALBOT_EMOTE_CAT_UNHAPPY then
        for j=1, getn(HealBot_Options_EmoteUnhappy_List), 1 do
            info.text=HealBot_Options_EmoteUnhappy_List[j];
            info.func=function(self)
                        hb_lVars["hbHelpEmotesSelect"]=HEALBOT_EMOTE.."="..self:GetText()
                        UIDropDownMenu_SetText(HealBot_Options_SelectEmotesCombo, self:GetText())
                    end
            info.checked=false;
            UIDropDownMenu_AddButton(info, level);
        end
    end
end

local hbIconHelpSelect={[1]=false,[2]=false,[3]=false,[4]=false,[5]=false}
function HealBot_Options_HideSelectIconCmdsCombo(dropdown, editbox, id)
      --HealBot_setCall("HealBot_Options_HideSelectIconCmdsCombo")
    dropdown:Hide()
    editbox:Show()
    hbIconHelpSelect[id]=false
    hb_lVars["hbIconHelpSelectID"]=0
end

function HealBot_Options_SelectIconCmdsCombo_DropDown(dropdown, object, id)
      --HealBot_setCall("HealBot_Options_SelectIconCmdsCombo_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local cmdList=HealBot_Options_SelectCmds_List(4)
    for j=1, getn(cmdList), 1 do
        info.text=cmdList[j];
        info.func=function(self)
                        object:SetText(self:GetText())
                        HealBot_Options_HideSelectIconCmdsCombo(dropdown, object, id)
                    end
        info.checked=false;
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_SelectIconCmds1Combo_DropDown()
      --HealBot_setCall("HealBot_Options_SelectIconCmds1Combo_DropDown")
    HealBot_Options_SelectIconCmdsCombo_DropDown(HealBot_Options_SelectIconCmds1Combo, HealBot_Options_Button1, 1)
end

function HealBot_Options_SelectIconCmds2Combo_DropDown()
      --HealBot_setCall("HealBot_Options_SelectIconCmds2Combo_DropDown")
    HealBot_Options_SelectIconCmdsCombo_DropDown(HealBot_Options_SelectIconCmds2Combo, HealBot_Options_Button2, 2)
end

function HealBot_Options_SelectIconCmds3Combo_DropDown()
      --HealBot_setCall("HealBot_Options_SelectIconCmds3Combo_DropDown")
    HealBot_Options_SelectIconCmdsCombo_DropDown(HealBot_Options_SelectIconCmds3Combo, HealBot_Options_Button3, 3)
end

function HealBot_Options_SelectIconCmds4Combo_DropDown()
      --HealBot_setCall("HealBot_Options_SelectIconCmds4Combo_DropDown")
    HealBot_Options_SelectIconCmdsCombo_DropDown(HealBot_Options_SelectIconCmds4Combo, HealBot_Options_Button4, 4)
end

function HealBot_Options_SelectIconCmds5Combo_DropDown()
      --HealBot_setCall("HealBot_Options_SelectIconCmds5Combo_DropDown")
    HealBot_Options_SelectIconCmdsCombo_DropDown(HealBot_Options_SelectIconCmds5Combo, HealBot_Options_Button5, 5)
end

--------------------------------------------------------------------------------

function HealBot_Options_ActionIconsSelect_OnClick(self, sType)
      --HealBot_setCall("HealBot_Options_ActionIconsSelect_OnClick")
    if sType~="Cancel" then
        local hbTmpText1=HEALBOT_TOOLTIP_NONE
        if sType == "Spell" then
            hbTmpText1=hb_lVars["hbHelpActionIconsSpell"] or ""
        elseif sType == "Macro" then
            hbTmpText1=hb_lVars["hbHelpActionIconsMacro"] or ""
        elseif sType == "Item" then
            hbTmpText1=hb_lVars["hbHelpActionIconsItem"] or ""
        end
        if hbTmpText1~=HEALBOT_TOOLTIP_NONE then
            HealBot_Options_ActionIconsConfigAbility:SetText(hbTmpText1)
        end
        HealBot_Options_FramesActionIconsSetLists()
    end
    HealBot_Options_SelectActionIconsFrame:Hide()
    hb_lVars["SelectActionIconsFrame"]=false
    HealBot_Options_SkinsFrameActionIconsConfig:Show()
end

function HealBot_Options_SpellsSelect_OnClick(self, sType)
      --HealBot_setCall("HealBot_Options_SpellsSelect_OnClick")
    if sType~="Cancel" then
        local hbTmpText1=HEALBOT_TOOLTIP_NONE
        if sType == "Spells" then
            hbTmpText1=hb_lVars["hbHelpSpellsSelect"] or ""
        elseif sType == "Macro" then
            hbTmpText1=hb_lVars["hbHelpMacroSelect"] or ""
        elseif sType == "Item" then
            hbTmpText1=hb_lVars["hbHelpItemSelect"] or ""
        elseif sType == "Cmd" then
            hbTmpText1=hb_lVars["hbHelpCmdsSelect"] or ""
        else
            hbTmpText1=hb_lVars["hbHelpEmotesSelect"] or ""
        end
        if hbTmpText1~=HEALBOT_TOOLTIP_NONE then
            if hb_lVars["HealBot_Options_sLoc"] == 1 then
                HealBot_Options_Button1:SetText(hbTmpText1)
            elseif hb_lVars["HealBot_Options_sLoc"] == 2 then
                HealBot_Options_Button2:SetText(hbTmpText1)
            elseif hb_lVars["HealBot_Options_sLoc"] == 3 then
                HealBot_Options_Button3:SetText(hbTmpText1)
            elseif hb_lVars["HealBot_Options_sLoc"] == 4 then
                HealBot_Options_Button4:SetText(hbTmpText1)
            elseif hb_lVars["HealBot_Options_sLoc"] == 5 then
                HealBot_Options_Button5:SetText(hbTmpText1)
            end
        end
    end
    HealBot_Options_SelectSpellsFrame:Hide()
    HealBot_Options_KeysFrame:Show()
end

function HealBot_Options_ShowSelectIconCmdsCombo(dropdown, editbox, id)
      --HealBot_setCall("HealBot_Options_ShowSelectIconCmdsCombo")
    editbox:Hide()
    dropdown:Show()
    hbIconHelpSelect[id]=true
    hb_lVars["hbIconHelpSelectID"]=id
end

local hbOptionText={[1]="",[2]="",[3]=""}
function HealBot_Options_HelpSpellsSelect_HideIconDropdown(sLoc)
      --HealBot_setCall("HealBot_Options_HelpSpellsSelect_HideIconDropdown")
    if sLoc == 1 then
        HealBot_Options_HideSelectIconCmdsCombo(HealBot_Options_SelectIconCmds1Combo, HealBot_Options_Button1, 1)
    elseif sLoc == 2 then
        HealBot_Options_HideSelectIconCmdsCombo(HealBot_Options_SelectIconCmds2Combo, HealBot_Options_Button2, 2)
    elseif sLoc == 3 then
        HealBot_Options_HideSelectIconCmdsCombo(HealBot_Options_SelectIconCmds3Combo, HealBot_Options_Button3, 3)
    elseif sLoc == 4 then
        HealBot_Options_HideSelectIconCmdsCombo(HealBot_Options_SelectIconCmds4Combo, HealBot_Options_Button4, 4)
    else
        HealBot_Options_HideSelectIconCmdsCombo(HealBot_Options_SelectIconCmds5Combo, HealBot_Options_Button5, 5)
    end
end

function HealBot_Options_HelpActionIconsSelect_OnClick(self)
      --HealBot_setCall("HealBot_Options_HelpActionIconsSelect_OnClick")
    HealBot_Options_SkinsFrameActionIconsConfig:Hide()
    HealBot_Options_SelectActionIconsFrame:Show()
    HealBot_Options_FramesActionIconsSetLists()
end

function HealBot_Options_HelpSpellsSelect_OnClick(self, sLoc)
      --HealBot_setCall("HealBot_Options_HelpSpellsSelect_OnClick")
    if hb_lVars["ActionBarsCombo"] == 4 then
        if hbIconHelpSelect[sLoc] then
            HealBot_Options_HelpSpellsSelect_HideIconDropdown(sLoc)
        else
            if sLoc == 1 then
                HealBot_Options_ShowSelectIconCmdsCombo(HealBot_Options_SelectIconCmds1Combo, HealBot_Options_Button1, 1)
            elseif sLoc == 2 then
                HealBot_Options_ShowSelectIconCmdsCombo(HealBot_Options_SelectIconCmds2Combo, HealBot_Options_Button2, 2)
            elseif sLoc == 3 then
                HealBot_Options_ShowSelectIconCmdsCombo(HealBot_Options_SelectIconCmds3Combo, HealBot_Options_Button3, 3)
            elseif sLoc == 4 then
                HealBot_Options_ShowSelectIconCmdsCombo(HealBot_Options_SelectIconCmds4Combo, HealBot_Options_Button4, 4)
            else
                HealBot_Options_ShowSelectIconCmdsCombo(HealBot_Options_SelectIconCmds5Combo, HealBot_Options_Button5, 5)
            end
        end
    else
        if hbIconHelpSelect[sLoc] then HealBot_Options_HelpSpellsSelect_HideIconDropdown(sLoc) end
        hb_lVars["HealBot_Options_sLoc"]=sLoc
        if hb_lVars["ActionBarsCombo"] == 1 then
            hbOptionText[1]=HEALBOT_OPTIONS_SETSPELLS..": "..HEALBOT_OPTIONS_ENABLEDBARS
        elseif hb_lVars["ActionBarsCombo"] == 2 then
            hbOptionText[1]=HEALBOT_OPTIONS_SETSPELLS..": "..HEALBOT_OPTIONS_ENEMYBARS
        else
            hbOptionText[1]=HEALBOT_OPTIONS_SETSPELLS..": "..HEALBOT_OPTIONS_EMERGBARS
        end
        HealBot_Options_SetLabel("HealBot_Options_SelectSpellsFrame_TextH1",hbOptionText[1])
        local hbTmpText1=HealBot_Options_ComboButton_ModifierKey(HealBot_Options_ComboButtons_Modifier)
        if sLoc == 1 then
            hbOptionText[2]=HEALBOT_OPTIONS_COMBOCLASS..":  "..hbTmpText1.." "..HEALBOT_OPTIONS_BUTTONLEFT.." "..HEALBOT_OPTIONS_CLICK
        elseif sLoc == 2 then
            hbOptionText[2]=HEALBOT_OPTIONS_COMBOCLASS..":  "..hbTmpText1.." "..HEALBOT_OPTIONS_BUTTONMIDDLE.." "..HEALBOT_OPTIONS_CLICK
        elseif sLoc == 3 then
            hbOptionText[2]=HEALBOT_OPTIONS_COMBOCLASS..":  "..hbTmpText1.." "..HEALBOT_OPTIONS_BUTTONRIGHT.." "..HEALBOT_OPTIONS_CLICK
        elseif sLoc == 4 then
            hbOptionText[2]=HEALBOT_OPTIONS_COMBOCLASS..":  "..hbTmpText1.." "..HEALBOT_OPTIONS_BUTTON4.." "..HEALBOT_OPTIONS_CLICK
        else
            hbOptionText[2]=HEALBOT_OPTIONS_COMBOCLASS..":  "..hbTmpText1.." "..HEALBOT_OPTIONS_BUTTON5.." "..HEALBOT_OPTIONS_CLICK
        end
        HealBot_Options_SetLabel("HealBot_Options_SelectSpellsFrame_TextH2",hbOptionText[2])
        HealBot_Options_KeysFrame:Hide()
        HealBot_Options_SelectSpellsFrame:Show()
        hb_lVars["SelectSpellsFrame"]=true
    end
end

function HealBot_Options_BuffExtraItems1_HelpItemSelect_OnClick()
      --HealBot_setCall("HealBot_Options_BuffExtraItems1_HelpItemSelect_OnClick")
    if HealBot_Options_BuffExtraItems1:IsVisible() then
        HealBot_Options_BuffExtraItems1:Hide()
        HealBot_Options_BuffExtraItem1:Show()
    else
        HealBot_Options_BuffExtraItem1:Hide()
        HealBot_Options_BuffExtraItems1:Show()
    end
end

function HealBot_Options_BuffExtraItems2_HelpItemSelect_OnClick()
      --HealBot_setCall("HealBot_Options_BuffExtraItems2_HelpItemSelect_OnClick")
    if HealBot_Options_BuffExtraItems2:IsVisible() then
        HealBot_Options_BuffExtraItems2:Hide()
        HealBot_Options_BuffExtraItem2:Show()
    else
        HealBot_Options_BuffExtraItem2:Hide()
        HealBot_Options_BuffExtraItems2:Show()
    end
end

function HealBot_Options_BuffExtraItems3_HelpItemSelect_OnClick()
      --HealBot_setCall("HealBot_Options_BuffExtraItems3_HelpItemSelect_OnClick")
    if HealBot_Options_BuffExtraItems3:IsVisible() then
        HealBot_Options_BuffExtraItems3:Hide()
        HealBot_Options_BuffExtraItem3:Show()
    else
        HealBot_Options_BuffExtraItem3:Hide()
        HealBot_Options_BuffExtraItems3:Show()
    end
end

function HealBot_Options_BuffExtraItems4_HelpItemSelect_OnClick()
      --HealBot_setCall("HealBot_Options_BuffExtraItems3_HelpItemSelect_OnClick")
    if HealBot_Options_BuffExtraItems4:IsVisible() then
        HealBot_Options_BuffExtraItems4:Hide()
        HealBot_Options_BuffExtraItem4:Show()
    else
        HealBot_Options_BuffExtraItem4:Hide()
        HealBot_Options_BuffExtraItems4:Show()
    end
end

function HealBot_Options_BuffManaDrinkItem_HelpItemSelect_OnClick()
      --HealBot_setCall("HealBot_Options_BuffManaDrinkItem_HelpItemSelect_OnClick")
    if HealBot_Options_BuffManaDrinkItems:IsVisible() then
        HealBot_Options_BuffManaDrinkItems:Hide()
        HealBot_Options_BuffManaDrinkItem:Show()
    else
        HealBot_Options_BuffManaDrinkItem:Hide()
        HealBot_Options_BuffManaDrinkItems:Show()
    end
end

function HealBot_Options_BuffBackupManaDrinkItem_HelpItemSelect_OnClick()
      --HealBot_setCall("HealBot_Options_BuffBackupManaDrinkItem_HelpItemSelect_OnClick")
    if HealBot_Options_BuffBackupManaDrinkItems:IsVisible() then
        HealBot_Options_BuffBackupManaDrinkItems:Hide()
        HealBot_Options_BuffBackupManaDrinkItem:Show()
    else
        HealBot_Options_BuffBackupManaDrinkItem:Hide()
        HealBot_Options_BuffBackupManaDrinkItems:Show()
    end
end

function HealBot_Options_ActionIconsAlertBuffHelp_OnClick()
      --HealBot_setCall("HealBot_Options_ActionIconsAlertBuffHelp_OnClick")
    if HealBot_Options_ActionIconsAlertBuffList:IsVisible() then
        HealBot_Options_ActionIconsAlertBuffListFilter:Hide()
        HealBot_Options_ActionIconsAlertBuffList:Hide()
        if hb_lVars["ActionIconsCondNo"] == 4 then
            HealBot_Options_ActionIconsSelfAlertBuffname:Show()
        else
            HealBot_Options_ActionIconsAlertBuffname:Show()
        end
    else
        if hb_lVars["ActionIconsCondNo"] == 4 then
            HealBot_Options_ActionIconsSelfAlertBuffname:Hide()
        else
            HealBot_Options_ActionIconsAlertBuffname:Hide()
        end
        if not hb_lVars["BuffListFilterInit"] then
            hb_lVars["BuffListFilterInit"]=true
            HealBot_Options_ActionIconsAlertBuffList.initialize=HealBot_Options_ActionIconsAlertBuffList_DropDown
        end
        HealBot_Options_ActionIconsAlertBuffListFilter:Show()
        HealBot_Options_ActionIconsAlertBuffList:Show()
    end
end

function HealBot_Options_ActionIconsAlertDebuffHelp_OnClick()
      --HealBot_setCall("HealBot_Options_ActionIconsAlertBuffHelp_OnClick")
    if HealBot_Options_ActionIconsAlertDebuffList:IsVisible() then
        HealBot_Options_ActionIconsAlertDebuffListFilter:Hide()
        HealBot_Options_ActionIconsAlertDebuffList:Hide()
        HealBot_Options_ActionIconsAlertDebuffname:Show()
    else
        HealBot_Options_ActionIconsAlertDebuffname:Hide()
        if not hb_lVars["DebuffListFilterInit"] then
            hb_lVars["DebuffListFilterInit"]=true
            HealBot_Options_ActionIconsAlertDebuffList.initialize=HealBot_Options_ActionIconsAlertDebuffList_DropDown
        end
        HealBot_Options_ActionIconsAlertDebuffListFilter:Show()
        HealBot_Options_ActionIconsAlertDebuffList:Show()
    end
end

function HealBot_Options_BuffWellFedItem_HelpItemSelect_OnClick()
      --HealBot_setCall("HealBot_Options_BuffWellFedItem_HelpItemSelect_OnClick")
    if HealBot_Options_BuffWellFedItems:IsVisible() then
        HealBot_Options_BuffWellFedItems:Hide()
        HealBot_Options_BuffWellFedItem:Show()
    else
        HealBot_Options_BuffWellFedItem:Hide()
        HealBot_Options_BuffWellFedItems:Show()
    end
end

function HealBot_Options_BuffBackupWellFedItem_HelpItemSelect_OnClick()
      --HealBot_setCall("HealBot_Options_BuffBackupWellFedItem_HelpItemSelect_OnClick")
    if HealBot_Options_BackupBuffWellFedItems:IsVisible() then
        HealBot_Options_BackupBuffWellFedItems:Hide()
        HealBot_Options_BuffBackupWellFedItem:Show()
    else
        HealBot_Options_BuffBackupWellFedItem:Hide()
        HealBot_Options_BackupBuffWellFedItems:Show()
    end
end

function HealBot_Options_SkinsHelpSpellsSelect_OnClick(self, sLoc)
      --HealBot_setCall("HealBot_Options_SkinsHelpSpellsSelect_OnClick")
    hb_lVars["HealBot_Options_SkinsLoc"]=sLoc
    local hbTmpText1=HealBot_Options_ComboButton_ModifierKey(HealBot_Options_ComboButtons_Modifier)
    if sLoc == 1 then
        hbOptionText[3]=HEALBOT_OPTIONS_COMBOCLASS..":  "..hbTmpText1.." "..HEALBOT_OPTIONS_BUTTONLEFT.." "..HEALBOT_OPTIONS_CLICK
    elseif sLoc == 2 then
        hbOptionText[3]=HEALBOT_OPTIONS_COMBOCLASS..":  "..hbTmpText1.." "..HEALBOT_OPTIONS_BUTTONMIDDLE.." "..HEALBOT_OPTIONS_CLICK
    elseif sLoc == 3 then
        hbOptionText[3]=HEALBOT_OPTIONS_COMBOCLASS..":  "..hbTmpText1.." "..HEALBOT_OPTIONS_BUTTONRIGHT.." "..HEALBOT_OPTIONS_CLICK
    elseif sLoc == 4 then
        hbOptionText[3]=HEALBOT_OPTIONS_COMBOCLASS..":  "..hbTmpText1.." "..HEALBOT_OPTIONS_BUTTON4.." "..HEALBOT_OPTIONS_CLICK
    else
        hbOptionText[3]=HEALBOT_OPTIONS_COMBOCLASS..":  "..hbTmpText1.." "..HEALBOT_OPTIONS_BUTTON5.." "..HEALBOT_OPTIONS_CLICK
    end
    HealBot_Options_SpellsSkinsFrame:Hide()
end

--------------------------------------------------------------------------------
function HealBot_Options_ActionAnchor_UpdateDropDown()
      --HealBot_setCall("HealBot_Options_ActionAnchor_UpdateDropDown")
    HealBot_Options_ActionAnchor.initialize=HealBot_Options_ActionAnchor_DropDown
    UIDropDownMenu_SetText(HealBot_Options_ActionAnchor, HealBot_Options_ActionAnchor_List[hbv_Skins_GetFrameVar("Anchors", "FRAME", hb_lVars["Frame"])])
end

function HealBot_Options_ActionAnchor_SetAlpha(frame)
      --HealBot_setCall("HealBot_Options_ActionAnchor_SetAlpha")
    if frame == hb_lVars["Frame"] then
        if HealBot_Action_hbStickyFrameGetCoords(frame) then
            HealBot_Options_ActionAnchor:SetAlpha(0.4)
        else
            HealBot_Options_ActionAnchor:SetAlpha(1)
        end
    end
end

function HealBot_Options_ActionAnchor_DropDown()
      --HealBot_setCall("HealBot_Options_ActionAnchor_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_ActionAnchor_List), 1 do
        info.text=HealBot_Options_ActionAnchor_List[j];
        info.func=function(self)
                        hbv_Skins_SetFrameVar(self:GetID(), "Anchors", "FRAME", hb_lVars["Frame"])
                        UIDropDownMenu_SetText(HealBot_Options_ActionAnchor,HealBot_Options_ActionAnchor_List[hbv_Skins_GetFrameVar("Anchors", "FRAME", hb_lVars["Frame"])])
                        --local g=_G["f"..hb_lVars["Frame"].."_HealBot_Action"]
                        HealBot_Action_setPoint(hb_lVars["Frame"], true)
                        --HealBot_Timers_Set("OOC","RefreshPartyNextRecalcAll")
                        HealBot_nextRecalcParty(0)
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Anchors", "FRAME", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_EmergBarAnchor_DropDown()
      --HealBot_setCall("HealBot_EmergBarAnchor_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_ActionAnchor_List), 1 do
        info.text=HealBot_Options_ActionAnchor_List[j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("Emerg", "ANCHOR", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "Emerg", "ANCHOR", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_EmergBarAnchor,HealBot_Options_ActionAnchor_List[hbv_Skins_GetFrameVar("Emerg", "ANCHOR", hb_lVars["Frame"])])
                            HealBot_Options_framesChanged(true)
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Emerg", "ANCHOR", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_ActionBarsAnchor_DropDown()
      --HealBot_setCall("HealBot_Options_ActionBarsAnchor_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, 4, 1 do
        info.text=HealBot_Options_ActionAnchor_List[j];
        info.func=function(self)
                        hbv_Skins_SetFrameVar(self:GetID(), "Anchors", "BARS", hb_lVars["Frame"])
                        UIDropDownMenu_SetText(HealBot_Options_ActionBarsAnchor,HealBot_Options_ActionAnchor_List[hbv_Skins_GetFrameVar("Anchors", "BARS", hb_lVars["Frame"])])
                        --local g=_G["f"..hb_lVars["Frame"].."_HealBot_Action"]
                        HealBot_Action_setPoint(hb_lVars["Frame"], true)
                        --HealBot_Timers_Set("OOC","RefreshPartyNextRecalcAll")
                        HealBot_nextRecalcParty(0)
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Anchors", "BARS", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_ActionLocked_DropDown()
      --HealBot_setCall("HealBot_Options_ActionLocked_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["Lock"]), 1 do
        info.text=HealBot_Options_Lists["Lock"][j];
        info.func=function(self)
                        hbv_Skins_SetFrameVar(self:GetID(), "Frame", "LOCKED", hb_lVars["Frame"])
                        UIDropDownMenu_SetText(HealBot_Options_ActionLocked,HealBot_Options_Lists["Lock"][hbv_Skins_GetFrameVar("Frame", "LOCKED", hb_lVars["Frame"])])
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Frame", "LOCKED", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_AutoShow_DropDown()
      --HealBot_setCall("HealBot_Options_AutoShow_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AutoShow"]), 1 do
        info.text=HealBot_Options_Lists["AutoShow"][j];
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("Frame", "AUTOCLOSE", hb_lVars["Frame"]) ~= self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "Frame", "AUTOCLOSE", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_AutoShow,HealBot_Options_Lists["AutoShow"][hbv_Skins_GetFrameVar("Frame", "AUTOCLOSE", hb_lVars["Frame"])])
                            HealBot_Timers_Set("LAST","SetAutoClose")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Frame", "AUTOCLOSE", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_ActionIconsGlowSize_DropDown()
      --HealBot_setCall("HealBot_Options_ActionIconsGlowSize_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["GlowFrame"]), 1 do
        info.text=HealBot_Options_Lists["GlowFrame"][j];
        info.func=function(self)
                        if hbv_ActionIcons_GetVars("GLOWSIZE", hb_lVars["Frame"]) ~= self:GetID() then
                            hbv_ActionIcons_SetVars(self:GetID(), "GLOWSIZE", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_ActionIconsGlowSize,HealBot_Options_Lists["GlowFrame"][hbv_ActionIcons_GetVars("GLOWSIZE", hb_lVars["Frame"])])
                            HealBot_ActionIcons_SetGlowSizeFrame(hb_lVars["Frame"])
                        end
                    end
        info.checked=false;
        if hbv_ActionIcons_GetVars("GLOWSIZE", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_ActionIconsLock_DropDown()
      --HealBot_setCall("HealBot_Options_ActionIconsLock_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["Lock"]), 1 do
        info.text=HealBot_Options_Lists["Lock"][j];
        info.func=function(self)
                        if hbv_ActionIcons_GetVars("LOCK", hb_lVars["Frame"]) ~= self:GetID() then
                            hbv_ActionIcons_SetVars(self:GetID(), "LOCK", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_ActionIconsLock,HealBot_Options_Lists["Lock"][hbv_ActionIcons_GetVars("LOCK", hb_lVars["Frame"])])
                            HealBot_Timers_Set("OOC","SaveActionIconsProfile",true)
                        end
                    end
        info.checked=false;
        if hbv_ActionIcons_GetVars("LOCK", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BarsGrowDirection_DropDown()
      --HealBot_setCall("HealBot_Options_BarsGrowDirection_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, 2, 1 do
        info.text=HealBot_Options_BarsGrowDirection_List[j];
        info.func=function(self)
                        hbv_Skins_SetFrameVar(self:GetID(), "Anchors", "GROW", hb_lVars["Frame"])
                        UIDropDownMenu_SetText(HealBot_Options_BarsGrowDirection,HealBot_Options_BarsGrowDirection_List[hbv_Skins_GetFrameVar("Anchors", "GROW", hb_lVars["Frame"])])
                        HealBot_Options_framesChanged(true)
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Anchors", "GROW", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BarsOrientation_DropDown()
      --HealBot_setCall("HealBot_Options_BarsOrientation_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, 2, 1 do
        info.text=HealBot_Options_BarsOrientation_List[j];
        info.func=function(self)
                        hbv_Skins_SetFrameVar(self:GetID(), "HealBar", "OFIX", hb_lVars["Frame"])
                        UIDropDownMenu_SetText(HealBot_Options_BarsOrientation,HealBot_Options_BarsOrientation_List[hbv_Skins_GetFrameVar("HealBar", "OFIX", hb_lVars["Frame"])])
                        HealBot_Options_framesChanged(true)
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("HealBar", "OFIX", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

--------------------------------------------------------------------------------

function HealBot_Options_FramesSelFrame_DropDown()
      --HealBot_setCall("HealBot_Options_FramesSelFrame_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1,10, 1 do
        info.text=HealBot_Options_HealGroupsFrame_List[j];
        info.func=function(self)
                        if hb_lVars["Frame"]~=self:GetID() then
                            hb_lVars["Frame"]=self:GetID()
                            if HEALBOT_GAME_VERSION<3 then
                                if hb_lVars["Frame"] == 6 then hb_lVars["Frame"]=7 end
                                if HEALBOT_GAME_VERSION<2 then
                                    if hb_lVars["Frame"] == 9 then hb_lVars["Frame"]=10 end
                                end
                            end
                            UIDropDownMenu_SetText(HealBot_Options_FramesSelFrame,HealBot_Options_HealGroupsFrame_List[hb_lVars["Frame"]])
                            HealBot_Options_SetSkins(true)
                            if hb_lVars["Frame"]>5 then
                                g=_G["HealBot_Options_FrameAlias"]
                                g:Hide()
                                g=_G["HealBot_Options_FrameAliasFixedFrame"]
                                g:SetText(HealBot_Options_HealGroupsFrame_List[hb_lVars["Frame"]])
                                g:Show()
                            else
                                g=_G["HealBot_Options_FrameAliasFixedFrame"]
                                g:Hide()
                                HealBot_Options_SetText(HealBot_Options_FrameAlias,HEALBOT_OPTIONS_FRAME_ALIAS)
                                g=_G["HealBot_Options_FrameAlias"]
                                g:Show()
                            end
                            if hb_lVars["Frame"]>1 then
                                HealBot_Options_ObjectsEnableDisable("HealBot_FrameStickyOffsetHorizontal",true)
                                HealBot_Options_ObjectsEnableDisable("HealBot_FrameStickyOffsetVertical",true)
                            else
                                HealBot_Options_ObjectsEnableDisable("HealBot_FrameStickyOffsetHorizontal",false)
                                HealBot_Options_ObjectsEnableDisable("HealBot_FrameStickyOffsetVertical",false)
                            end
                            HealBot_Options_DoEffects_DropDowns()
                            if hb_lVars["Frame"]>5 then
                                HealBot_Options_ObjectsEnableDisable("HealBot_Options_SubSortPlayerFirst",false)
                                if hb_lVars["Frame"] == 7 then
                                    HealBot_Options_ObjectsEnableDisable("HealBot_Options_GroupPetsByFive",true)
                                    HealBot_Options_ObjectsEnableDisable("HealBot_Options_SelfPet",true)
                                else
                                    HealBot_Options_ObjectsEnableDisable("HealBot_Options_GroupPetsByFive",false)
                                    HealBot_Options_ObjectsEnableDisable("HealBot_Options_SelfPet",false)
                                end
                            else
                                HealBot_Options_ObjectsEnableDisable("HealBot_Options_SubSortPlayerFirst",true)
                                HealBot_Options_ObjectsEnableDisable("HealBot_Options_GroupPetsByFive",false)
                                HealBot_Options_ObjectsEnableDisable("HealBot_Options_SelfPet",false)
                            end
                            HealBot_Timers_InitExtraOptions()
                        end
                    end
        info.checked=false;
        if hb_lVars["Frame"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

local hbCopyFrameIdx={}
function HealBot_Options_CopyTab2Frames(frame, tab)
      --HealBot_setCall("HealBot_Options_CopyTab2Frames")
    local s=Healbot_Config_Skins.Current_Skin
    local f=hb_lVars["Frame"]

    if tab == 1 then
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Frame", "SCALE", f), "Frame", "SCALE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Frame", "LOCKED", f), "Frame", "LOCKED", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Frame", "AUTOCLOSE", f), "Frame", "AUTOCLOSE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Frame", "TIPLOC", f), "Frame", "TIPLOC", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Frame", "PADDING", f), "Frame", "PADDING", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Frame", "BACKR", f), "Frame", "BACKR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Frame", "BACKG", f), "Frame", "BACKG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Frame", "BACKB", f), "Frame", "BACKB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Frame", "BACKA", f), "Frame", "BACKA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Frame", "BORDERR", f), "Frame", "BORDERR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Frame", "BORDERG", f), "Frame", "BORDERG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Frame", "BORDERB", f), "Frame", "BORDERB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Frame", "BORDERA", f), "Frame", "BORDERA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Anchors", "GROW", f), "Anchors", "GROW", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Anchors", "FRAME", f), "Anchors", "FRAME", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Anchors", "BARS", f), "Anchors", "BARS", frame)
    elseif tab == 2 then
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HeadBar", "TEXTURE", f), "HeadBar", "TEXTURE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HeadBar", "WIDTH", f), "HeadBar", "WIDTH", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HeadBar", "HEIGHT", f), "HeadBar", "HEIGHT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("HeadBar", "SHOW", f), "HeadBar", "SHOW", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HeadBar", "R", f), "HeadBar", "R", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HeadBar", "G", f), "HeadBar", "G", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HeadBar", "B", f), "HeadBar", "B", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HeadBar", "A", f), "HeadBar", "A", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HeadText", "FONT", f), "HeadText", "FONT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HeadText", "HEIGHT", f), "HeadText", "HEIGHT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HeadText", "OUTLINE", f), "HeadText", "OUTLINE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HeadText", "R", f), "HeadText", "R", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HeadText", "G", f), "HeadText", "G", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HeadText", "B", f), "HeadText", "B", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HeadText", "A", f), "HeadText", "A", frame)
    elseif tab == 3 then
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("FrameAlias", "SHOW", f), "FrameAlias", "SHOW", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("FrameAlias", "SIZE", f), "FrameAlias", "SIZE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("FrameAlias", "OFFSET", f), "FrameAlias", "OFFSET", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("FrameAlias", "FONT", f), "FrameAlias", "FONT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("FrameAlias", "OUTLINE", f), "FrameAlias", "OUTLINE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("FrameAlias", "R", f), "FrameAlias", "R", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("FrameAlias", "G", f), "FrameAlias", "G", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("FrameAlias", "B", f), "FrameAlias", "B", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("FrameAlias", "A", f), "FrameAlias", "A", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("FrameAliasBar", "TEXTURE", f), "FrameAliasBar", "TEXTURE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("FrameAliasBar", "WIDTH", f), "FrameAliasBar", "WIDTH", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("FrameAliasBar", "HEIGHT", f), "FrameAliasBar", "HEIGHT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("FrameAliasBar", "OFFSET", f), "FrameAliasBar", "OFFSET", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("FrameAliasBar", "R", f), "FrameAliasBar", "R", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("FrameAliasBar", "G", f), "FrameAliasBar", "G", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("FrameAliasBar", "B", f), "FrameAliasBar", "B", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("FrameAliasBar", "A", f), "FrameAliasBar", "A", frame)
    elseif tab == 4 then
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("HealBar", "GRPCOLS", f), "HealBar", "GRPCOLS", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HealBar", "CMARGIN", f), "HealBar", "CMARGIN", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HealBar", "TEXTURE", f), "HealBar", "TEXTURE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HealBar", "HEIGHT", f), "HealBar", "HEIGHT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HealBar", "WIDTH", f), "HealBar", "WIDTH", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HealBar", "NUMCOLS", f), "HealBar", "NUMCOLS", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HealBar", "RMARGIN", f), "HealBar", "RMARGIN", frame)
    elseif tab == 5 then
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "DISA", f), "BarCol", "DISA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "ORA", f), "BarCol", "ORA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HR", f), "BarCol", "HR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HG", f), "BarCol", "HG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HB", f), "BarCol", "HB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HRE", f), "BarCol", "HRE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HGE", f), "BarCol", "HGE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HBE", f), "BarCol", "HBE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HA", f), "BarCol", "HA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HIR", f), "BarCol", "HIR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HIG", f), "BarCol", "HIG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HIB", f), "BarCol", "HIB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HIRE", f), "BarCol", "HIRE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HIGE", f), "BarCol", "HIGE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HIBE", f), "BarCol", "HIBE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HCR", f), "BarCol", "HCR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HCG", f), "BarCol", "HCG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HCB", f), "BarCol", "HCB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HCRE", f), "BarCol", "HCRE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HCGE", f), "BarCol", "HCGE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HCBE", f), "BarCol", "HCBE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HIT", f), "BarCol", "HIT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HCT", f), "BarCol", "HCT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarIACol", "OSHIELD", f), "BarIACol", "OSHIELD", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "IR", f), "BarIACol", "IR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "IG", f), "BarIACol", "IG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "IB", f), "BarIACol", "IB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "IRE", f), "BarIACol", "IRE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "IGE", f), "BarIACol", "IGE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "IBE", f), "BarIACol", "IBE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "IIR", f), "BarIACol", "IIR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "IIG", f), "BarIACol", "IIG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "IIB", f), "BarIACol", "IIB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "IIRE", f), "BarIACol", "IIRE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "IIGE", f), "BarIACol", "IIGE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "IIBE", f), "BarIACol", "IIBE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "ICR", f), "BarIACol", "ICR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "ICG", f), "BarIACol", "ICG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "ICB", f), "BarIACol", "ICB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "ICRE", f), "BarIACol", "ICRE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "ICGE", f), "BarIACol", "ICGE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "ICBE", f), "BarIACol", "ICBE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "IIT", f), "BarIACol", "IIT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "ICT", f), "BarIACol", "ICT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "IA", f), "BarIACol", "IA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "AR", f), "BarIACol", "AR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "AG", f), "BarIACol", "AG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "AB", f), "BarIACol", "AB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "ARE", f), "BarIACol", "ARE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "AGE", f), "BarIACol", "AGE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "ABE", f), "BarIACol", "ABE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "AIR", f), "BarIACol", "AIR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "AIG", f), "BarIACol", "AIG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "AIB", f), "BarIACol", "AIB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "AIRE", f), "BarIACol", "AIRE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "AIGE", f), "BarIACol", "AIGE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "AIBE", f), "BarIACol", "AIBE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "ACR", f), "BarIACol", "ACR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "ACG", f), "BarIACol", "ACG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "ACB", f), "BarIACol", "ACB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "ACRE", f), "BarIACol", "ACRE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "ACGE", f), "BarIACol", "ACGE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "ACBE", f), "BarIACol", "ACBE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "AIT", f), "BarIACol", "AIT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "ACT", f), "BarIACol", "ACT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "AA", f), "BarIACol", "AA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "IC", f), "BarIACol", "IC", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "AC", f), "BarIACol", "AC", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BR", f), "BarCol", "BR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BG", f), "BarCol", "BG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BB", f), "BarCol", "BB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BRE", f), "BarCol", "BRE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BGE", f), "BarCol", "BGE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BBE", f), "BarCol", "BBE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BA", f), "BarCol", "BA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BIR", f), "BarCol", "BIR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BIG", f), "BarCol", "BIG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BIB", f), "BarCol", "BIB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BIRE", f), "BarCol", "BIRE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BIGE", f), "BarCol", "BIGE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BIBE", f), "BarCol", "BIBE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BCR", f), "BarCol", "BCR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BCG", f), "BarCol", "BCG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BCB", f), "BarCol", "BCB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BCRE", f), "BarCol", "BCRE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BCGE", f), "BarCol", "BCGE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BCBE", f), "BarCol", "BCBE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BIT", f), "BarCol", "BIT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BCT", f), "BarCol", "BCT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BOUT", f), "BarCol", "BOUT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HLTH", f), "BarCol", "HLTH", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BACK", f), "BarCol", "BACK", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORDER", f), "BarCol", "BORDER", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORR", f), "BarCol", "BORR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORG", f), "BarCol", "BORG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORB", f), "BarCol", "BORB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORRE", f), "BarCol", "BORRE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORGE", f), "BarCol", "BORGE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORBE", f), "BarCol", "BORBE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORIR", f), "BarCol", "BORIR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORIG", f), "BarCol", "BORIG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORIB", f), "BarCol", "BORIB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORIRE", f), "BarCol", "BORIRE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORIGE", f), "BarCol", "BORIGE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORIBE", f), "BarCol", "BORIBE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORCR", f), "BarCol", "BORCR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORCG", f), "BarCol", "BORCG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORCB", f), "BarCol", "BORCB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORCRE", f), "BarCol", "BORCRE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORCGE", f), "BarCol", "BORCGE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORCBE", f), "BarCol", "BORCBE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORA", f), "BarCol", "BORA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORSIZE", f), "BarCol", "BORSIZE", frame)
        HealBot_Panel_resetTestCols(true)
    elseif tab == 6 then
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarSort", "RAIDORDER", f), "BarSort", "RAIDORDER", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarSort", "SUBORDER", f), "BarSort", "SUBORDER", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarSort", "OORLAST", f), "BarSort", "OORLAST", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarSort", "SUBPF", f), "BarSort", "SUBPF", frame)
    elseif tab == 7 then
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarVisibility", "ALERTIC", f), "BarVisibility", "ALERTIC", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarVisibility", "ALERTOC", f), "BarVisibility", "ALERTOC", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarVisibility", "HIDEOOR", f), "BarVisibility", "HIDEOOR", frame)
    elseif tab == 9 then
        hbv_Aux_SetOverlayVar(hbv_Aux_GetOverlayVar("OVERLAP", f), "OVERLAP", frame)
        hbv_Aux_SetOverlayVar(hbv_Aux_GetOverlayBoolean("OVERLAYRECENTHEALS", f), "OVERLAYRECENTHEALS", frame)
        hbv_Aux_SetOverlayVar(hbv_Aux_GetOverlayBoolean("OVERLAYHEALTHDROP", f), "OVERLAYHEALTHDROP", frame)
        hbv_Aux_SetOverlayVar(hbv_Aux_GetOverlayBoolean("OVERLAYAGGRO", f), "OVERLAYAGGRO", frame)
        hbv_Aux_SetOverlayVar(hbv_Aux_GetOverlayBoolean("OVERLAYDEBUFF", f), "OVERLAYDEBUFF", frame)
        hbv_Aux_SetOverlayVar(hbv_Aux_GetOverlayBoolean("OVERLAYHIGHLIGHT", f), "OVERLAYHIGHLIGHT", frame)
        hbv_Aux_SetOverlayVar(hbv_Aux_GetOverlayBoolean("OVERLAYTARGET", f), "OVERLAYTARGET", frame)
        hbv_Aux_SetOverlayVar(hbv_Aux_GetOverlayBoolean("OVERLAYOOR", f), "OVERLAYOOR", frame)
        hbv_Aux_SetOverlayVar(hbv_Aux_GetOverlayBoolean("OVERLAYBUFF", f), "OVERLAYBUFF", frame)
        for x=1,9 do
            hbv_Data_AuxSetBarVar(hbv_Aux_GetBarVar("COLOUR", f, x), "COLOUR", frame, x)
            hbv_Data_AuxSetBarVar(hbv_Aux_GetBarVar("ANCHOR", f, x), "ANCHOR", frame, x)
            hbv_Data_AuxSetBarVar(hbv_Aux_GetBarVar("OFFSET", f, x), "OFFSET", frame, x)
            hbv_Data_AuxSetBarVar(hbv_Aux_GetBarVar("DEPTH", f, x), "DEPTH", frame, x)
            hbv_Data_AuxSetBarVar(hbv_Aux_GetBarVar("SIZE", f, x), "SIZE", frame, x)
            local n=hbv_Aux_GetBarVar("USE", f, x)
            local t=HealBot_Share_SkinEncodeAux(n, f)
            n=HealBot_Share_SkinDecodeAux(t, frame)
            hbv_Data_AuxSetBarVar(n, "USE", frame, x)
            hbv_Data_AuxSetBarVar(hbv_Aux_GetBarVar("OTYPE", f, x), "OTYPE", frame, x)
            hbv_Data_AuxSetBarVar(hbv_Aux_GetBarVar("R", f, x), "R", frame, x)
            hbv_Data_AuxSetBarVar(hbv_Aux_GetBarVar("G", f, x), "G", frame, x)
            hbv_Data_AuxSetBarVar(hbv_Aux_GetBarVar("B", f, x), "B", frame, x)
            hbv_Data_AuxSetBarVar(hbv_Aux_GetBarVar("A", f, x), "A", frame, x)
            hbv_Data_AuxSetBarVar(hbv_Aux_GetBarVar("OUTLINE", f, x), "OUTLINE", frame, x)
            HealBot_Action_InitAuxGlow(x, frame)
        end
        HealBot_Timers_Set("AUX","ResetBars")
    elseif tab == 23 then
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SCR", f), "BarTextCol", "SCR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SCG", f), "BarTextCol", "SCG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SCB", f), "BarTextCol", "SCB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SCA", f), "BarTextCol", "SCA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SICR", f), "BarTextCol", "SICR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SICG", f), "BarTextCol", "SICG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SICB", f), "BarTextCol", "SICB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SCCR", f), "BarTextCol", "SCCR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SCCG", f), "BarTextCol", "SCCG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SCCB", f), "BarTextCol", "SCCB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SIT", f), "BarTextCol", "SIT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SCT", f), "BarTextCol", "SCT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SCDA", f), "BarTextCol", "SCDA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SCOA", f), "BarTextCol", "SCOA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SDCR", f), "BarTextCol", "SDCR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SDCG", f), "BarTextCol", "SDCG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SDCB", f), "BarTextCol", "SDCB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SRCR", f), "BarTextCol", "SRCR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SRCG", f), "BarTextCol", "SRCG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SRCB", f), "BarTextCol", "SRCB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SSCR", f), "BarTextCol", "SSCR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SSCG", f), "BarTextCol", "SSCG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SSCB", f), "BarTextCol", "SSCB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarTextCol", "SRIP", f), "BarTextCol", "SRIP", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarTextCol", "SRES", f), "BarTextCol", "SRES", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarTextCol", "SSUM", f), "BarTextCol", "SSUM", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "STATE", f), "BarTextCol", "STATE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarText", "TAGSTATEONLYTIP", f), "BarText", "TAGSTATEONLYTIP", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "TAGDC", f), "BarText", "TAGDC", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "TAGRIP", f), "BarText", "TAGRIP", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "TAGRES", f), "BarText", "TAGRES", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "TAGSUM", f), "BarText", "TAGSUM", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "TAGOOR", f), "BarText", "TAGOOR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "TAGR", f), "BarText", "TAGR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "STATETXTANCHOR", f), "BarText", "STATETXTANCHOR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "SFONT", f), "BarText", "SFONT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "SHEIGHT", f), "BarText", "SHEIGHT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "SOUTLINE", f), "BarText", "SOUTLINE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "SOFFSET", f), "BarText", "SOFFSET", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "SOFFSET2", f), "BarText", "SOFFSET2", frame)
        HealBot_Panel_resetTestCols(true)
    elseif tab == 10 then
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "NCR", f), "BarTextCol", "NCR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "NCG", f), "BarTextCol", "NCG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "NCB", f), "BarTextCol", "NCB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "NCA", f), "BarTextCol", "NCA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "NICR", f), "BarTextCol", "NICR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "NICG", f), "BarTextCol", "NICG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "NICB", f), "BarTextCol", "NICB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "NCCR", f), "BarTextCol", "NCCR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "NCCG", f), "BarTextCol", "NCCG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "NCCB", f), "BarTextCol", "NCCB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "NIT", f), "BarTextCol", "NIT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "NCT", f), "BarTextCol", "NCT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarTextCol", "RIP", f), "BarTextCol", "RIP", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarTextCol", "RES", f), "BarTextCol", "RES", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarTextCol", "SUM", f), "BarTextCol", "SUM", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "NCDA", f), "BarTextCol", "NCDA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "NCOA", f), "BarTextCol", "NCOA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "NAME", f), "BarTextCol", "NAME", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarTextCol", "NDEBUFF", f), "BarTextCol", "NDEBUFF", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarText", "NAMEONBAR", f), "BarText", "NAMEONBAR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarText", "CLASSONBAR", f), "BarText", "CLASSONBAR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarText", "SHOWROLE", f), "BarText", "SHOWROLE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "FONT", f), "BarText", "FONT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "HEIGHT", f), "BarText", "HEIGHT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "ALIGN", f), "BarText", "ALIGN", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "OUTLINE", f), "BarText", "OUTLINE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "MAXCHARS", f), "BarText", "MAXCHARS", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "OFFSET", f), "BarText", "OFFSET", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "OFFSET2", f), "BarText", "OFFSET2", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "ROLETANK", f), "BarText", "ROLETANK", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "ROLEHEAL", f), "BarText", "ROLEHEAL", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "ROLEDPS", f), "BarText", "ROLEDPS", frame)
        HealBot_Panel_resetTestCols(true)
    elseif tab == 11 then
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HCR", f), "BarTextCol", "HCR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HCG", f), "BarTextCol", "HCG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HCB", f), "BarTextCol", "HCB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HECR", f), "BarTextCol", "HECR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HECG", f), "BarTextCol", "HECG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HECB", f), "BarTextCol", "HECB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HICR", f), "BarTextCol", "HICR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HICG", f), "BarTextCol", "HICG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HICB", f), "BarTextCol", "HICB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HCCR", f), "BarTextCol", "HCCR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HCCG", f), "BarTextCol", "HCCG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HCCB", f), "BarTextCol", "HCCB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HIT", f), "BarTextCol", "HIT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HCT", f), "BarTextCol", "HCT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HCA", f), "BarTextCol", "HCA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "OCR", f), "BarTextCol", "OCR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "OCG", f), "BarTextCol", "OCG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "OCB", f), "BarTextCol", "OCB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "ICR", f), "BarTextCol", "ICR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "ICG", f), "BarTextCol", "ICG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "ICB", f), "BarTextCol", "ICB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HCDA", f), "BarTextCol", "HCDA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HCOA", f), "BarTextCol", "HCOA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HLTH", f), "BarTextCol", "HLTH", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarTextCol", "HDEBUFF", f), "BarTextCol", "HDEBUFF", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarText", "HLTHONBAR", f), "BarText", "HLTHONBAR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarText", "IGNOREONFULL", f), "BarText", "IGNOREONFULL", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "INCHEALS", f), "BarText", "INCHEALS", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "INCABSORBS", f), "BarText", "INCABSORBS", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "OVERHEAL", f), "BarText", "OVERHEAL", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "HLTHTXTANCHOR", f), "BarText", "HLTHTXTANCHOR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "NUMFORMAT1", f), "BarText", "NUMFORMAT1", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "NUMFORMAT2", f), "BarText", "NUMFORMAT2", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "HLTHTYPE", f), "BarText", "HLTHTYPE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "HFONT", f), "BarText", "HFONT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "HHEIGHT", f), "BarText", "HHEIGHT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "HOFFSET2", f), "BarText", "HOFFSET2", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "HOUTLINE", f), "BarText", "HOUTLINE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "HMAXCHARS", f), "BarText", "HMAXCHARS", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "HOFFSET", f), "BarText", "HOFFSET", frame)
        HealBot_Panel_resetTestCols(true)
    elseif tab == 12 then
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "ACR", f), "BarTextCol", "ACR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "ACG", f), "BarTextCol", "ACG", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "ACB", f), "BarTextCol", "ACB", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "ACA", f), "BarTextCol", "ACA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "AIT", f), "BarTextCol", "AIT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "ACT", f), "BarTextCol", "ACT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "ACDA", f), "BarTextCol", "ACDA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "ACOA", f), "BarTextCol", "ACOA", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "AGGRO", f), "BarTextCol", "AGGRO", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarAggro", "TEXTFORMAT", f), "BarAggro", "TEXTFORMAT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarText", "TAGAGGROONLYTIP", f), "BarText", "TAGAGGROONLYTIP", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "AGGROTXTANCHOR", f), "BarText", "AGGROTXTANCHOR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "AFONT", f), "BarText", "AFONT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "AHEIGHT", f), "BarText", "AHEIGHT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "AOUTLINE", f), "BarText", "AOUTLINE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "AOFFSET", f), "BarText", "AOFFSET", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarText", "AOFFSET2", f), "BarText", "AOFFSET2", frame)
        HealBot_Panel_resetTestCols(true)
    elseif tab == 13 then
        for x=1,9 do
            hbv_Data_AuxSetBarVar(hbv_Aux_GetBarBoolean("TEXT", f, x), "TEXT", frame, x)
            hbv_Aux_SetBarTextVar(hbv_Aux_GetBarTextVar("FONT", f, x), "FONT", frame, x)
            hbv_Aux_SetBarTextVar(hbv_Aux_GetBarTextVar("HEIGHT", f, x), "HEIGHT", frame, x)
            hbv_Aux_SetBarTextVar(hbv_Aux_GetBarTextVar("ALIGN", f, x), "ALIGN", frame, x)
            hbv_Aux_SetBarTextVar(hbv_Aux_GetBarTextVar("OUTLINE", f, x), "OUTLINE", frame, x)
            hbv_Aux_SetBarTextVar(hbv_Aux_GetBarTextVar("MAXCHARS", f, x), "MAXCHARS", frame, x)
            hbv_Aux_SetBarTextVar(hbv_Aux_GetBarTextVar("OFFSET", f, x), "OFFSET", frame, x)
            hbv_Aux_SetBarTextVar(hbv_Aux_GetBarTextVar("COLTYPE", f, x), "COLTYPE", frame, x)
            hbv_Aux_SetBarTextVar(hbv_Aux_GetBarTextVar("COLR", f, x), "COLR", frame, x)
            hbv_Aux_SetBarTextVar(hbv_Aux_GetBarTextVar("COLG", f, x), "COLG", frame, x)
            hbv_Aux_SetBarTextVar(hbv_Aux_GetBarTextVar("COLB", f, x), "COLB", frame, x)
            hbv_Aux_SetBarTextVar(hbv_Aux_GetBarTextVar("COLA", f, x), "COLA", frame, x)
            hbv_Aux_SetBarTextVar(hbv_Aux_GetBarTextVar("COLDA", f, x), "COLDA", frame, x)
            hbv_Aux_SetBarTextVar(hbv_Aux_GetBarTextVar("COLOA", f, x), "COLOA", frame, x)
        end
    elseif tab == 14 then
        for z=1,3 do
            hbv_Skins_SetIconVar(hbv_Skins_GetIconBoolean("DEBUFFDOUBLE", f, z), "DEBUFFDOUBLE", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconBoolean("DI15EN", f, z), "DI15EN", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconBoolean("DFADE", f, z), "DFADE", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("DSCALE", f, z), "DSCALE", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("DEBUFFONBAR", f, z), "DEBUFFONBAR", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("DEBUFFANCHOR", f, z), "DEBUFFANCHOR", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("DFADESECS", f, z), "DFADESECS", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("DZOOM", f, z), "DZOOM", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("MAXDICONS", f, z), "MAXDICONS", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("DICONSPACER", f, z), "DICONSPACER", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("DVOFFSET", f, z), "DVOFFSET", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("DHOFFSET", f, z), "DHOFFSET", frame, z)
            hbv_Skins_SetIconTextVar(hbv_Skins_GetIconTextBoolean("DBSCNT", f, z), "DBSCNT", frame, z)
            hbv_Skins_SetIconTextVar(hbv_Skins_GetIconTextBoolean("DBSDUR", f, z), "DBSDUR", frame, z)
            hbv_Skins_SetIconTextVar(hbv_Skins_GetIconTextVar("DBHEIGHT", f, z), "DBHEIGHT", frame, z)
            hbv_Skins_SetIconTextVar(hbv_Skins_GetIconTextVar("DBFONT", f, z), "DBFONT", frame, z)
            hbv_Skins_SetIconTextVar(hbv_Skins_GetIconTextVar("DBOUTLINE", f, z), "DBOUTLINE", frame, z)
            hbv_Skins_SetIconTextVar(hbv_Skins_GetIconTextVar("DBDURTHRH", f, z), "DBDURTHRH", frame, z)
            hbv_Skins_SetIconTextVar(hbv_Skins_GetIconTextVar("DBDURWARN", f, z), "DBDURWARN", frame, z)
        end
    elseif tab == 15 then
        for z=1,3 do
            hbv_Skins_SetIconVar(hbv_Skins_GetIconBoolean("BUFFDOUBLE", f, z), "BUFFDOUBLE", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconBoolean("BUFFI15EN", f, z), "BUFFI15EN", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconBoolean("BUFFFADE", f, z), "BUFFFADE", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("BUFFONBAR", f, z), "BUFFONBAR", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("BUFFANCHOR", f, z), "BUFFANCHOR", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("BSCALE", f, z), "BSCALE", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("BUFFFADESECS", f, z), "BUFFFADESECS", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("BZOOM", f, z), "BZOOM", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("MAXBICONS", f, z), "MAXBICONS", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("BICONSPACER", f, z), "BICONSPACER", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("BVOFFSET", f, z), "BVOFFSET", frame, z)
            hbv_Skins_SetIconVar(hbv_Skins_GetIconVar("BHOFFSET", f, z), "BHOFFSET", frame, z)
            hbv_Skins_SetIconTextVar(hbv_Skins_GetIconTextBoolean("BUFFSCNT", f, z), "BUFFSCNT", frame, z)
            hbv_Skins_SetIconTextVar(hbv_Skins_GetIconTextBoolean("BUFFSSCNT", f, z), "BUFFSSCNT", frame, z)
            hbv_Skins_SetIconTextVar(hbv_Skins_GetIconTextBoolean("BUFFSDUR", f, z), "BUFFSDUR", frame, z)
            hbv_Skins_SetIconTextVar(hbv_Skins_GetIconTextBoolean("BUFFSSDUR", f, z), "BUFFSSDUR", frame, z)
            hbv_Skins_SetIconTextVar(hbv_Skins_GetIconTextVar("BUFFHEIGHT", f, z), "BUFFHEIGHT", frame, z)
            hbv_Skins_SetIconTextVar(hbv_Skins_GetIconTextVar("BUFFFONT", f, z), "BUFFFONT", frame, z)
            hbv_Skins_SetIconTextVar(hbv_Skins_GetIconTextVar("BUFFOUTLINE", f, z), "BUFFOUTLINE", frame, z)
            hbv_Skins_SetIconTextVar(hbv_Skins_GetIconTextVar("BUFFDURTHRH", f, z), "BUFFDURTHRH", frame, z)
            hbv_Skins_SetIconTextVar(hbv_Skins_GetIconTextVar("BUFFDURWARN", f, z), "BUFFDURWARN", frame, z)
        end
    elseif tab == 16 then
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("Icons", "SHOWRC", f), "Icons", "SHOWRC", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("Icons", "SHOWRANK", f), "Icons", "SHOWRANK", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("Icons", "SHOWAFK", f), "Icons", "SHOWAFK", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("Icons", "SHOWHOSTILE", f), "Icons", "SHOWHOSTILE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("Icons", "SHOWCOMBAT", f), "Icons", "SHOWCOMBAT", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("Icons", "SHOWRESTING", f), "Icons", "SHOWRESTING", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("Icons", "SHOWDIR", f), "Icons", "SHOWDIR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("Icons", "SHOWDIRMOUSE", f), "Icons", "SHOWDIRMOUSE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("Icons", "SHOWROLE", f), "Icons", "SHOWROLE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("Icons", "SHOWCLASS", f), "Icons", "SHOWCLASS", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("Icons", "TARGETEN", f), "Icons", "TARGETEN", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("Icons", "CLASSEN", f), "Icons", "CLASSEN", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("Icons", "OOREN", f), "Icons", "OOREN", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("Icons", "RCEN", f), "Icons", "RCEN", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "CLASSONBAR", f), "Icons", "CLASSONBAR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "TARGETONBAR", f), "Icons", "TARGETONBAR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "RCONBAR", f), "Icons", "RCONBAR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "OORONBAR", f), "Icons", "OORONBAR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "CLASSANCHOR", f), "Icons", "CLASSANCHOR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "TARGETANCHOR", f), "Icons", "TARGETANCHOR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "RCANCHOR", f), "Icons", "RCANCHOR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "OORANCHOR", f), "Icons", "OORANCHOR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "TARGETVOFFSET", f), "Icons", "TARGETVOFFSET", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "TARGETHOFFSET", f), "Icons", "TARGETHOFFSET", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "TARGETSCALE", f), "Icons", "TARGETSCALE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "CLASSVOFFSET", f), "Icons", "CLASSVOFFSET", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "CLASSHOFFSET", f), "Icons", "CLASSHOFFSET", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "CLASSSCALE", f), "Icons", "CLASSSCALE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "OORVOFFSET", f), "Icons", "OORVOFFSET", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "OORHOFFSET", f), "Icons", "OORHOFFSET", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "OORSCALE", f), "Icons", "OORSCALE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "OORZOOM", f), "Icons", "OORZOOM", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "RCVOFFSET", f), "Icons", "RCVOFFSET", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "RCHOFFSET", f), "Icons", "RCHOFFSET", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "RCSCALE", f), "Icons", "RCSCALE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "RCZOOM", f), "Icons", "RCZOOM", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "CLASSZOOM", f), "Icons", "CLASSZOOM", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Icons", "TARGETZOOM", f), "Icons", "TARGETZOOM", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("RaidIcon", "SHOW", f), "RaidIcon", "SHOW", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("RaidIcon", "STAR", f), "RaidIcon", "STAR", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("RaidIcon", "CIRCLE", f), "RaidIcon", "CIRCLE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("RaidIcon", "DIAMOND", f), "RaidIcon", "DIAMOND", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("RaidIcon", "TRIANGLE", f), "RaidIcon", "TRIANGLE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("RaidIcon", "MOON", f), "RaidIcon", "MOON", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("RaidIcon", "SQUARE", f), "RaidIcon", "SQUARE", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("RaidIcon", "CROSS", f), "RaidIcon", "CROSS", frame)
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("RaidIcon", "SKULL", f), "RaidIcon", "SKULL", frame)

    elseif tab == 24 then
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Anchors", "X", f), "Anchors", "X", frame)
        HealBot_Action_setPoint(frame, false)
    elseif tab == 25 then
        hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Anchors", "Y", f), "Anchors", "Y", frame)
        HealBot_Action_setPoint(frame, false)
    end

    if frame<10 then
        if tab == 8 then
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarAggro", "ALERT", f), "BarAggro", "ALERT", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarAggro", "ALERTIND", f), "BarAggro", "ALERTIND", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarAggro", "TEXTFORMAT", f), "BarAggro", "TEXTFORMAT", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarAggro", "SHOW", f), "BarAggro", "SHOW", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarAggro", "SHOWBARS", f), "BarAggro", "SHOWBARS", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarAggro", "SHOWTEXT", f), "BarAggro", "SHOWTEXT", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarAggro", "SHOWBARSPCT", f), "BarAggro", "SHOWBARSPCT", frame)
        elseif tab == 17 then
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("BarAggro", "SHOWIND", f), "BarAggro", "SHOWIND", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "ACOL", f), "Indicators", "ACOL", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "AANCHOR", f), "Indicators", "AANCHOR", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "AVOFF", f), "Indicators", "AVOFF", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "AHOFF", f), "Indicators", "AHOFF", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "ASIZE", f), "Indicators", "ASIZE", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "ASPACE", f), "Indicators", "ASPACE", frame)
        elseif tab == 18 then
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("HealBar", "LOWMANA", f), "HealBar", "LOWMANA", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("HealBar", "LOWMANACOMBAT", f), "HealBar", "LOWMANACOMBAT", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "MCOL", f), "Indicators", "MCOL", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "MANCHOR", f), "Indicators", "MANCHOR", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "MVOFF", f), "Indicators", "MVOFF", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "MHOFF", f), "Indicators", "MHOFF", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "MSIZE", f), "Indicators", "MSIZE", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "MSPACE", f), "Indicators", "MSPACE", frame)
        elseif tab == 22 then
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("IconText", "SELFIND", f), "IconText", "SELFIND", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "SCOL", f), "Indicators", "SCOL", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "SANCHOR", f), "Indicators", "SANCHOR", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "SVOFF", f), "Indicators", "SVOFF", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "SHOFF", f), "Indicators", "SHOFF", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "SSIZE", f), "Indicators", "SSIZE", frame)
        elseif tab == 19 then
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("HealBar", "POWERCNT", f), "HealBar", "POWERCNT", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "PCOL", f), "Indicators", "PCOL", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "PANCHOR", f), "Indicators", "PANCHOR", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "PVOFF", f), "Indicators", "PVOFF", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "PHOFF", f), "Indicators", "PHOFF", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "PSIZE", f), "Indicators", "PSIZE", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Indicators", "PSPACE", f), "Indicators", "PSPACE", frame)
        elseif tab == 20 then
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("Emerg", "USE", f), "Emerg", "USE", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "TEXTURE", f), "Emerg", "TEXTURE", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "ANCHOR", f), "Emerg", "ANCHOR", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "VOFFSET", f), "Emerg", "VOFFSET", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "HOFFSET", f), "Emerg", "HOFFSET", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "HEIGHT", f), "Emerg", "HEIGHT", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "WIDTH", f), "Emerg", "WIDTH", frame)
        elseif tab == 21 then
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("Emerg", "BUFFBARCOL", f), "Emerg", "BUFFBARCOL", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameBoolean("Emerg", "DEBUFFBARCOL", f), "Emerg", "DEBUFFBARCOL", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "A", f), "Emerg", "A", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "DA", f), "Emerg", "DA", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "CRITICAL", f), "Emerg", "CRITICAL", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "INJURED", f), "Emerg", "INJURED", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "CR", f), "Emerg", "CR", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "CG", f), "Emerg", "CG", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "CB", f), "Emerg", "CB", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "IR", f), "Emerg", "IR", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "IG", f), "Emerg", "IG", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "IB", f), "Emerg", "IB", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "HR", f), "Emerg", "HR", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "HG", f), "Emerg", "HG", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "HB", f), "Emerg", "HB", frame)
            hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("Emerg", "BARCOL", f), "Emerg", "BARCOL", frame)
        end
    end
end

function HealBot_Options_CopyOptionsCopy()
      --HealBot_setCall("HealBot_Options_CopyOptionsCopy")
    local g, h
    local tab5, tab9, tab16, sPoint=false, false, false, false
    for x=1,9 do
        g=_G["HealBot_Options_CopyFrame"..x]
        if g:GetChecked() then
            for y=1,25 do
                h=_G["HealBot_Options_CopyTab"..y]
                if h:GetChecked() then
                    HealBot_Options_CopyTab2Frames(hbCopyFrameIdx[x], y)
                    if y == 5 then tab5=true end
                    if y == 9 then tab9=true end
                    if y == 16 then tab16=true end
                end
            end
        end
    end
    if tab5 and hb_lVars["TestBarsOn"] then HealBot_Panel_resetTestCols(true) end
    if tab9 and hb_lVars["CurrentSkinsBarsPanel"] == "HealBot_Options_SkinsFramesBarsAux" then HealBot_Timers_Set("AUX","ResetBars") end
    if tab16 then
        HealBot_Update_RemoveExtraIcons(91)
        HealBot_Update_RemoveExtraIcons(92)
        HealBot_Update_RemoveExtraIcons(93)
        HealBot_Update_RemoveExtraIcons(94)
        HealBot_Update_RemoveExtraIcons(95)
        HealBot_Update_RemoveExtraIcons(96)
        HealBot_Timers_Set("SKINS","SetSkinBars")
        HealBot_Timers_Set("SKINS","SetSkinText")
        HealBot_Timers_Set("AURA","ResetClassIconTexture",true)
        HealBot_Timers_Set("AURA","IconUpdAllRank",true)
        HealBot_Timers_Set("SKINS","IconUpdAllTarget",true)
    end
    HealBot_Options_framesChanged(true, true, true, true, true)
    HealBot_Options_ShowSkinsPanel("BACK", 0)
end

--------------------------------------------------------------------------------
local function HealBot_Options_ManaIndicator_DropDown(dropDown, level, menuList)
      --HealBot_setCall("HealBot_Options_ManaIndicator_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    if hb_lVars["Frame"]>9 then
        info.text=" "
        UIDropDownMenu_AddButton(info);
    else
        for j=1, getn(HealBot_Options_ManaIndicator_List), 1 do
            info.text=HealBot_Options_ManaIndicator_List[j];
         --   info.func=HealBot_Options_ManaIndicator_OnSelect;
            info.func=function(self)
                            if hbv_Skins_GetFrameVar("HealBar", "LOWMANA", hb_lVars["Frame"])~=self:GetID() then
                                hbv_Skins_SetFrameVar(self:GetID(), "HealBar", "LOWMANA", hb_lVars["Frame"])
                                UIDropDownMenu_SetSelectedID(HealBot_Options_ManaIndicator,hbv_Skins_GetFrameVar("HealBar", "LOWMANA", hb_lVars["Frame"]))
                                HealBot_Options_framesChanged(false, false, true)
                                HealBot_Timers_Set("LAST","LowManaTrig")
                            end
                        end
            info.checked=false;
            if hbv_Skins_GetFrameVar("HealBar", "LOWMANA", hb_lVars["Frame"]) == j then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_AggroIndColour_DropDown()
      --HealBot_setCall("HealBot_Options_AggroIndColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["IndicatorCol"]), 1 do
        info.text=HealBot_Options_Lists["IndicatorCol"][j]
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("Indicators", "ACOL", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "Indicators", "ACOL", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_AggroIndColour, HealBot_Options_Lists["IndicatorCol"][hbv_Skins_GetFrameVar("Indicators", "ACOL", hb_lVars["Frame"])])
                            HealBot_Options_framesChanged(false, false, true)
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Indicators", "ACOL", hb_lVars["Frame"]) == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_SelfCastIndColour_DropDown()
      --HealBot_setCall("HealBot_Options_SelfCastIndColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["IndicatorCol"]), 1 do
        info.text=HealBot_Options_Lists["IndicatorCol"][j]
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("Indicators", "SCOL", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "Indicators", "SCOL", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_SelfCastIndColour, HealBot_Options_Lists["IndicatorCol"][hbv_Skins_GetFrameVar("Indicators", "SCOL", hb_lVars["Frame"])])
                            HealBot_Options_framesChanged(false, false, true)
                            HealBot_Timers_Set("AURA","UpdateAllBuffIcons")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Indicators", "SCOL", hb_lVars["Frame"]) == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_LowManaIndColour_DropDown()
      --HealBot_setCall("HealBot_Options_LowManaIndColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["IndicatorCol"]), 1 do
        info.text=HealBot_Options_Lists["IndicatorCol"][j]
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("Indicators", "MCOL", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "Indicators", "MCOL", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_LowManaIndColour, HealBot_Options_Lists["IndicatorCol"][hbv_Skins_GetFrameVar("Indicators", "MCOL", hb_lVars["Frame"])])
                            HealBot_Options_framesChanged(false, false, true)
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Indicators", "MCOL", hb_lVars["Frame"]) == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_PowerIndColour_DropDown()
      --HealBot_setCall("HealBot_Options_PowerIndColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["IndicatorCol"]), 1 do
        info.text=HealBot_Options_Lists["IndicatorCol"][j]
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("Indicators", "PCOL", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "Indicators", "PCOL", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_PowerIndColour, HealBot_Options_Lists["IndicatorCol"][hbv_Skins_GetFrameVar("Indicators", "PCOL", hb_lVars["Frame"])])
                            HealBot_Options_framesChanged(false, false, true)
                            HealBot_Timers_Set("SKINS","PowerIndicator")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Indicators", "PCOL", hb_lVars["Frame"]) == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_ActionIconsAnchor_DropDown()
      --HealBot_setCall("HealBot_Options_ActionIconsAnchor_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["ActionIconsAnchor"]), 1 do
        info.text=HealBot_Options_Lists["ActionIconsAnchor"][j]
        info.func=function(self)
                        if hbv_ActionIcons_GetVars("ANCHOR", hb_lVars["Frame"])~=self:GetID() then
                            hbv_ActionIcons_SetVars(self:GetID(), "ANCHOR", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_ActionIconsAnchor, HealBot_Options_Lists["ActionIconsAnchor"][hbv_ActionIcons_GetVars("ANCHOR", hb_lVars["Frame"])])
                            HealBot_ActionIcons_SetFramePoints(hb_lVars["Frame"])
                        end
                    end
        info.checked=false;
        if hbv_ActionIcons_GetVars("ANCHOR", hb_lVars["Frame"]) == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_ActionIconsCopyFrom_DropDown()
      --HealBot_setCall("HealBot_Options_ActionIconsCopyFrom_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(Healbot_Config_Skins.Skins), 1 do
        info.text=Healbot_Config_Skins.Skins[j]
        info.func=function(self)
                        if hb_lVars["ActionIconsCopyFrom"]~=self:GetID() then
                            hb_lVars["ActionIconsCopyFrom"]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_ActionIconsCopyFrom, Healbot_Config_Skins.Skins[hb_lVars["ActionIconsCopyFrom"]])
                        end
                    end
        info.checked=false;
        if hb_lVars["ActionIconsCopyFrom"] == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_ActionIconsCopyFromConfirm()
      --HealBot_setCall("HealBot_Options_ActionIconsCopyFromConfirm")
    local msg=HEALBOT_OPTIONS_COPYFROMC1..Healbot_Config_Skins.Skins[hb_lVars["ActionIconsCopyFrom"]]..HEALBOT_OPTIONS_COPYFROMC2
    StaticPopupDialogs["HEALBOT_OPTIONS_COPYFROMCONFIRM"]={
        text=msg,
        button1=HEALBOT_WORDS_YES,
        button2=HEALBOT_WORDS_NO,
        OnAccept=function()
            HealBot_Options_CopyActionIconsProfile(Healbot_Config_Skins.Skins[hb_lVars["ActionIconsCopyFrom"]])
        end,
        timeout=0,
        whileDead=1,
        hideOnEscape=1
    };
    StaticPopup_Show ("HEALBOT_OPTIONS_COPYFROMCONFIRM");
end

function HealBot_Options_ActionIconsCopyFromNoData()
      --HealBot_setCall("HealBot_Options_ActionIconsCopyFromNoData")
    local msg=HEALBOT_OPTIONS_COPYFROMND..Healbot_Config_Skins.Skins[hb_lVars["ActionIconsCopyFrom"]]
    StaticPopupDialogs["HEALBOT_OPTIONS_COPYFROMNODATA"]={
        text=msg,
        button1=HEALBOT_WORDS_OK,
        OnAccept=function()
            -- Done
        end,
        timeout=0,
        whileDead=1,
        hideOnEscape=1
    };
    StaticPopup_Show ("HEALBOT_OPTIONS_COPYFROMNODATA");
end

function HealBot_Options_ActionIconsCopyFromButton_OnClick()
      --HealBot_setCall("HealBot_Options_ActionIconsCopyFromButton_OnClick")
    if HealBot_Data["PGUID"] and Healbot_Config_Skins.Skins[hb_lVars["ActionIconsCopyFrom"]] then
        local spec=HealBot_Action_GetActionIconSpecWithSkin(Healbot_Config_Skins.Skins[hb_lVars["ActionIconsCopyFrom"]])
        if HealBot_ActionIconsData_Loadouts[spec] then
            HealBot_Options_ActionIconsCopyFromConfirm()
        else
            HealBot_Options_ActionIconsCopyFromNoData()
        end
    else
        HealBot_Options_ActionIconsCopyFromNoData()
    end
end

local hbActionIconsTargets={["pNames"]={},["AF"]={},["GM"]={},["NS"]={},["TZ"]={}}
function HealBot_Options_ActionIconsUpdatePlayerNames(name)
      --HealBot_setCall("HealBot_Options_ActionIconsUpdatePlayerNames")
    if name and type(name) == "string" and string.byte(name) then
        if string.byte(name)<71 then
            table.insert(hbActionIconsTargets["AF"], name)
        elseif string.byte(name)<78 then
            table.insert(hbActionIconsTargets["GM"], name)
        elseif string.byte(name)<84 then
            table.insert(hbActionIconsTargets["NS"], name)
        else
            table.insert(hbActionIconsTargets["TZ"], name)
        end
    end
end

function HealBot_Options_ActionIconsGetPlayerName(button)
      --HealBot_setCall("HealBot_Options_ActionIconsGetPlayerName")
    hb_lVars["pName"]=UnitName(button.unit)
    if hb_lVars["pName"] then
        hbActionIconsTargets["pNames"][hb_lVars["pName"]]=true
    end
end

function HealBot_Options_ActionIcons_PlayerNames()
      --HealBot_setCall("HealBot_Options_ActionIcons_PlayerNames")
    if HealBot_Options:IsVisible() then
        for x,_ in pairs(hbActionIconsTargets["pNames"]) do
            hbActionIconsTargets["pNames"][x]=nil;
        end
        for x,_ in pairs(hbActionIconsTargets["AF"]) do
            hbActionIconsTargets["AF"][x]=nil;
        end
        for x,_ in pairs(hbActionIconsTargets["GM"]) do
            hbActionIconsTargets["GM"][x]=nil;
        end
        for x,_ in pairs(hbActionIconsTargets["NS"]) do
            hbActionIconsTargets["NS"][x]=nil;
        end
        for x,_ in pairs(hbActionIconsTargets["TZ"]) do
            hbActionIconsTargets["TZ"][x]=nil;
        end
        for _,xButton in pairs(HealBot_Unit_Button) do
            HealBot_Options_ActionIconsGetPlayerName(xButton)
        end
        for _,xButton in pairs(HealBot_Private_Button) do
            HealBot_Options_ActionIconsGetPlayerName(xButton)
        end
        for name,_ in pairs(hbActionIconsTargets["pNames"]) do
            HealBot_Options_ActionIconsUpdatePlayerNames(name)
        end
        if #hbActionIconsTargets["AF"] == 0 then
            table.insert(hbActionIconsTargets["AF"], HEALBOT_WORDS_NONE)
        end
        if #hbActionIconsTargets["GM"] == 0 then
            table.insert(hbActionIconsTargets["GM"], HEALBOT_WORDS_NONE)
        end
        if #hbActionIconsTargets["NS"] == 0 then
            table.insert(hbActionIconsTargets["NS"], HEALBOT_WORDS_NONE)
        end
        if #hbActionIconsTargets["TZ"] == 0 then
            table.insert(hbActionIconsTargets["TZ"], HEALBOT_WORDS_NONE)
        end
        table.sort(hbActionIconsTargets["AF"])
        table.sort(hbActionIconsTargets["GM"])
        table.sort(hbActionIconsTargets["NS"])
        table.sort(hbActionIconsTargets["TZ"])
    else
        hb_lVars["ActionIconsSetPlayerNames"]=true
    end
end

function HealBot_Options_ActionIconsTarget_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_ActionIconsTarget_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    info.keepShownOnClick=false
    if level == 1 then
        for j=1, getn(HealBot_Options_Lists["ActionIconsTarget"]) do
            info.text=HealBot_Options_Lists["ActionIconsTarget"][j];
            info.func=function(self)
                            if hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=HealBot_Options_Lists["ActionIconsTarget"][j] then
                                if HealBot_Options_Lists["ActionIconsTarget"][j] == HEALBOT_WORDS_NONE then
                                    hbv_ActionIcons_NilData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                                    HealBot_ActionIcons_DeleteTarget(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                                else
                                    hbv_ActionIcons_SetData(HealBot_Options_Lists["ActionIconsTarget"][j], "Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                                end
                                UIDropDownMenu_SetText(HealBot_Options_ActionIconsTarget,hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
                                HealBot_Options_FramesActionIconsSetLists(true)
                            end
                        end
            info.checked=false;
            if hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"]) == HealBot_Options_Lists["ActionIconsTarget"][j] then info.checked=true end
            UIDropDownMenu_AddButton(info, 1);
        end
        wipe(info)
        info.disabled=true
        info.notCheckable=true
        UIDropDownMenu_AddButton(info)
        info.disabled=false
        info.hasArrow=true
        info.notCheckable=true
        info.keepShownOnClick=false
        info.text="     "..HEALBOT_SORTBY_ROLE
        info.menuList=1
        UIDropDownMenu_AddButton(info)
        wipe(info)
        info.disabled=true
        info.notCheckable=true
        UIDropDownMenu_AddButton(info)
        info.disabled=false
        info.hasArrow=true
        info.notCheckable=true
        info.keepShownOnClick=false
        info.text="     "..HEALBOT_WORD_PLAYERS.." A - F"
        info.menuList=3
        UIDropDownMenu_AddButton(info)
        info.text="     "..HEALBOT_WORD_PLAYERS.." G - M"
        info.menuList=4
        UIDropDownMenu_AddButton(info)
        info.text="     "..HEALBOT_WORD_PLAYERS.." N - S"
        info.menuList=5
        UIDropDownMenu_AddButton(info)
        info.text="     "..HEALBOT_WORD_PLAYERS.." T - Z"
        info.menuList=6
        UIDropDownMenu_AddButton(info)
    elseif menuList == 1 then
        for j=1, getn(HealBot_Options_Lists["ActionIconsRoleTargets"]), 1 do
            info.text=HealBot_Options_Lists["ActionIconsRoleTargets"][j];
            info.func=function(self)
                            if hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=HealBot_Options_Lists["ActionIconsRoleTargets"][j] then
                                hbv_ActionIcons_SetData(HealBot_Options_Lists["ActionIconsRoleTargets"][j], "Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                                UIDropDownMenu_SetText(HealBot_Options_ActionIconsTarget,hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
                                HealBot_Options_FramesActionIconsSetLists(true)
                            end
                        end
            info.checked=false;
            if hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"]) == HealBot_Options_Lists["ActionIconsRoleTargets"][j] then info.checked=true end
            UIDropDownMenu_AddButton(info, level);
        end
    elseif menuList == 3 then
        for j=1, getn(hbActionIconsTargets["AF"]), 1 do
            info.text=hbActionIconsTargets["AF"][j];
            info.func=function(self)
                            if hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=hbActionIconsTargets["AF"][j] then
                                hbv_ActionIcons_SetData(hbActionIconsTargets["AF"][j], "Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                                UIDropDownMenu_SetText(HealBot_Options_ActionIconsTarget,hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
                                HealBot_Options_FramesActionIconsSetLists(true)
                            end
                        end
            info.checked=false;
            if hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"]) == hbActionIconsTargets["AF"][j] then info.checked=true end
            UIDropDownMenu_AddButton(info, level);
        end
    elseif menuList == 4 then
        for j=1, getn(hbActionIconsTargets["GM"]), 1 do
            info.text=hbActionIconsTargets["GM"][j];
            info.func=function(self)
                            if hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=hbActionIconsTargets["GM"][j] then
                                hbv_ActionIcons_SetData(hbActionIconsTargets["GM"][j], "Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                                UIDropDownMenu_SetText(HealBot_Options_ActionIconsTarget,hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
                                HealBot_Options_FramesActionIconsSetLists(true)
                            end
                        end
            info.checked=false;
            if hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"]) == hbActionIconsTargets["GM"][j] then info.checked=true end
            UIDropDownMenu_AddButton(info, level);
        end
    elseif menuList == 5 then
        for j=1, getn(hbActionIconsTargets["NS"]), 1 do
            info.text=hbActionIconsTargets["NS"][j];
            info.func=function(self)
                            if hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=hbActionIconsTargets["NS"][j] then
                                hbv_ActionIcons_SetData(hbActionIconsTargets["NS"][j], "Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                                UIDropDownMenu_SetText(HealBot_Options_ActionIconsTarget,hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
                                HealBot_Options_FramesActionIconsSetLists(true)
                            end
                        end
            info.checked=false;
            if hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"]) == hbActionIconsTargets["NS"][j] then info.checked=true end
            UIDropDownMenu_AddButton(info, level);
        end
    elseif menuList == 6 then
        for j=1, getn(hbActionIconsTargets["TZ"]), 1 do
            info.text=hbActionIconsTargets["TZ"][j];
            info.func=function(self)
                            if hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=hbActionIconsTargets["TZ"][j] then
                                hbv_ActionIcons_SetData(hbActionIconsTargets["TZ"][j], "Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                                UIDropDownMenu_SetText(HealBot_Options_ActionIconsTarget,hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
                                HealBot_Options_FramesActionIconsSetLists(true)
                            end
                        end
            info.checked=false;
            if hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"]) == hbActionIconsTargets["TZ"][j] then info.checked=true end
            UIDropDownMenu_AddButton(info, level);
        end
    end
end

function HealBot_Options_ActionIconsHighlightFilter_DropDown()
      --HealBot_setCall("HealBot_Options_ActionIconsHighlightFilter_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["ActionIconsHighlightFilter"]), 1 do
        info.text=HealBot_Options_Lists["ActionIconsHighlightFilter"][j]
        info.func=function(self)
                        if hbv_ActionIcons_GetData("HighlightFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=self:GetID() then
                            hbv_ActionIcons_SetData(self:GetID(), "HighlightFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                            UIDropDownMenu_SetText(HealBot_Options_ActionIconsHighlightFilter, HealBot_Options_Lists["ActionIconsHighlightFilter"][hbv_ActionIcons_GetData("HighlightFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"])])
                            HealBot_Options_FramesActionIconsSetLists(true)
                            HealBot_ActionIcons_ValidateAbilityFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                        end
                    end
        info.checked=false;
        if hbv_ActionIcons_GetData("HighlightFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"]) == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_ActionIconsAlertFilterHideShow(ddId, selfOnly)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertFilterHideShow")
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertBuffname",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsSelfAlertBuffname",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertBuffHelp",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertBuffListFilter",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertBuffList",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertBuffSelfCast",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertBuffMinStacks",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertBuffMaxStacks",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsSelfAlertBuffSelfCast",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsSelfAlertBuffMinStacks",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsSelfAlertBuffMaxStacks",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertBuffTag",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsSelfAlertBuffTag",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertDebuffname",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertDebuffListFilter",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertDebuffList",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertDebuffHelp",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertDebuffSelfCast",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertDebuffMinStacks",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertDebuffMaxStacks",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertDebuffTag",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertHealth",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertHealthAbove",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertMana",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertManaAbove",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertAggro",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertFilter",false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsSelfAlertFilter",false)
    if ddId then
        if selfOnly then
            HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsSelfAlertFilter",true)
            if ddId == 2 then
                HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsSelfAlertBuffname",true)
                HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertBuffHelp",true)
                HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsSelfAlertBuffSelfCast",true)
                HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsSelfAlertBuffMinStacks",true)
                HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsSelfAlertBuffMaxStacks",true)
            elseif ddId ==3 then
                HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsSelfAlertBuffTag",true)
            end
        else
            HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertFilter",true)
            if ddId>1 then
                if ddId<6 then
                    if ddId~=3 then
                        HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertBuffname",true)
                        HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertBuffHelp",true)
                        if ddId~=5 then
                            HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertBuffSelfCast",true)
                            HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertBuffMinStacks",true)
                            HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertBuffMaxStacks",true)
                        end
                    else
                        HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertBuffTag",true)
                    end
                elseif ddId<10 then
                    if ddId~=7 then
                        HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertDebuffname",true)
                        HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertDebuffHelp",true)
                        if ddId~=9 then
                            HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertDebuffSelfCast",true)
                            HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertDebuffMinStacks",true)
                            HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertDebuffMaxStacks",true)
                        end
                    else
                        HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertDebuffTag",true)
                    end
                elseif ddId == 10 then
                    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertHealth",true)
                elseif ddId == 11 then
                    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertHealthAbove",true)
                elseif ddId == 12 then
                    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertMana",true)
                elseif ddId == 13 then
                    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertManaAbove",true)
                elseif ddId == 14 then
                    HealBot_Options_ObjectsShowHide("HealBot_Options_ActionIconsAlertAggro",true)
                end
            end
        end
    end
end

function HealBot_Options_ActionIconsAlertFilterValid(id)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertFilterValid")
    if id>9 then
        for c=1,3 do
            if c~=hb_lVars["ActionIconsCondNo"] then
                if hbv_ActionIcons_GetData("AlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"], c) == id then
                    return false
                end
            end
        end
    end
    return true
end

function HealBot_Options_RetActionIconsAlertFilter(index)
      --HealBot_setCall("HealBot_Options_RetActionIconsAlertFilter")
    return HealBot_Options_Lists["ActionIconsAlertFilter"][index] or "nil"
end

function HealBot_Options_ActionIconsAlertFilter_DropDown()
      --HealBot_setCall("HealBot_Options_ActionIconsAlertFilter_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["ActionIconsAlertFilter"]), 1 do
        info.text=HealBot_Options_Lists["ActionIconsAlertFilter"][j]
        info.func=function(self)
                        if hbv_ActionIcons_GetData("AlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])~=self:GetID() then
                            if HealBot_Options_ActionIconsAlertFilterValid(self:GetID()) then
                                if hbv_ActionIcons_DataExists("AlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]) then
                                    HealBot_ActionIcons_ConditionChange(hb_lVars["Frame"], hb_lVars["ActionIconsID"], hbv_ActionIcons_GetData("AlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]), self:GetID(), hb_lVars["ActionIconsCondNo"])
                                    --HealBot_AddDebug("ConditionChange")
                                end
                                hbv_ActionIcons_SetData(self:GetID(), "AlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])
                                UIDropDownMenu_SetText(HealBot_Options_ActionIconsAlertFilter, HealBot_Options_Lists["ActionIconsAlertFilter"][hbv_ActionIcons_GetData("AlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])])
                                HealBot_Options_ActionIconsAlertFilterHideShow(hbv_ActionIcons_GetData("AlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]), false)
                                HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                            end
                        end
                    end
        info.checked=false;
        if hbv_ActionIcons_GetData("AlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]) == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_ActionIconsSelfAlertFilter_DropDown()
      --HealBot_setCall("HealBot_Options_ActionIconsAlertFilter_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["ActionIconsSelfAlertFilter"]), 1 do
        info.text=HealBot_Options_Lists["ActionIconsSelfAlertFilter"][j]
        info.func=function(self)
                        if hbv_ActionIcons_GetData("SelfAlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=self:GetID() then
                            if hbv_ActionIcons_DataExists("SelfAlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"]) then
                                HealBot_ActionIcons_ConditionChange(hb_lVars["Frame"], hb_lVars["ActionIconsID"], hbv_ActionIcons_GetData("SelfAlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"]), self:GetID())
                                --HealBot_AddDebug("ConditionChange")
                            end
                            hbv_ActionIcons_SetData(self:GetID(), "SelfAlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                            UIDropDownMenu_SetText(HealBot_Options_ActionIconsSelfAlertFilter, HealBot_Options_Lists["ActionIconsSelfAlertFilter"][hbv_ActionIcons_GetData("SelfAlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"])])
                            HealBot_Options_ActionIconsAlertFilterHideShow(hbv_ActionIcons_GetData("SelfAlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"]), true)
                            HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                        end
                    end
        info.checked=false;
        if hbv_ActionIcons_GetData("SelfAlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"]) == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_ActionIconsAlertBuffTag_DropDown()
      --HealBot_setCall("HealBot_Options_ActionIconsAlertBuffTag_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local tags=HealBot_Options_BuffFilter_TagList()
    for j=1, getn(tags), 1 do
        info.text=tags[j]
        info.func=function(self)
                        if hbv_ActionIcons_GetData("AlertBuffTag", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])~=self:GetText() then
                            hbv_ActionIcons_SetData(self:GetText(), "AlertBuffTag", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])
                            UIDropDownMenu_SetText(HealBot_Options_ActionIconsAlertBuffTag, hbv_ActionIcons_GetData("AlertBuffTag", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))
                            HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                        end
                    end
        info.checked=false;
        if hbv_ActionIcons_GetData("AlertBuffTag", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]) == tags[j] then info.checked=true; end
        UIDropDownMenu_AddButton(info, level)
    end
end

function HealBot_Options_ActionIconsSelfAlertBuffTag_DropDown()
      --HealBot_setCall("HealBot_Options_ActionIconsSelfAlertBuffTag")
    local info=UIDropDownMenu_CreateInfo()
    local tags=HealBot_Options_BuffFilter_TagList()
    for j=1, getn(tags), 1 do
        info.text=tags[j]
        info.func=function(self)
                        if hbv_ActionIcons_GetData("SelfAlertBuffTag", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=self:GetText() then
                            hbv_ActionIcons_SetData(self:GetText(), "SelfAlertBuffTag", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                            UIDropDownMenu_SetText(HealBot_Options_ActionIconsSelfAlertBuffTag, hbv_ActionIcons_GetData("SelfAlertBuffTag", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
                            HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                        end
                    end
        info.checked=false;
        if hbv_ActionIcons_GetData("SelfAlertBuffTag", hb_lVars["Frame"], hb_lVars["ActionIconsID"]) == tags[j] then info.checked=true; end
        UIDropDownMenu_AddButton(info, level)
    end
end

function HealBot_Options_ActionIconsAlertDebuffTag_DropDown()
      --HealBot_setCall("HealBot_Options_ActionIconsAlertDebuffTag_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local tags=HealBot_Options_DebuffFilter_TagList()
    for j=1, getn(tags), 1 do
        info.text=tags[j]
        info.func=function(self)
                        if hbv_ActionIcons_GetData("AlertDebuffTag", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])~=self:GetText() then
                            hbv_ActionIcons_SetData(self:GetText(), "AlertDebuffTag", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])
                            UIDropDownMenu_SetText(HealBot_Options_ActionIconsAlertDebuffTag, hbv_ActionIcons_GetData("AlertDebuffTag", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))
                            HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                        end
                    end
        info.checked=false;
        if hbv_ActionIcons_GetData("AlertDebuffTag", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]) == tags[j] then info.checked=true; end
        UIDropDownMenu_AddButton(info, level)
    end
end

function HealBot_Options_ActionIconsAlertGlow_DropDown()
      --HealBot_setCall("HealBot_Options_ActionIconsAlertGlow_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AuraIconGlow"]), 1 do
        info.text=HealBot_Options_Lists["AuraIconGlow"][j]
        info.func=function(self)
                        if hbv_ActionIcons_GetData("AlertGlowStyle", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=self:GetID() then
                            hbv_ActionIcons_SetData(self:GetID(), "AlertGlowStyle", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                            UIDropDownMenu_SetText(HealBot_Options_ActionIconsAlertGlow, HealBot_Options_Lists["AuraIconGlow"][hbv_ActionIcons_GetData("AlertGlowStyle", hb_lVars["Frame"], hb_lVars["ActionIconsID"])])
                            HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
                        end
                    end
        info.checked=false;
        if hbv_ActionIcons_GetData("AlertGlowStyle", hb_lVars["Frame"], hb_lVars["ActionIconsID"]) == j then info.checked=true; end
        UIDropDownMenu_AddButton(info, level)
    end
end

function HealBot_Options_ActionIconsConfigID_DropDown()
      --HealBot_setCall("HealBot_Options_ActionIconsConfigID_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, HealBot_ActionIcons_retLuVars("MaxIcons"), 1 do
        info.text=j
        info.func=function(self)
                        if hb_lVars["ActionIconsID"]~=self:GetID() then
                            hb_lVars["ActionIconsID"]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_ActionIconsConfigID, hb_lVars["ActionIconsID"])
                            HealBot_Options_SkinsFramesActionIconsConfigTab("SkinsFramesActionIconsConfig", true)
                            if hb_lVars["ActionIconsCondNo"] == 4 then
                                HealBot_Options_ActionIconsAlertFilterHideShow(hbv_ActionIcons_GetData("SelfAlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"]), true)
                            else
                                HealBot_Options_ActionIconsAlertFilterHideShow(hbv_ActionIcons_GetData("AlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]), false)
                            end
                        end
                    end
        info.checked=false;
        if hb_lVars["ActionIconsID"] == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_SelectAllSpellsCombo_list()
      --HealBot_setCall("HealBot_Options_SelectAllSpellsCombo_list")
    local tmpSpelllist={}
    for x,_ in pairs(HealBot_Options_NoDuplcates) do
        HealBot_Options_NoDuplcates[x]=nil
    end
    for kSpell,_ in pairs(HealBot_Spell_Names) do
        if not HealBot_Options_NoDuplcates[kSpell] then
            HealBot_Options_NoDuplcates[kSpell]=true
            table.insert(tmpSpelllist, kSpell)
        end
    end
    table.sort(tmpSpelllist)
    return tmpSpelllist
end

function HealBot_Options_SelectSpellsActionIcons_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_SelectSpellsActionIcons_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local spells=HealBot_Options_SelectAllSpellsCombo_list()
    if getn(spells)>10 then
        if level == 1 then
            for j=1, ceil(getn(spells)/10), 1 do
                local n=j*10
                if n > getn(spells) then n=getn(spells) end
                info.text="    "..((j*10)-9).." - "..n;
                info.hasArrow=true
                info.notCheckable=true
                info.menuList=j, true, j
                UIDropDownMenu_AddButton(info)
            end
        else
            local n=menuList*10
            if n > getn(spells) then n=getn(spells) end
            for j=((menuList*10)-9), n, 1 do
                local mText=spells[j]
                info.text=mText
                info.func=function(self)
                                hb_lVars["hbHelpActionIconsSpell"]=self:GetText()
                                hb_lVars["ActionIconsSpellsComboID"]=self:GetID()
                                UIDropDownMenu_SetText(HealBot_Options_SelectSpellsActionIcons,mText)
                            end
                info.checked=false;
                if hb_lVars["ActionIconsSpellsComboID"] == j then info.checked=true end
                UIDropDownMenu_AddButton(info, level)
            end
        end
    else
        for j=1, getn(spells), 1 do
            local sName=spells[j]
            info.text=sName
            info.func=function(self)
                            hb_lVars["hbHelpActionIconsSpell"]=self:GetText()
                            hb_lVars["ActionIconsSpellsComboID"]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_SelectSpellsActionIcons,sName)
                        end
            info.checked=false;
            if hb_lVars["ActionIconsSpellsComboID"] == j then info.checked=true; end
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_SelectMacrosActionIcons_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_SelectMacrosActionIcons_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local macroList=HealBot_Options_UpdateMacrosList()
    if getn(macroList)>10 then
        if level == 1 then
            for j=1, ceil(getn(macroList)/10), 1 do
                local n=j*10
                if n > getn(macroList) then n=getn(macroList) end
                info.text="    "..((j*10)-9).." - "..n;
                info.hasArrow=true
                info.notCheckable=true
                info.menuList=j, true, j
                UIDropDownMenu_AddButton(info)
            end
        else
            local n=menuList*10
            if n > getn(macroList) then n=getn(macroList) end
            for j=((menuList*10)-9), n, 1 do
                local mText=macroList[j]
                info.text=mText
                info.func=function(self)
                                hb_lVars["hbHelpActionIconsMacro"]=self:GetText()
                                hb_lVars["ActionIconsMacrosComboID"]=self:GetID()
                                UIDropDownMenu_SetText(HealBot_Options_SelectMacrosActionIcons,mText)
                            end
                info.checked=false;
                if hb_lVars["ActionIconsMacrosComboID"] == j then info.checked=true end
                UIDropDownMenu_AddButton(info, level)
            end
        end
    elseif getn(macroList)>0 then
        for j=1, getn(macroList), 1 do
            local mText=macroList[j]
            info.text=mText
            info.func=function(self)
                            hb_lVars["hbHelpActionIconsMacro"]=self:GetText()
                            hb_lVars["ActionIconsMacrosComboID"]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_SelectMacrosActionIcons,mText)
                        end
            info.checked=false;
            if hb_lVars["ActionIconsMacrosComboID"] == j then info.checked=true end
            UIDropDownMenu_AddButton(info)
        end
    else
        info.text=HEALBOT_TOOLTIP_NONE
        info.func=function(self)
                        UIDropDownMenu_SetText(HealBot_Options_SelectMacrosActionIcons,HEALBOT_TOOLTIP_NONE)
                    end
        info.checked=true;
        UIDropDownMenu_AddButton(info);
        hb_lVars["hbHelpActionIconsMacro"]=nil
    end
end

function HealBot_Options_SelectItemsActionIcons_DropDown()
      --HealBot_setCall("HealBot_Options_SelectItemsActionIcons_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local items=HealBot_Options_ItemsInBag(1)
    table.sort(items)
    for j=1, getn(items), 1 do
        local iName=items[j]
        info.text=iName
        info.func=function(self)
                        hb_lVars["hbHelpActionIconsItem"]=self:GetText()
                        hb_lVars["ActionIconsItemsComboID"]=self:GetID()
                        UIDropDownMenu_SetText(HealBot_Options_SelectItemsActionIcons,iName)
                    end
        info.checked=false;
        if hb_lVars["ActionIconsItemsComboID"] == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_AggroIndAnchor_DropDown()
      --HealBot_setCall("HealBot_Options_AggroIndAnchor_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AggroIndAnchor"]), 1 do
        info.text=HealBot_Options_Lists["AggroIndAnchor"][j]
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("Indicators", "AANCHOR", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "Indicators", "AANCHOR", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_AggroIndAnchor, HealBot_Options_Lists["AggroIndAnchor"][hbv_Skins_GetFrameVar("Indicators", "AANCHOR", hb_lVars["Frame"])])
                            HealBot_Options_framesChanged(false, false, true)
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Indicators", "AANCHOR", hb_lVars["Frame"]) == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_SelfCastIndAnchor_DropDown()
      --HealBot_setCall("HealBot_Options_SelfCastIndAnchor_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AggroIndAnchor"]), 1 do
        info.text=HealBot_Options_Lists["AggroIndAnchor"][j]
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("Indicators", "SANCHOR", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "Indicators", "SANCHOR", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_SelfCastIndAnchor, HealBot_Options_Lists["AggroIndAnchor"][hbv_Skins_GetFrameVar("Indicators", "SANCHOR", hb_lVars["Frame"])])
                            HealBot_Options_framesChanged(false, false, true)
                            HealBot_Timers_Set("AURA","UpdateAllBuffIcons")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Indicators", "SANCHOR", hb_lVars["Frame"]) == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_LowManaIndAnchor_DropDown()
      --HealBot_setCall("HealBot_Options_LowManaIndAnchor_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["IndicatorAnchor"]), 1 do
        info.text=HealBot_Options_Lists["IndicatorAnchor"][j]
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("Indicators", "MANCHOR", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "Indicators", "MANCHOR", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_LowManaIndAnchor, HealBot_Options_Lists["IndicatorAnchor"][hbv_Skins_GetFrameVar("Indicators", "MANCHOR", hb_lVars["Frame"])])
                            HealBot_Options_framesChanged(false, false, true)
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Indicators", "MANCHOR", hb_lVars["Frame"]) == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_PowerIndAnchor_DropDown()
      --HealBot_setCall("HealBot_Options_PowerIndAnchor_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["IndicatorAnchor"]), 1 do
        info.text=HealBot_Options_Lists["IndicatorAnchor"][j]
        info.func=function(self)
                        if hbv_Skins_GetFrameVar("Indicators", "PANCHOR", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Skins_SetFrameVar(self:GetID(), "Indicators", "PANCHOR", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_PowerIndAnchor, HealBot_Options_Lists["IndicatorAnchor"][hbv_Skins_GetFrameVar("Indicators", "PANCHOR", hb_lVars["Frame"])])
                            HealBot_Options_framesChanged(false, false, true)
                            HealBot_Timers_Set("SKINS","PowerIndicator")
                        end
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Indicators", "PANCHOR", hb_lVars["Frame"]) == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_ActionIconsNumber_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsNumber_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_ActionIcons_GetVars("NUMICONS", hb_lVars["Frame"])~=val then
        HealBot_ActionIcons_FrameNumIconsUpdate(hb_lVars["Frame"], val)
        hbv_ActionIcons_SetVars(val, "NUMICONS", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        if HealBot_Data["UILOCK"] then
            HealBot_Timers_Set("OOC","ActionIconsNumbers")
        else
            HealBot_ActionIcons_UpdateNumIcons(hb_lVars["Frame"])
        end
        HealBot_Options_FramesActionIconsSetLists(true)
    end
end

function HealBot_Options_ActionIconsDoubleRow_OnClick(self)
      --HealBot_setCall("HealBot_Options_ActionIconsDoubleRow_OnClick")
    if hbv_ActionIcons_GetBoolean("DOUBLEROW", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_ActionIcons_SetVars(self:GetChecked(), "DOUBLEROW", hb_lVars["Frame"])
        HealBot_ActionIcons_SetFramePoints(hb_lVars["Frame"])
    end
end

function HealBot_Options_ActionIconsSize_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsSize_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        if hbv_ActionIcons_GetVars("SIZE", hb_lVars["Frame"])~=val then
            hbv_ActionIcons_SetVars(val, "SIZE", hb_lVars["Frame"])
            HealBot_ActionIcons_SetFramePoints(hb_lVars["Frame"])
        end
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
    end
end

function HealBot_Options_ActionIconsSpace_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsSpace_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        if hbv_ActionIcons_GetVars("SPACE", hb_lVars["Frame"])~=val then
            hbv_ActionIcons_SetVars(val, "SPACE", hb_lVars["Frame"])
            HealBot_ActionIcons_SetFramePoints(hb_lVars["Frame"])
        end
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
    end
end

function HealBot_Options_ActionIconsOffsetX_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsOffsetX_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        if hbv_ActionIcons_GetVars("OFFSETX", hb_lVars["Frame"])~=val then
            hbv_ActionIcons_SetVars(val, "OFFSETX", hb_lVars["Frame"])
            HealBot_ActionIcons_SetFramePoints(hb_lVars["Frame"])
        end
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
    end
end

function HealBot_Options_ActionIconsOffsetY_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsOffsetY_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    else
        if hbv_ActionIcons_GetVars("OFFSETY", hb_lVars["Frame"])~=val then
            hbv_ActionIcons_SetVars(val, "OFFSETY", hb_lVars["Frame"])
            HealBot_ActionIcons_SetFramePoints(hb_lVars["Frame"])
        end
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
    end
end

function HealBot_Options_ActionIconsHighlight_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsHighlight_OnValueChanged")
    local val=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2)
    if hbv_ActionIcons_GetVars("HIGHLIGHT", hb_lVars["Frame"])~=val then
        hbv_ActionIcons_SetVars(val, "HIGHLIGHT", hb_lVars["Frame"])
        HealBot_ActionIcons_UpdateHighlight(hb_lVars["Frame"])
    end
end

function HealBot_Options_ActionIconsFade_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsFade_OnValueChanged")
    local val=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2)
    if hbv_ActionIcons_GetVars("FADE", hb_lVars["Frame"])~=val then
        hbv_ActionIcons_SetVars(val, "FADE", hb_lVars["Frame"])
        HealBot_ActionIcons_UpdateFade(hb_lVars["Frame"])
    end
end

function HealBot_Options_AggroIndVOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AggroIndVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Indicators", "AVOFF", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Indicators", "AVOFF", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, true)
    end
end

function HealBot_Options_SelfCastIndVOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_SelfCastIndVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Indicators", "SVOFF", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Indicators", "SVOFF", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, true)
        HealBot_Timers_Set("AURA","UpdateAllBuffIcons")
    end
end

function HealBot_Options_LowManaIndVOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_LowManaIndVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Indicators", "MVOFF", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Indicators", "MVOFF", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, true)
    end
end

function HealBot_Options_PowerIndVOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_PowerIndVOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Indicators", "PVOFF", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Indicators", "PVOFF", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, true)
        HealBot_Timers_Set("SKINS","PowerIndicator")
    end
end

function HealBot_Options_AggroIndHOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AggroIndHOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Indicators", "AHOFF", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Indicators", "AHOFF", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, true)
    end
end

function HealBot_Options_SelfCastIndHOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_SelfCastIndHOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Indicators", "SHOFF", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Indicators", "SHOFF", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, true)
        HealBot_Timers_Set("AURA","UpdateAllBuffIcons")
    end
end

function HealBot_Options_LowManaIndHOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_LowManaIndHOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Indicators", "MHOFF", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Indicators", "MHOFF", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, true)
    end
end

function HealBot_Options_PowerIndHOffset_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_PowerIndHOffset_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Indicators", "PHOFF", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Indicators", "PHOFF", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, true)
        HealBot_Timers_Set("SKINS","PowerIndicator")
    end
end

function HealBot_Options_AggroIndSize_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AggroIndSize_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Indicators", "ASIZE", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Indicators", "ASIZE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, true)
    end
end

function HealBot_Options_SelfCastIndSize_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_SelfCastIndSize_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Indicators", "SSIZE", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Indicators", "SSIZE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, true)
        HealBot_Timers_Set("AURA","UpdateAllBuffIcons")
    end
end

function HealBot_Options_LowManaIndSize_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_LowManaIndSize_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Indicators", "MSIZE", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Indicators", "MSIZE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, true)
    end
end

function HealBot_Options_PowerIndSize_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_PowerIndSize_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Indicators", "PSIZE", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Indicators", "PSIZE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, true)
        HealBot_Timers_Set("SKINS","PowerIndicator")
    end
end

function HealBot_Options_AggroIndSpace_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_AggroIndSpace_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Indicators", "ASPACE", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Indicators", "ASPACE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, true)
    end
end

function HealBot_Options_LowManaIndSpace_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_LowManaIndSpace_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Indicators", "MSPACE", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Indicators", "MSPACE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, true)
    end
end

function HealBot_Options_PowerIndSpace_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_PowerIndSpace_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_Skins_GetFrameVar("Indicators", "PSPACE", hb_lVars["Frame"])~=val then
        hbv_Skins_SetFrameVar(val, "Indicators", "PSPACE", hb_lVars["Frame"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_Options_framesChanged(false, false, true)
        HealBot_Timers_Set("SKINS","PowerIndicator")
    end
end

--------------------------------------------------------------------------------

hb_lVars["FilterHoTctlName"]=HealBot_Options_FilterHoTctl_List[1]
hb_lVars["FilterHoTctlNameTrim"]=hbv_GetClass("En", hb_lVars["FilterHoTctlName"])
hb_lVars["FilterHoTctlID"]=1
hb_lVars["HoTindex"]=1
hb_lVars["HoTname"]=""

function HealBot_Options_Class_HoTctlName_genList()
      --HealBot_setCall("HealBot_Options_Class_HoTctlName_genList")
--    local class=nil
    local tmpHoTctlName_List={}

    if hb_lVars["FilterHoTctlName"] == HEALBOT_CLASSES_ALL then
        table.insert(tmpHoTctlName_List, HEALBOT_CUSTOM_CAT_CUSTOM_AUTOBUFFS)
    end
    for xClass,_  in pairs(HealBot_Globals.WatchHoT) do
        if hbv_GetClass("En", hb_lVars["FilterHoTctlName"]) == xClass then
            for bId,_  in pairs(HealBot_Globals.WatchHoT[xClass]) do
                local bName=HealBot_Options_CDebuffTextID(bId) or " "
                if tonumber(bName) == nil then
                    table.insert(tmpHoTctlName_List, bName)
                else
                    HealBot_Options_DeleteBuffHoT(xClass, bId, bName)
                end
            end
        end
    end
    table.sort(tmpHoTctlName_List)
    local x=nil
    for j=1, getn(tmpHoTctlName_List), 1 do
        if tmpHoTctlName_List[j] == hb_lVars["HoTname"] then
            hb_lVars["HoTindex"]=j
            x=true
            break
        end
    end
    if not x then hb_lVars["HoTindex"]=1 end
    hb_lVars["HoTname"]=tmpHoTctlName_List[hb_lVars["HoTindex"]]
    return tmpHoTctlName_List
end

function HealBot_Options_SpellGetName(id)
      --HealBot_setCall("HealBot_Options_SpellGetName")
    local sName=id
    local sId=HealBot_Options_CDebuffGetId(id)
    if sId then
        local name, _, _, _, _, _, spellId=HealBot_WoWAPI_SpellInfo(sId)
        if name and spellId then sName=name end
    end
    return sName
end

function HealBot_Options_ResetBuff()
      --HealBot_setCall("HealBot_Options_ResetBuff")
    local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"])
    if sId then
        local sName=HealBot_Options_SpellGetName(sId)
        HealBot_Options_DeleteBuffHoTBtn_OnClick()
        HealBot_Options_NewHoTBuffBtn_OnClick(sName)
        HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
        HealBot_SetBuffBarColours();
    end
end

hb_lVars["numCustomBuffs"]=0
function HealBot_Options_BuffCatNameUpdate()
      --HealBot_setCall("HealBot_Options_BuffCatNameUpdate")
    if hb_lVars["numCustomBuffs"]>0 and hb_lVars["HoTname"]~=HEALBOT_CUSTOM_CAT_CUSTOM_AUTOBUFFS then
        HealBot_Options_DeleteBuffHoTBtn:Enable();
        HealBot_Options_ResetBuffBtn:Enable();
        HealBot_BuffCustomColorpickb:Enable()
        HealBot_Options_BuffHoTPresetColour:Enable()
        HealBot_Options_HoTctlActionCustom:Hide()
        HealBot_Options_HoTctlIDMethodCustom:Hide()
        HealBot_Options_BuffPriorityCustom:Hide()
        HealBot_Options_BuffFilterCustom:Hide()
        HealBot_Options_CustomBuffColCustom:Hide()
        HealBot_Options_CustomBuffIconGlowCustom:Hide()
        HealBot_Options_BuffIconSetCustom:Hide()
        HealBot_Options_EnableDisableBuffBtnCustom:Hide()
        HealBot_Options_BuffIconSet:Show()
        HealBot_Options_Class_HoTctlAction:Show()
        HealBot_Options_Class_HoTctlIDMethod:Show()
        HealBot_Options_BuffPriorityC:Show()
        HealBot_Options_BuffFilterC:Show()
        HealBot_Options_CustomBuffCol:Show()
        HealBot_Options_EnableDisableBuffBtn:Show()
        HealBot_Options_CustomBuffIconGlow:Show()
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_BuffHoTTag", true)
    else
        HealBot_Options_DeleteBuffHoTBtn:Disable();
        HealBot_Options_ResetBuffBtn:Disable();
        HealBot_Options_Class_HoTctlAction:Hide()
        HealBot_Options_Class_HoTctlIDMethod:Hide()
        HealBot_Options_BuffPriorityC:Hide()
        HealBot_Options_BuffFilterC:Hide()
        HealBot_Options_CustomBuffIconGlow:Hide()
        HealBot_Options_BuffIconSet:Hide()
        HealBot_Options_EnableDisableBuffBtn:Hide()
        HealBot_Options_HoTctlActionCustom:Show()
        HealBot_Options_HoTctlIDMethodCustom:Show()
        HealBot_Options_BuffIconSetCustom:Show()
        HealBot_Options_BuffPriorityCustom:Show()
        HealBot_Options_BuffFilterCustom:Show()
        HealBot_Options_CustomBuffIconGlowCustom:Show()
        HealBot_Options_EnableDisableBuffBtnCustom:Show()
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_BuffHoTTag", false)
        if hb_lVars["HoTname"] == HEALBOT_CUSTOM_CAT_CUSTOM_AUTOBUFFS then
            HealBot_Options_CustomBuffColCustom:Hide()
            HealBot_Options_BuffHoTPresetColour:Enable()
            HealBot_BuffCustomColorpickb:Enable()
            HealBot_Options_CustomBuffCol:Show()
        else
            HealBot_Options_CustomBuffColCustom:Show()
            HealBot_Options_BuffHoTPresetColour:Disable()
            HealBot_BuffCustomColorpickb:Disable()
            HealBot_Options_CustomBuffCol:Hide()
        end
    end
end

function HealBot_Options_Class_HoTctlName_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_Class_HoTctlName_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local HoTctlName_List=HealBot_Options_Class_HoTctlName_genList()
    if getn(HoTctlName_List) > 10 then
        if level == 1 then
            for j=1, ceil(getn(HoTctlName_List)/10), 1 do
                local n=j*10
                if n > getn(HoTctlName_List) then n=getn(HoTctlName_List) end
                info.text="    "..((j*10)-9).." - "..n;
                info.hasArrow=true
                info.notCheckable=true
                info.menuList=j, true, j
                UIDropDownMenu_AddButton(info)
            end
        else
            local n=menuList*10
            if n > getn(HoTctlName_List) then n=getn(HoTctlName_List) end
            for j=((menuList*10)-9), n, 1 do
                info.text=HoTctlName_List[j];
                info.func=function(self)
                                if hb_lVars["HoTindex"]~=self:GetID() or hb_lVars["HoTlvl"]~=menuList then
                                    hb_lVars["HoTlvl"]=menuList
                                    hb_lVars["HoTindex"]=self:GetID()
                                    hb_lVars["HoTname"]=self:GetText()
                                    UIDropDownMenu_SetText(HealBot_Options_Class_HoTctlName, hb_lVars["HoTname"])
                                    local spellId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"])
                                    HealBot_Options_NewAura_SetIcon("HealBot_Options_BuffShowIcon", spellId)
                                    HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
                                end
                            end
                info.checked=false;
                if hb_lVars["HoTname"] == HoTctlName_List[j] then info.checked=true; end
                UIDropDownMenu_AddButton(info, level);
            end
        end
    else
        for j=1, getn(HoTctlName_List), 1 do
            info.text=HoTctlName_List[j];
            info.func=function(self)
                            if hb_lVars["HoTindex"]~=self:GetID() then
                                hb_lVars["HoTindex"]=self:GetID()
                                hb_lVars["HoTname"]=self:GetText()
                                UIDropDownMenu_SetText(HealBot_Options_Class_HoTctlName, hb_lVars["HoTname"])
                                local spellId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"])
                                HealBot_Options_NewAura_SetIcon("HealBot_Options_BuffShowIcon", spellId)
                                HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
                            end
                        end
            info.checked=false;
            if hb_lVars["HoTname"] == HoTctlName_List[j] then info.checked=true; end
            UIDropDownMenu_AddButton(info);
        end
    end
end

--------------------------------------------------------------------------------

function HealBot_Options_Class_HoTctlIDMethod_DropDown()
      --HealBot_setCall("HealBot_Options_Class_HoTctlIDMethod_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    if hb_lVars["HoTname"] == HEALBOT_CUSTOM_CAT_CUSTOM_AUTOBUFFS then
        info.text=HEALBOT_OPTIONS_CUSTOM_IDMETHODSBOTH
        info.checked=true
        UIDropDownMenu_AddButton(info)
    else
        for j=1, getn(HealBot_Options_Class_HoTctlIDMethod_List), 1 do
            info.text=HealBot_Options_Class_HoTctlIDMethod_List[j]
            info.func=function(self)
                            local y=self:GetID()
                            local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"])
                            if y == 1 then
                                HealBot_Globals.CustomBuffIDMethod[sId]=y
                            else
                                HealBot_Globals.CustomBuffIDMethod[sId]=nil
                            end
                            UIDropDownMenu_SetText(HealBot_Options_Class_HoTctlIDMethod,HealBot_Options_Class_HoTctlIDMethod_List[j])
                            HealBot_Timers_Set("AURA","ConfigClassHoT")
                            HealBot_Timers_Set("AURA","BuffTagNames")
                        end
            info.checked=false;
            local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"]) or 0
            if (HealBot_Globals.CustomBuffIDMethod[sId] or 2) == j then info.checked=true; end
            UIDropDownMenu_AddButton(info);
        end
    end
    --HealBot_Options_BuffCatNameUpdate()
end

function HealBot_Options_Class_HoTctlAction_DropDown()
      --HealBot_setCall("HealBot_Options_Class_HoTctlAction_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    if hb_lVars["HoTname"] == HEALBOT_CUSTOM_CAT_CUSTOM_AUTOBUFFS then
        info.text="    "
        info.checked=false
        UIDropDownMenu_AddButton(info)
    else
        for j=1, getn(HealBot_Options_Class_HoTctlAction_List), 1 do
            if HealBot_Options_Class_HoTctlAction_List[j] then
                info.text=HealBot_Options_Class_HoTctlAction_List[j]
                info.func=function(self)
                                local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"])
                                if not hb_lVars["FilterHoTctlNameTrim"] then hb_lVars["FilterHoTctlNameTrim"]=hbv_GetClass("En", hb_lVars["FilterHoTctlName"]) end
                                if hb_lVars["FilterHoTctlNameTrim"] and HealBot_Globals.WatchHoT[hb_lVars["FilterHoTctlNameTrim"]] and sId then
                                    HealBot_Globals.WatchHoT[hb_lVars["FilterHoTctlNameTrim"]][sId]=self:GetID()
                                    UIDropDownMenu_SetText(HealBot_Options_Class_HoTctlAction,HealBot_Options_Class_HoTctlAction_List[j])
                                    HealBot_Timers_Set("AURA","ConfigClassHoT")
                                end
                            end
                info.checked=false;
                if not hb_lVars["FilterHoTctlNameTrim"] then hb_lVars["FilterHoTctlNameTrim"]=hbv_GetClass("En", hb_lVars["FilterHoTctlName"]) end
                if hb_lVars["FilterHoTctlNameTrim"] and HealBot_Globals.WatchHoT[hb_lVars["FilterHoTctlNameTrim"]] then
                    local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"])
                    if sId then
                        local x=HealBot_Globals.WatchHoT[hb_lVars["FilterHoTctlNameTrim"]][sId] or 1
                        if x == j then info.checked=true; end
                    end
                end
                UIDropDownMenu_AddButton(info);
            end
        end
        HealBot_Options_BuffCatNameUpdate()
    end
end

function HealBot_Options_BuffAuto_DropDown()
      --HealBot_setCall("HealBot_Options_BuffAuto_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["BuffsCustomAuto"]), 1 do
        info.text=HealBot_Options_Lists["BuffsCustomAuto"][j]
        info.func=function(self)
                        HealBot_Config_Buffs.AutoBuff=self:GetID()
                        UIDropDownMenu_SetText(HealBot_Options_BuffAuto,HealBot_Options_Lists["BuffsCustomAuto"][j])
                        HealBot_Timers_Set("AURA","ResetBuffCache")
                    end
        info.checked=false;
        if HealBot_Config_Buffs.AutoBuff == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
    --HealBot_Options_BuffCatNameUpdate()
end

function HealBot_Options_BuffAutoCastBy_DropDown()
      --HealBot_setCall("HealBot_Options_BuffAutoCastBy_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["BuffsCustomAutoCastBy"]), 1 do
        info.text=HealBot_Options_Lists["BuffsCustomAutoCastBy"][j]
        info.func=function(self)
                        HealBot_Config_Buffs.AutoBuffCastBy=self:GetID()
                        UIDropDownMenu_SetText(HealBot_Options_BuffAutoCastBy,HealBot_Options_Lists["BuffsCustomAutoCastBy"][j])
                        HealBot_Timers_Set("AURA","ResetBuffCache")
                    end
        info.checked=false;
        if HealBot_Config_Buffs.AutoBuffCastBy == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_DebuffSort_DropDown()
      --HealBot_setCall("HealBot_Options_DebuffSort_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AuraCustomSort"]), 1 do
        info.text=HealBot_Options_Lists["AuraCustomSort"][j]
        info.func=function(self)
                        if HealBot_Config_Cures.ListSortOrder~=self:GetID() then
                            HealBot_Config_Cures.ListSortOrder=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_DebuffSort,HealBot_Options_Lists["AuraCustomSort"][j])
                            HealBot_Timers_Set("AURA","CustomDebuffListPrep")
                        end
                    end
        info.checked=false;
        if HealBot_Config_Cures.ListSortOrder == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BuffSort_DropDown()
      --HealBot_setCall("HealBot_Options_BuffSort_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AuraCustomSort"]), 1 do
        info.text=HealBot_Options_Lists["AuraCustomSort"][j]
        info.func=function(self)
                        if HealBot_Config_Buffs.ListSortOrder~=self:GetID() then
                            HealBot_Config_Buffs.ListSortOrder=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_BuffSort,HealBot_Options_Lists["AuraCustomSort"][j])
                            HealBot_Timers_Set("AURA","CustomBuffListPrep")
                        end
                    end
        info.checked=false;
        if HealBot_Config_Buffs.ListSortOrder == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_DebuffFilter_TagList()
      --HealBot_setCall("HealBot_Options_DebuffFilter_TagList")
    local tagList={}
    local tagListSeen={}
    for _,tag in pairs(HealBot_Globals.CDCTag) do
        if string.len(tag)>0 and not tagListSeen[tag] then
            tagListSeen[tag]=true
            table.insert(tagList, tag)
        end
    end
    table.sort(tagList)
    return tagList
end

function HealBot_Options_DebuffFilter_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_DebuffFilter_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    info.keepShownOnClick=false
    if level == 1 then
        info.text=HEALBOT_WORDS_NONE
        info.func=function(self)
                        if HealBot_Config_Cures.ListSortFilter~=self:GetID() then
                            HealBot_Config_Cures.ListSortFilter=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_DebuffFilter, HEALBOT_WORDS_NONE)
                            HealBot_Timers_Set("AURA","CustomDebuffListPrep")
                        end
                    end
                    if HealBot_Config_Cures.ListSortFilter == 1 then info.checked=true end
        UIDropDownMenu_AddButton(info)
        wipe(info)
        info.disabled=true
        info.notCheckable=true
        UIDropDownMenu_AddButton(info)
        info.disabled=false
        info.hasArrow=true
        info.keepShownOnClick=false
        info.text="     "..HEALBOT_WORD_PRIORITY
        info.menuList=1
        UIDropDownMenu_AddButton(info)
        info.text="     "..HEALBOT_WORD_TAG
        info.menuList=2
        UIDropDownMenu_AddButton(info)
    elseif menuList == 1 then
        for j=1, getn(HealBot_Options_Lists["AuraCustomFilter"]), 1 do
            info.text=HealBot_Options_Lists["AuraCustomFilter"][j]
            info.func=function(self)
                        if HealBot_Config_Cures.ListSortFilter~=(self:GetID()+1) then
                            HealBot_Config_Cures.ListSortFilter=(self:GetID()+1)
                            UIDropDownMenu_SetText(HealBot_Options_DebuffFilter, HealBot_Options_Lists["AuraCustomFilter"][j])
                            HealBot_Timers_Set("AURA","CustomDebuffListPrep")
                        end
                    end
            info.checked=false;
            if HealBot_Config_Cures.ListSortFilter == j+1 then info.checked=true; end
            UIDropDownMenu_AddButton(info, level)
        end
    elseif menuList == 2 then
        local tags=HealBot_Options_DebuffFilter_TagList()
        for j=1, getn(tags), 1 do
            info.text=tags[j]
            info.func=function(self)
                            if HealBot_Config_Cures.ListSortFilter<7 or HealBot_Config_Cures.ListSortFilterTag~=self:GetText() then
                                HealBot_Config_Cures.ListSortFilter=7
                                HealBot_Config_Cures.ListSortFilterTag=self:GetText()
                                UIDropDownMenu_SetText(HealBot_Options_DebuffFilter, HealBot_Config_Cures.ListSortFilterTag)
                                HealBot_Timers_Set("AURA","CustomDebuffListPrep")
                            end
                        end
            info.checked=false;
            if HealBot_Config_Cures.ListSortFilter == 7 and HealBot_Config_Cures.ListSortFilterTag == tags[j] then info.checked=true; end
            UIDropDownMenu_AddButton(info, level)
        end
    end
end

function HealBot_Options_BuffFilter_TagList()
      --HealBot_setCall("HealBot_Options_BuffFilter_TagList")
    local tagList={}
    local tagListSeen={}
    for _,tag in pairs(HealBot_Globals.CustomBuffTag) do
        if string.len(tag)>2 and not tagListSeen[tag] then
            tagListSeen[tag]=true
            table.insert(tagList, tag)
        end
    end
    table.sort(tagList)
    return tagList
end

function HealBot_Options_BuffFilter_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_BuffFilter_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    info.keepShownOnClick=false
    if level == 1 then
        info.text=HEALBOT_WORDS_NONE
        info.func=function(self)
                        if HealBot_Config_Buffs.ListSortFilter~=self:GetID() then
                            HealBot_Config_Buffs.ListSortFilter=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_BuffFilter, HEALBOT_WORDS_NONE)
                            HealBot_Timers_Set("AURA","CustomBuffListPrep")
                        end
                    end
                    if HealBot_Config_Buffs.ListSortFilter == 1 then info.checked=true end
        UIDropDownMenu_AddButton(info)
        wipe(info)
        info.disabled=true
        info.notCheckable=true
        UIDropDownMenu_AddButton(info)
        info.disabled=false
        info.hasArrow=true
        info.keepShownOnClick=false
        info.text="     "..HEALBOT_WORD_PRIORITY
        info.menuList=1
        UIDropDownMenu_AddButton(info)
        info.text="     "..HEALBOT_WORD_TAG
        info.menuList=2
        UIDropDownMenu_AddButton(info)
    elseif menuList == 1 then
        for j=1, getn(HealBot_Options_Lists["AuraCustomFilter"]), 1 do
            info.text=HealBot_Options_Lists["AuraCustomFilter"][j]
            info.func=function(self)
                        if HealBot_Config_Buffs.ListSortFilter~=(self:GetID()+1) then
                            HealBot_Config_Buffs.ListSortFilter=(self:GetID()+1)
                            UIDropDownMenu_SetText(HealBot_Options_BuffFilter, HealBot_Options_Lists["AuraCustomFilter"][j])
                            HealBot_Timers_Set("AURA","CustomBuffListPrep")
                        end
                    end
            info.checked=false;
            if HealBot_Config_Buffs.ListSortFilter == j+1 then info.checked=true; end
            UIDropDownMenu_AddButton(info, level)
        end
    elseif menuList == 2 then
        local tags=HealBot_Options_BuffFilter_TagList()
        for j=1, getn(tags), 1 do
            info.text=tags[j]
            info.func=function(self)
                            if HealBot_Config_Buffs.ListSortFilter<7 or HealBot_Config_Buffs.ListSortFilterTag~=self:GetText() then
                                HealBot_Config_Buffs.ListSortFilter=7
                                HealBot_Config_Buffs.ListSortFilterTag=self:GetText()
                                UIDropDownMenu_SetText(HealBot_Options_BuffFilter, HealBot_Config_Buffs.ListSortFilterTag)
                                HealBot_Timers_Set("AURA","CustomBuffListPrep")
                            end
                        end
            info.checked=false;
            if HealBot_Config_Buffs.ListSortFilter == 7 and HealBot_Config_Buffs.ListSortFilterTag == tags[j] then info.checked=true; end
            UIDropDownMenu_AddButton(info, level)
        end
    end
end

--------------------------------------------------------------------------------

function HealBot_Options_FilterHoTctl_DropDown()
      --HealBot_setCall("HealBot_Options_FilterHoTctl_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    table.sort(HealBot_Options_FilterHoTctl_List)
    for j=1, getn(HealBot_Options_FilterHoTctl_List), 1 do
        info.text=HealBot_Options_FilterHoTctl_List[j];
        info.func=function(self)
                        if hb_lVars["FilterHoTctlName"]~=self.value then
                            hb_lVars["FilterHoTctlName"]=self.value
                            hb_lVars["FilterHoTctlID"]=self:GetID()
                            hb_lVars["FilterHoTctlNameTrim"]=hbv_GetClass("En", hb_lVars["FilterHoTctlName"])
                            UIDropDownMenu_SetText(HealBot_Options_FilterHoTctl,hb_lVars["FilterHoTctlName"])
                            HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
                        end
                    end
        info.checked=false;
        if hb_lVars["FilterHoTctlName"] == HealBot_Options_FilterHoTctl_List[j] then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end


hb_lVars["custombufftextpage"]=1
local hbCustomBuffList={}
local hbCustomBuffOrder={}
local hbCustomBuffIDs={}
function HealBot_Options_sortCustomBuffList(bID, bName, prio)
      --HealBot_setCall("HealBot_Options_sortCustomBuffList")
    if not hbCustomBuffList[bID] then hbCustomBuffList[bID]={} end
    hbCustomBuffList[bID]["Prio"]=prio
    hbCustomBuffList[bID]["Name"]=HealBot_WoWAPI_SpellName(bID) or bName
    if HealBot_Globals.CustomBuffTag[bID] and string.len(HealBot_Globals.CustomBuffTag[bID])>2 then
        hbCustomBuffList[bID]["Tag"]=HealBot_Globals.CustomBuffTag[bID]
    else
        hbCustomBuffList[bID]["Tag"]=""
    end
    if HealBot_Config_Buffs.ListSortOrder == 1 then  -- Prio
        if prio<10 then
            hbCustomBuffOrder[bID]="0"..prio..bName
        else
            hbCustomBuffOrder[bID]=prio..bName
        end
    elseif HealBot_Config_Buffs.ListSortOrder == 2 then  -- Name
        hbCustomBuffOrder[bID]=bName
    else  -- Tag
        if prio<10 then
            hbCustomBuffOrder[bID]=hbCustomBuffList[bID]["Tag"].."0"..prio..bName
        else
            hbCustomBuffOrder[bID]=hbCustomBuffList[bID]["Tag"]..prio..bName
        end
    end
    table.insert(hbCustomBuffIDs, bID)
end

function HealBot_Options_prepCustomBuffList()
      --HealBot_setCall("HealBot_Options_prepCustomBuffList")
    local dName, dTag="", ""
    local cusPrio=nil
    for x,_ in pairs(hbCustomBuffIDs) do
        hbCustomBuffIDs[x]=nil;
    end
    for xClass,_  in pairs(HealBot_Globals.WatchHoT) do
        for bID,_  in pairs(HealBot_Globals.WatchHoT[xClass]) do
            local bName=HealBot_Options_CDebuffTextID(bID)
            if tonumber(bName) == nil then
                if bName == HEALBOT_CUSTOM_CAT_CUSTOM_AUTOMATIC then bID="Auto" end
                cusPrio=HealBot_Globals.CustomBuffs[bID] or 20
                if HealBot_Config_Buffs.ListSortFilter == 1 then
                    HealBot_Options_sortCustomBuffList(bID, bName, cusPrio)
                elseif HealBot_Config_Buffs.ListSortFilter == 2 then
                    if cusPrio<5 then
                        HealBot_Options_sortCustomBuffList(bID, bName, cusPrio)
                    end
                elseif HealBot_Config_Buffs.ListSortFilter == 3 then
                    if cusPrio>4 and cusPrio<9 then
                        HealBot_Options_sortCustomBuffList(bID, bName, cusPrio)
                    end
                elseif HealBot_Config_Buffs.ListSortFilter == 4 then
                    if cusPrio>8 and cusPrio<13 then
                        HealBot_Options_sortCustomBuffList(bID, bName, cusPrio)
                    end
                elseif HealBot_Config_Buffs.ListSortFilter == 5 then
                    if cusPrio>12 and cusPrio<17 then
                        HealBot_Options_sortCustomBuffList(bID, bName, cusPrio)
                    end
                elseif HealBot_Config_Buffs.ListSortFilter == 6 then
                    if cusPrio>16 then
                        HealBot_Options_sortCustomBuffList(bID, bName, cusPrio)
                    end
                elseif HealBot_Globals.CustomBuffTag[bID] and strtrim(HealBot_Config_Buffs.ListSortFilterTag) == strtrim(HealBot_Globals.CustomBuffTag[bID]) then
                    HealBot_Options_sortCustomBuffList(bID, bName, cusPrio)
                end
            else
                HealBot_Options_DeleteBuffHoT(xClass, bID, bName)
            end
        end
    end
    table.sort(hbCustomBuffIDs,function (a,b)
        if not hbCustomBuffOrder[a] or not hbCustomBuffOrder[b] then
            return false
        else
            if hbCustomBuffOrder[a]<hbCustomBuffOrder[b] then return true end
            if hbCustomBuffOrder[a]>hbCustomBuffOrder[b] then return false end
            if type(a) == type(b) then
                return a<b
            else
                return false
            end
        end
    end)
    HealBot_Options_setCustomBuffList()
end

function HealBot_Options_setCustomBuffList()
      --HealBot_setCall("HealBot_Options_setCustomBuffList")
    local startEntry=((hb_lVars["custombufftextpage"]-1)*15)+1
    local endEntry=hb_lVars["custombufftextpage"]*15
    local x=1
    for j=startEntry,endEntry do
        x=(j-((hb_lVars["custombufftextpage"]-1)*15))
        if hbCustomBuffIDs[j] then
            hbCustomBuff_Text[x]["Prio"]:SetText(hbCustomBuffList[hbCustomBuffIDs[j]]["Prio"])
            if tonumber(hbCustomBuffIDs[j]) then
                hbCustomBuff_Text[x]["ID"]:SetText(hbCustomBuffIDs[j])
            else
                hbCustomBuff_Text[x]["ID"]:SetText("-")
            end
            hbCustomBuff_Text[x]["Name"]:SetText(hbCustomBuffList[hbCustomBuffIDs[j]]["Name"])
            hbCustomBuff_Text[x]["Tag"]:SetText(hbCustomBuffList[hbCustomBuffIDs[j]]["Tag"])
            local z=hbCustomBuffIDs[j]
            local r,g,b=0,0,0
            if HealBot_Globals.CustomBuffBarColour[z] then
                r=HealBot_Globals.CustomBuffBarColour[z].R or 0.25
                g=HealBot_Globals.CustomBuffBarColour[z].G or 0.58
                b=HealBot_Globals.CustomBuffBarColour[z].B or 0.8
            else
                r=HealBot_Globals.CustomBuffBarColour[customBuffPriority].R or 0.25
                g=HealBot_Globals.CustomBuffBarColour[customBuffPriority].G or 0.58
                b=HealBot_Globals.CustomBuffBarColour[customBuffPriority].B or 0.8
            end
            if r<0.2 and g<0.2 and b<0.2 then
                r=r+0.4
                g=g+0.4
                b=b+0.4
            elseif r<0.3 and g<0.3 and b<0.3 then
                r=r+0.3
                g=g+0.3
                b=b+0.3
            elseif r<0.4 and g<0.4 and b<0.4 then
                r=r+0.2
                g=g+0.2
                b=b+0.2
            elseif r<0.5 and g<0.5 and b<0.5 then
                r=r+0.1
                g=g+0.1
                b=b+0.1
            end
            hbCustomBuff_Text[x]["Prio"]:SetTextColor(r,g,b,1)
            hbCustomBuff_Text[x]["ID"]:SetTextColor(r,g,b,1)
            hbCustomBuff_Text[x]["Name"]:SetTextColor(r,g,b,1)
            hbCustomBuff_Text[x]["Tag"]:SetTextColor(r,g,b,1)
        else
            hbCustomBuff_Text[x]["Prio"]:SetText("")
            hbCustomBuff_Text[x]["ID"]:SetText("")
            hbCustomBuff_Text[x]["Name"]:SetText("")
            hbCustomBuff_Text[x]["Tag"]:SetText("")
        end
    end
    if hbCustomBuffIDs[endEntry+1] then
        HealBot_Options_PageNextCBuffBtn:Enable()
    else
        HealBot_Options_PageNextCBuffBtn:Disable()
    end
    if hb_lVars["custombufftextpage"] == 1 then
        HealBot_Options_PagePrevCBuffBtn:Disable()
    end

    HealBot_Options_SetLabel("HealBot_Options_PageCBuff",HEALBOT_OPTIONS_PAGE.." "..hb_lVars["custombufftextpage"])
end

function HealBot_Options_PageNextCBuff()
      --HealBot_setCall("HealBot_Options_PageNextCBuff")
    hb_lVars["custombufftextpage"]=hb_lVars["custombufftextpage"]+1
    HealBot_Options_PagePrevCBuffBtn:Enable()
    HealBot_Timers_Set("AURA","CustomBuffList")
end

function HealBot_Options_PagePrevCBuff()
      --HealBot_setCall("HealBot_Options_PagePrevCBuff")
    if hb_lVars["custombufftextpage"]>1 then
        hb_lVars["custombufftextpage"]=hb_lVars["custombufftextpage"]-1
    end
    HealBot_Timers_Set("AURA","CustomBuffList")
end

hb_lVars["ActionIconsListStart"]=1
function HealBot_Options_SetSkinsFrameActionIconsListPageButtons()
      --HealBot_setCall("HealBot_Options_SetSkinsFrameActionIconsListPageButtons")
    if hb_lVars["ActionIconsListStart"]>1 then
        HealBot_Options_SkinsFrameActionIconsListPageBack:Enable()
        HealBot_Options_SkinsFrameActionIconsListPageForward:Disable()
        HealBot_Options_SetLabel("HealBot_Options_PageActionIcons",HEALBOT_OPTIONS_PAGE.." 2")
    else
        HealBot_Options_SkinsFrameActionIconsListPageBack:Disable()
        HealBot_Options_SkinsFrameActionIconsListPageForward:Enable()
        HealBot_Options_SetLabel("HealBot_Options_PageActionIcons",HEALBOT_OPTIONS_PAGE.." 1")
    end
end

function HealBot_Options_UpdateActionIconsListStart(v)
      --HealBot_setCall("HealBot_Options_UpdateActionIconsListStart")
    if hb_lVars["ActionIconsListStart"]~=v then
        for x=hb_lVars["ActionIconsListStart"],hb_lVars["ActionIconsListStart"]+9 do
            hbActionIcons_Text[x]["ID"]:SetText("")
            hbActionIcons_Text[x]["Ability"]:SetText("")
            hbActionIcons_Text[x]["Target"]:SetText("")
            hbActionIcons_Text[x]["Bind"]:SetText("")
        end
        hb_lVars["ActionIconsListStart"]=v
        HealBot_Options_SetSkinsFrameActionIconsListPageButtons()
        HealBot_Options_FramesActionIconsSetLists()
    end
end

function HealBot_Options_SetActionIconsList()
      --HealBot_setCall("HealBot_Options_SetActionIconsList")
    local hbAbility=HEALBOT_WORDS_UNSET
    local hbTarget=HEALBOT_WORDS_UNSET
    local hbBind=HEALBOT_WORDS_UNSET
    local isUnit=false
    HealBot_ActionIcons_ValidateTarget(hb_lVars["Frame"])
    for x=hb_lVars["ActionIconsListStart"],hb_lVars["ActionIconsListStart"]+9 do
        hbAbility=HealBot_ActionIcons_GetSpell(hbv_ActionIcons_GetData("Ability", hb_lVars["Frame"], x))
        if not hbAbility then hbAbility=HEALBOT_WORDS_UNSET end
        hbTarget, isUnit=HealBot_ActionIcons_ReturnTarget(hb_lVars["Frame"], x)
        if hbv_ActionIcons_DataExists("bKey", hb_lVars["Frame"], x) then
            hbBind=hbv_ActionIcons_GetData("bKey", hb_lVars["Frame"], x)
        else
            hbBind=HEALBOT_WORDS_UNSET
        end
        if string.len(hbTarget)<1 then hbTarget=HEALBOT_WORDS_UNSET end
        hbActionIcons_Text[x]["ID"]:SetText(x)
        hbActionIcons_Text[x]["Ability"]:SetText(hbAbility)
        hbActionIcons_Text[x]["Target"]:SetText(hbTarget)
        hbActionIcons_Text[x]["Bind"]:SetText(hbBind)

        if x>hbv_ActionIcons_GetVars("NUMICONS", hb_lVars["Frame"]) then
            hbActionIcons_Text[x]["ID"]:SetTextColor(0.5,0.5,0.5,0.7)
            hbActionIcons_Text[x]["Ability"]:SetTextColor(0.5,0.5,0.5,0.7)
            hbActionIcons_Text[x]["Target"]:SetTextColor(0.5,0.5,0.5,0.7)
            hbActionIcons_Text[x]["Bind"]:SetTextColor(0.5,0.5,0.5,0.7)
        else
            hbActionIcons_Text[x]["ID"]:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                                                     OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                                                     OptionThemes[HealBot_Globals.OptionsTheme]["B"],1)
            if HealBot_Spells_KnownByName(hbAbility) then
                hbActionIcons_Text[x]["Ability"]:SetTextColor(1,1,1,1)
            elseif GetMacroIndexByName(hbAbility)>0 then
                hbActionIcons_Text[x]["Ability"]:SetTextColor(0.2,1,0.5,1)
            elseif HealBot_IsKnownItem(hbAbility) then
                hbActionIcons_Text[x]["Ability"]:SetTextColor(0.2,0.5,1,1)
            else
                hbActionIcons_Text[x]["Ability"]:SetTextColor(0.58,0.58,0.58,0.9)
            end
            if isUnit or HealBot_Panel_RaidUnitName(hbTarget) then
                hbActionIcons_Text[x]["Target"]:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                                                             OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                                                             OptionThemes[HealBot_Globals.OptionsTheme]["B"],1)
            else
                hbActionIcons_Text[x]["Target"]:SetTextColor(0.58,0.58,0.58,0.9)
            end
            if hbBind == HEALBOT_WORDS_UNSET then
                hbActionIcons_Text[x]["Bind"]:SetTextColor(0.58,0.58,0.58,0.9)
            else
                hbActionIcons_Text[x]["Bind"]:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                                                           OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                                                           OptionThemes[HealBot_Globals.OptionsTheme]["B"],1)
            end
        end
    end
end

--------------------------------------------------------------------------------
hb_lVars["MaxClassicAuxBarAssign"]=20
function HealBot_Options_Aux1Assign_GenList(frame)
      --HealBot_setCall("HealBot_Options_Aux1Assign_GenList")
    local list={}
    if frame == 10 then
        for j=1, 4 do
            list[j]=HealBot_Options_AuxAssign_List[j]
        end
        list[5]=HEALBOT_OPTIONS_CASTBAR
        list[6]=HEALBOT_OUTOFRANGE_LABEL
        list[7]=HEALBOT_INRANGE
        list[8]=HEALBOT_OPTION_HEALTHDROP
        list[9]=HEALBOT_OPTIONS_TAB_NAMETEXT
        list[10]=HEALBOT_WORD_HEALTH
        list[11]=HEALBOT_OPTIONS_TAB_STATETEXT
    elseif HEALBOT_GAME_VERSION<4 then
        for j=1, hb_lVars["MaxClassicAuxBarAssign"] do
            list[j]=HealBot_Options_AuxAssign_List[j]
        end
        list[17]=HEALBOT_OPTION_HEALTHDROP
        list[18]=HEALBOT_OPTIONS_TAB_NAMETEXT
        list[19]=HEALBOT_WORD_HEALTH
        list[20]=HEALBOT_OPTIONS_TAB_STATETEXT
        list[21]=HEALBOT_OPTIONS_PLUGINTXT
    else
        list=HealBot_Options_AuxAssign_List
    end
    return list
end

function HealBot_Options_AuxDefaultShowText(frame, use, id)
      --HealBot_setCall("HealBot_Options_AuxDefaultShowText")
    if frame == 10 then
        if use == 4 or use == 5 then
            hbv_Data_AuxSetBarVar(true, "TEXT", frame, id)
        else
            hbv_Data_AuxSetBarVar(false, "TEXT", frame, id)
        end
    elseif HealBot_Globals.AuxTextPrefs[use]~=nil then
        hbv_Data_AuxSetBarVar(HealBot_Globals.AuxTextPrefs[use], "TEXT", frame, id)
    elseif use == 4 or use == 9 or use == 10 or use == 11 or use == 16 then
        hbv_Data_AuxSetBarVar(true, "TEXT", frame, id)
        HealBot_Globals.AuxTextPrefs[use]=true
    else
        hbv_Data_AuxSetBarVar(false, "TEXT", frame, id)
        HealBot_Globals.AuxTextPrefs[use]=false
    end
end

function HealBot_Options_AuxAssign_DropDown(object, id)
      --HealBot_setCall("HealBot_Options_AuxAssign_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local list=HealBot_Options_Aux1Assign_GenList(hb_lVars["Frame"])
    for j=1, getn(list), 1 do
        info.text=list[j];
        info.func=function(self)
                        if hbv_Aux_GetBarVar("USE", hb_lVars["Frame"], id)~=self:GetID() then
                            hbv_Data_AuxSetBarVar(self:GetID(), "USE", hb_lVars["Frame"], id)
                            UIDropDownMenu_SetText(object,list[hbv_Aux_GetBarVar("USE", hb_lVars["Frame"], id)])
                            HealBot_Action_InitAuxGlow(id, hb_lVars["Frame"])
                            HealBot_Options_AuxDefaultShowText(hb_lVars["Frame"], self:GetID(), id)
                            HealBot_Options_clearAuxBars(hb_lVars["Frame"],id)
                        end
                    end
        info.checked=false;
        if hbv_Aux_GetBarVar("USE", hb_lVars["Frame"], id) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_Aux1Assign_DropDown()
      --HealBot_setCall("HealBot_Options_Aux1Assign_DropDown")
    HealBot_Options_AuxAssign_DropDown(HealBot_Options_Aux1Assign, 1)
end

function HealBot_Options_Aux2Assign_DropDown()
      --HealBot_setCall("HealBot_Options_Aux2Assign_DropDown")
    HealBot_Options_AuxAssign_DropDown(HealBot_Options_Aux2Assign, 2)
end

function HealBot_Options_Aux3Assign_DropDown()
      --HealBot_setCall("HealBot_Options_Aux3Assign_DropDown")
    HealBot_Options_AuxAssign_DropDown(HealBot_Options_Aux3Assign, 3)
end

function HealBot_Options_Aux4Assign_DropDown()
      --HealBot_setCall("HealBot_Options_Aux4Assign_DropDown")
    HealBot_Options_AuxAssign_DropDown(HealBot_Options_Aux4Assign, 4)
end

function HealBot_Options_Aux5Assign_DropDown()
      --HealBot_setCall("HealBot_Options_Aux5Assign_DropDown")
    HealBot_Options_AuxAssign_DropDown(HealBot_Options_Aux5Assign, 5)
end

function HealBot_Options_Aux6Assign_DropDown()
      --HealBot_setCall("HealBot_Options_Aux6Assign_DropDown")
    HealBot_Options_AuxAssign_DropDown(HealBot_Options_Aux6Assign, 6)
end

function HealBot_Options_Aux7Assign_DropDown()
      --HealBot_setCall("HealBot_Options_Aux7Assign_DropDown")
    HealBot_Options_AuxAssign_DropDown(HealBot_Options_Aux7Assign, 7)
end

function HealBot_Options_Aux8Assign_DropDown()
      --HealBot_setCall("HealBot_Options_Aux8Assign_DropDown")
    HealBot_Options_AuxAssign_DropDown(HealBot_Options_Aux8Assign, 8)
end

function HealBot_Options_Aux9Assign_DropDown()
      --HealBot_setCall("HealBot_Options_Aux9Assign_DropDown")
    HealBot_Options_AuxAssign_DropDown(HealBot_Options_Aux9Assign, 9)
end

function HealBot_Options_AuxOverlap_DropDown()
      --HealBot_setCall("HealBot_Options_AuxOverlap_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_AuxOverlap_List), 1 do
        info.text=HealBot_Options_AuxOverlap_List[j];
        info.func=function(self)
                        if hbv_Aux_GetOverlayVar("OVERLAP", hb_lVars["Frame"])~=self:GetID() then
                            hbv_Aux_SetOverlayVar(self:GetID(), "OVERLAP", hb_lVars["Frame"])
                            UIDropDownMenu_SetText(HealBot_Options_AuxOverlap,HealBot_Options_AuxOverlap_List[hbv_Aux_GetOverlayVar("OVERLAP", hb_lVars["Frame"])])
                            --HealBot_Timers_Set("AUX","ResetBars")
                            HealBot_Options_framesChanged(true, false, false, false, true)
                        end
                    end
        info.checked=false;
        if hbv_Aux_GetOverlayVar("OVERLAP", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

local function HealBot_Options_AuxConfigBarChangeOverlayShowHide(show)
      --HealBot_setCall("HealBot_Options_AuxConfigBarChangeOverlayShowHide")
    local overlayAggro=_G["HealBot_Options_SkinBarAuxBarOverlayAggro"]
    local overlayHighlight=_G["HealBot_Options_SkinBarAuxBarOverlayHighlight"]
    local overlayTarget=_G["HealBot_Options_SkinBarAuxBarOverlayTarget"]
    local overlayOOR=_G["HealBot_Options_SkinBarAuxBarOverlayOOR"]
    local overlayRecentHeals=_G["HealBot_Options_SkinBarAuxBarOverlayRecentHeals"]
    local overlayHealthDrop=_G["HealBot_Options_SkinBarAuxBarOverlayHealthDrop"]
    local overlayBuff=_G["HealBot_Options_SkinBarAuxBarOverlayBuff"]
    local overlayDebuff=_G["HealBot_Options_SkinBarAuxBarOverlayDebuff"]
    if show then
        overlayAggro:Show()
        overlayHighlight:Show()
        overlayTarget:Show()
        overlayOOR:Show()
        overlayRecentHeals:Show()
        overlayHealthDrop:Show()
        overlayBuff:Show()
        overlayDebuff:Show()
        HealBot_Options_SkinBarAuxBarOverlayRecentHeals:SetChecked(hbv_Aux_GetOverlayBoolean("OVERLAYRECENTHEALS", hb_lVars["Frame"]))
        HealBot_Options_SkinBarAuxBarOverlayHealthDrop:SetChecked(hbv_Aux_GetOverlayBoolean("OVERLAYHEALTHDROP", hb_lVars["Frame"]))
        HealBot_Options_SkinBarAuxBarOverlayAggro:SetChecked(hbv_Aux_GetOverlayBoolean("OVERLAYAGGRO", hb_lVars["Frame"]))
        HealBot_Options_SkinBarAuxBarOverlayDebuff:SetChecked(hbv_Aux_GetOverlayBoolean("OVERLAYDEBUFF", hb_lVars["Frame"]))
        HealBot_Options_SkinBarAuxBarOverlayHighlight:SetChecked(hbv_Aux_GetOverlayBoolean("OVERLAYHIGHLIGHT", hb_lVars["Frame"]))
        HealBot_Options_SkinBarAuxBarOverlayTarget:SetChecked(hbv_Aux_GetOverlayBoolean("OVERLAYTARGET", hb_lVars["Frame"]))
        HealBot_Options_SkinBarAuxBarOverlayOOR:SetChecked(hbv_Aux_GetOverlayBoolean("OVERLAYOOR", hb_lVars["Frame"]))
        HealBot_Options_SkinBarAuxBarOverlayBuff:SetChecked(hbv_Aux_GetOverlayBoolean("OVERLAYBUFF", hb_lVars["Frame"]))
    else
        overlayAggro:Hide()
        overlayHighlight:Hide()
        overlayTarget:Hide()
        overlayOOR:Hide()
        overlayRecentHeals:Hide()
        overlayHealthDrop:Hide()
        overlayBuff:Hide()
        overlayDebuff:Hide()
    end
end

local function HealBot_Options_AuxConfigBarChange()
      --HealBot_setCall("HealBot_Options_AuxConfigBarChange")
    local assignment=hbv_Aux_GetBarVar("USE", hb_lVars["Frame"], hb_lVars["AuxBar"])
    HealBot_Options_AuxBarOutline:SetChecked(hbv_Aux_GetBarVar("OUTLINE", hb_lVars["Frame"], hb_lVars["AuxBar"]))
    HealBot_Options_AuxBarColour.initialize=HealBot_Options_AuxBarColour_DropDown
    UIDropDownMenu_SetText(HealBot_Options_AuxBarColour,HealBot_Options_AuxBarColours_List[hbv_Aux_GetBarVar("COLOUR", hb_lVars["Frame"], hb_lVars["AuxBar"])])
    HealBot_Options_AuxBarOpacityType.initialize=HealBot_Options_AuxBarOpacityType_DropDown
    UIDropDownMenu_SetText(HealBot_Options_AuxBarOpacityType,HealBot_Options_AuxBarOpacityType_List[hbv_Aux_GetBarVar("OTYPE", hb_lVars["Frame"], hb_lVars["AuxBar"])])
    HealBot_Options_AuxBarAnchor.initialize=HealBot_Options_AuxBarAnchor_DropDown
    UIDropDownMenu_SetText(HealBot_Options_AuxBarAnchor,HealBot_Options_AuxBarAnchor_List[hbv_Aux_GetBarVar("ANCHOR", hb_lVars["Frame"], hb_lVars["AuxBar"])])
    if HealBot_Options_AuxBarSize:GetValue()~=hbv_Aux_GetBarVar("SIZE", hb_lVars["Frame"], hb_lVars["AuxBar"]) then
        HealBot_Options_AuxBarSize:SetValue(hbv_Aux_GetBarVar("SIZE", hb_lVars["Frame"], hb_lVars["AuxBar"]))
    end
    HealBot_Options_SetText(HealBot_Options_AuxBarSize, HEALBOT_OPTIONS_TXTSIZE.." ("..(hbv_Aux_GetBarVar("SIZE", hb_lVars["Frame"], hb_lVars["AuxBar"])*100).."%)")
    if HealBot_Options_AuxBarOpacityCustom:GetValue()~=hbv_Aux_GetBarVar("A", hb_lVars["Frame"], hb_lVars["AuxBar"]) then
        HealBot_Options_AuxBarOpacityCustom:SetValue(hbv_Aux_GetBarVar("A", hb_lVars["Frame"], hb_lVars["AuxBar"]))
    end
    if HealBot_Options_AuxBarDepth:GetValue()~=hbv_Aux_GetBarVar("DEPTH", hb_lVars["Frame"], hb_lVars["AuxBar"]) then
        HealBot_Options_AuxBarDepth:SetValue(hbv_Aux_GetBarVar("DEPTH", hb_lVars["Frame"], hb_lVars["AuxBar"]))
    end
    HealBot_Options_SetText(HealBot_Options_AuxBarDepth, HEALBOT_OPTIONS_TXTDEPTH..": "..hbv_Aux_GetBarVar("DEPTH", hb_lVars["Frame"], hb_lVars["AuxBar"]))
    if HealBot_Options_AuxBarOffset:GetValue()~=hbv_Aux_GetBarVar("OFFSET", hb_lVars["Frame"], hb_lVars["AuxBar"]) then
        HealBot_Options_AuxBarOffset:SetValue(hbv_Aux_GetBarVar("OFFSET", hb_lVars["Frame"], hb_lVars["AuxBar"]))
    end
    HealBot_Options_SetText(HealBot_Options_AuxBarOffset, HEALBOT_OPTIONS_TXTOFFSET..": "..hbv_Aux_GetBarVar("OFFSET", hb_lVars["Frame"], hb_lVars["AuxBar"]))
    HealBot_AuxBarCustomColour:SetStatusBarColor(
        hbv_Aux_GetBarVar("R", hb_lVars["Frame"], hb_lVars["AuxBar"]),
        hbv_Aux_GetBarVar("G", hb_lVars["Frame"], hb_lVars["AuxBar"]),
        hbv_Aux_GetBarVar("B", hb_lVars["Frame"], hb_lVars["AuxBar"]));

    local list=HealBot_Options_Aux1Assign_GenList(hb_lVars["Frame"])
    local fstr=_G["HealBot_AuxBarsConfigAssign2_FontStr"]
    fstr:SetText(list[assignment])
    
    hb_lVars["AuxBarsFlash"]=false
    local monly=_G["HealBot_Options_SkinBarAuxBarManaOnly"]
    local honly=_G["HealBot_Options_SkinBarAuxBarHealersManaOnly"]
    if assignment == 4 then
        monly:Show()
        honly:Show()
        HealBot_Options_SkinBarAuxBarManaOnly:SetChecked(hbv_Aux_GetBarBoolean("MANAONLY", hb_lVars["Frame"], hb_lVars["AuxBar"]))
        HealBot_Options_SkinBarAuxBarHealersManaOnly:SetChecked(hbv_Aux_GetBarBoolean("HEALERSMANAONLY", hb_lVars["Frame"], hb_lVars["AuxBar"]))
    else
        monly:Hide()
        honly:Hide()
    end
    if hb_lVars["Frame"] == 10 then
        if assignment>8 and assignment<11 then
            HealBot_Options_AuxConfigBarChangeOverlayShowHide(true)
        else
            HealBot_Options_AuxConfigBarChangeOverlayShowHide(false)
        end
    elseif hb_lVars["Frame"]>7 then
        if assignment>13 and assignment<16 then
            HealBot_Options_AuxConfigBarChangeOverlayShowHide(true)
        else
            HealBot_Options_AuxConfigBarChangeOverlayShowHide(false)
        end
    elseif HEALBOT_GAME_VERSION>3 then
        if assignment>18 and assignment<21 then
            HealBot_Options_AuxConfigBarChangeOverlayShowHide(true)
        else
            HealBot_Options_AuxConfigBarChangeOverlayShowHide(false)
        end
    else
        if assignment>17 and assignment<20 then
            HealBot_Options_AuxConfigBarChangeOverlayShowHide(true)
        else
            HealBot_Options_AuxConfigBarChangeOverlayShowHide(false)
        end
    end
    for x=1,9 do
        fstr=_G["HealBot_Aux"..x.."Config_FontStr1"]
        fstr:SetText(HEALBOT_WORD_ANCHOR.." |cffffffff"..HealBot_Options_AuxBarAnchor_List[hbv_Aux_GetBarVar("ANCHOR", hb_lVars["Frame"], x)])
        if hbv_Aux_GetBarVar("USE", hb_lVars["Frame"], x)>1 and
           hbv_Aux_GetBarVar("OTYPE", hb_lVars["Frame"], x) == 2 then
            hb_lVars["AuxBarsFlash"]=true
        end
    end
    HealBot_Timers_Set("SKINS","FluidFlashInUse",true)
end

local function HealBot_Options_AuxConfigTxtChange()
      --HealBot_setCall("HealBot_Options_AuxConfigTxtChange")
    local assignment=hbv_Aux_GetBarVar("USE", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])
    UIDropDownMenu_SetText(HealBot_Options_AuxTextSelect1,HealBot_Options_Lists["AuxConfigSelect"][hb_lVars["AuxTxtBar"]])
    UIDropDownMenu_SetText(HealBot_Options_AuxTextSelect2,HealBot_Options_Lists["AuxConfigSelect"][hb_lVars["AuxTxtBar"]])
    UIDropDownMenu_SetText(HealBot_Options_AuxTextAlign,HealBot_Options_Lists["BarNameTextAnchor"][hbv_Aux_GetBarTextVar("ALIGN", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])])
    HealBot_Options_UpdateMediaFont(HealBot_Options_AuxFontName,hbv_Aux_GetBarTextVar("FONT", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]))
    HealBot_Options_AuxFontHeight:SetValue(hbv_Aux_GetBarTextVar("HEIGHT", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]))
    HealBot_Options_SetText(HealBot_Options_AuxFontHeight, HEALBOT_OPTIONS_SKINFHEIGHT..": "..hbv_Aux_GetBarTextVar("HEIGHT", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]))
    HealBot_Options_AuxFontOffset:SetValue(hbv_Aux_GetBarTextVar("OFFSET", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]))
    HealBot_Options_SetText(HealBot_Options_AuxFontOffset,HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_Aux_GetBarTextVar("OFFSET", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]))
    HealBot_Options_AuxFontHOffset:SetValue(hbv_Aux_GetBarTextVar("HOFFSET", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]))
    HealBot_Options_SetText(HealBot_Options_AuxFontHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_Aux_GetBarTextVar("HOFFSET", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]))
    HealBot_Options_AuxMaxChars:SetValue(hbv_Aux_GetBarTextVar("MAXCHARS", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]))
    if hbv_Aux_GetBarTextVar("MAXCHARS", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]) == 0 then
        HealBot_Options_SetText(HealBot_Options_AuxMaxChars, HEALBOT_OPTIONS_MAXCHARS .. ": "..HEALBOT_WORD_AUTO)
    else
        HealBot_Options_SetText(HealBot_Options_AuxMaxChars, HEALBOT_OPTIONS_MAXCHARS .. ": ".. hbv_Aux_GetBarTextVar("MAXCHARS", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]))
    end
    HealBot_Options_AuxTextOutLine:SetValue(hbv_Aux_GetBarTextVar("OUTLINE", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]))
    HealBot_Options_SetText(HealBot_Options_AuxTextOutLine, HEALBOT_OPTIONS_SKINFOUTLINE .. ": ".. HealBot_Options_FontOutline_List[hbv_Aux_GetBarTextVar("OUTLINE", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])])
    UIDropDownMenu_SetText(HealBot_Options_AuxTextColour, HealBot_Options_AuxBarColours_List[hbv_Aux_GetBarTextVar("COLTYPE", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])])
    HealBot_AuxTextCustomColourt:SetTextColor(
        hbv_Aux_GetBarTextVar("COLR", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]),
        hbv_Aux_GetBarTextVar("COLG", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]),
        hbv_Aux_GetBarTextVar("COLB", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]),
        hbv_Aux_GetBarTextVar("COLA", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]))
    HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_AuxTextAlpha,HEALBOT_OPTIONS_BARALPHA,0,1,0.01,5)
    HealBot_Options_AuxTextAlpha:SetValue(hbv_Aux_GetBarTextVar("COLA", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]));
    HealBot_Options_Pct_OnValueChanged(HealBot_Options_AuxTextAlpha)
    HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_AuxTextDisAlpha,HEALBOT_OPTIONS_BARALPHADIS,0,1,0.01,5)
    HealBot_Options_AuxTextDisAlpha:SetValue(hbv_Aux_GetBarTextVar("COLDA", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]));
    HealBot_Options_Pct_OnValueChanged(HealBot_Options_AuxTextDisAlpha)
    HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_AuxTextOORAlpha,HEALBOT_OPTIONS_BARALPHAEOR,0,1,0.01,5)
    HealBot_Options_AuxTextOORAlpha:SetValue(hbv_Aux_GetBarTextVar("COLOA", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]));
    HealBot_Options_Pct_OnValueChanged(HealBot_Options_AuxTextOORAlpha)
    local list=HealBot_Options_Aux1Assign_GenList(hb_lVars["Frame"])
    local fstr=_G["HealBot_AuxTextConfigAssign1_FontStr2"]
    fstr:SetText(list[assignment])
    fstr=_G["HealBot_AuxTextConfigAssign2_FontStr2"]
    fstr:SetText(list[assignment])
    if (hb_lVars["Frame"] == 10 and assignment>8) or
       (hb_lVars["Frame"]<10 and assignment>18 and HEALBOT_GAME_VERSION>3) or
       (hb_lVars["Frame"]<10 and assignment>17 and HEALBOT_GAME_VERSION<4) then
        if (hb_lVars["Frame"]<10 and assignment > 21 and HEALBOT_GAME_VERSION>3) or
           (hb_lVars["Frame"]<10 and assignment > 20 and HEALBOT_GAME_VERSION<4) then
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTextOnAuxBar",true)
        else
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTextOnAuxBar",false)
        end
        HealBot_Options_ShowTextOnAuxBar:SetChecked(true)
    elseif (hb_lVars["Frame"] == 10 and (assignment>5 and assignment<9)) or
           (hb_lVars["Frame"]<10 and (assignment == 5 or assignment == 8 or (assignment>11 and assignment<16))) or
           (hb_lVars["Frame"]<10 and HEALBOT_GAME_VERSION>3 and assignment == 18) or
           (hb_lVars["Frame"]<10 and HEALBOT_GAME_VERSION<4 and assignment == 17) then
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTextOnAuxBar",false)
        HealBot_Options_ShowTextOnAuxBar:SetChecked(false)
    else
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTextOnAuxBar",true)
        HealBot_Options_ShowTextOnAuxBar:SetChecked(hbv_Aux_GetBarBoolean("TEXT", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]))
    end
    if hbv_Aux_GetBarVar("ANCHOR", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])>2 and hbv_Aux_GetBarVar("ANCHOR", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])<5 then
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_VerticalTextOnAuxBar",true)
    else
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_VerticalTextOnAuxBar",false)
    end
end

function HealBot_Options_clearAuxBars(frame,id)
      --HealBot_setCall("HealBot_Options_clearAuxBars")
    HealBot_Aux_clearAggroAssigned(frame,id)
    HealBot_Aux_clearAuraAssigned(frame,id)
    HealBot_Aux_clearHighlightAssigned(frame,id)
    HealBot_Aux_clearTargetAssigned(frame,id)
    HealBot_Aux_clearOORAssigned(frame,id)
    HealBot_Aux_clearInRangeAssigned(frame,id)
    HealBot_Aux_clearRecentHealsAssigned(frame,id)
    HealBot_Aux_clearHealthDropAssigned(frame,id)
    HealBot_Aux_clearNameAssigned(frame,id)
    HealBot_Aux_clearHealthAssigned(frame,id)
    HealBot_Aux_clearStateAssigned(frame,id)
    HealBot_Aux_clearResAssigned(frame,id)
    HealBot_Aux_clearSummonsAssigned(frame,id)
    HealBot_Aux_clearInHealsAssigned(frame,id)
    HealBot_Aux_clearPowerAssigned(frame,id)
    HealBot_Aux_clearPowerAltAssigned(button)
    HealBot_Aux_clearOverHealAssigned(frame,id)
    HealBot_Aux_clearCastBarAssigned(frame,id)
    HealBot_Aux_clearTotalHealAbsorbsAssigned(frame,id)
    HealBot_Aux_clearPluginAssigned(button)
    if frame then
        HealBot_Options_setAuxBars(frame,id)
        HealBot_Aux_UpdateAllAuxByType(frame, id)
        HealBot_Options_framesChanged(true, false, false, false, true)
    else
        HealBot_Aux_resetAllBars()
    end
    HealBot_Options_AuxConfigBarChange()
    HealBot_Options_AuxConfigTxtChange()
end

local function HealBot_Options_setAuxBarsByID(f,x)
      --HealBot_setCall("HealBot_Options_setAuxBarsByID")
    if hbv_Aux_GetBarVar("USE", f, x)>1 then
        if hbv_Aux_GetBarVar("USE", f, x) == 2 then
            HealBot_Aux_setInHealsAssigned("ABSORB", f, x)
        elseif hbv_Aux_GetBarVar("USE", f, x) == 3 then
            HealBot_Aux_setInHealsAssigned("INHEAL", f, x)
        elseif hbv_Aux_GetBarVar("USE", f, x) == 4 then
            HealBot_Aux_setPowerAssigned(f, x)  -- Power
        elseif f<10 then
            if hbv_Aux_GetBarVar("USE", f, x) == 5 then
                HealBot_Aux_setAggroAssigned("AGGRO", f, x)
            elseif hbv_Aux_GetBarVar("USE", f, x) == 6 then
                HealBot_Aux_setAggroAssigned("THREAT", f, x)
            elseif hbv_Aux_GetBarVar("USE", f, x) == 7 then
                HealBot_Aux_setOverHealAssigned(f, x) -- OverHeal
            elseif hbv_Aux_GetBarVar("USE", f, x) == 8 then
                HealBot_Aux_setHighlightAssigned(f, x)  -- Highlight
            elseif hbv_Aux_GetBarVar("USE", f, x) == 9 then
                HealBot_Aux_setAuraAssigned("BUFF", f, x)
            elseif hbv_Aux_GetBarVar("USE", f, x) == 10 then
                HealBot_Aux_setAuraAssigned("DEBUFF", f, x)
            elseif hbv_Aux_GetBarVar("USE", f, x) == 11 then
                HealBot_Aux_setCastBarAssigned(f, x)
            elseif hbv_Aux_GetBarVar("USE", f, x) == 12 then
                HealBot_Aux_setTargetAssigned(f, x)
            elseif hbv_Aux_GetBarVar("USE", f, x) == 13 then
                HealBot_Aux_setOORAssigned(f, x)
            elseif hbv_Aux_GetBarVar("USE", f, x) == 14 then
                HealBot_Aux_setInRangeAssigned(f, x)
            elseif hbv_Aux_GetBarVar("USE", f, x) == 15 then
                HealBot_Aux_setRecentHealsAssigned(f, x)
            elseif hbv_Aux_GetBarVar("USE", f, x) == 16 then
                HealBot_Aux_setResAssigned(f, x)
            elseif HEALBOT_GAME_VERSION<4 then
                if hbv_Aux_GetBarVar("USE", f, x) == 17 then
                    HealBot_Aux_setHealthDropAssigned(f, x)
                elseif hbv_Aux_GetBarVar("USE", f, x) == 18 then
                    HealBot_Aux_setNameAssigned(f, x)
                elseif hbv_Aux_GetBarVar("USE", f, x) == 19 then
                    HealBot_Aux_setHealthAssigned(f, x)
                elseif hbv_Aux_GetBarVar("USE", f, x) == 20 then
                    HealBot_Aux_setStateAssigned(f, x)
                elseif hbv_Aux_GetBarVar("USE", f, x) == 21 then
                    HealBot_Aux_setPluginAssigned(f, x)
                end
            else
                if hbv_Aux_GetBarVar("USE", f, x) == 17 then
                    HealBot_Aux_setSummonsAssigned(f, x)
                elseif hbv_Aux_GetBarVar("USE", f, x) == 18 then
                    HealBot_Aux_setHealthDropAssigned(f, x)
                elseif hbv_Aux_GetBarVar("USE", f, x) == 19 then
                    HealBot_Aux_setNameAssigned(f, x)
                elseif hbv_Aux_GetBarVar("USE", f, x) == 20 then
                    HealBot_Aux_setHealthAssigned(f, x)
                elseif hbv_Aux_GetBarVar("USE", f, x) == 21 then
                    HealBot_Aux_setStateAssigned(f, x)
                elseif hbv_Aux_GetBarVar("USE", f, x) == 22 then
                    HealBot_Aux_setTotalHealAbsorbsAssigned(f, x)
                elseif hbv_Aux_GetBarVar("USE", f, x) == 23 then
                    HealBot_Aux_setPluginAssigned(f, x)
                elseif hbv_Aux_GetBarVar("USE", f, x) == 24 then
                    HealBot_Aux_setPowerAltAssigned(f, x)
                end
            end
        elseif hbv_Aux_GetBarVar("USE", f, x) == 5 then
            HealBot_Aux_setCastBarAssigned(f, x)
        elseif hbv_Aux_GetBarVar("USE", f, x) == 6 then
            HealBot_Aux_setOORAssigned(f, x)
        elseif hbv_Aux_GetBarVar("USE", f, x) == 7 then
            HealBot_Aux_setInRangeAssigned(f, x)
        elseif hbv_Aux_GetBarVar("USE", f, x) == 8 then
            HealBot_Aux_setHealthDropAssigned(f, x)
        elseif hbv_Aux_GetBarVar("USE", f, x) == 9 then
            HealBot_Aux_setNameAssigned(f, x)
        elseif hbv_Aux_GetBarVar("USE", f, x) == 10 then
            HealBot_Aux_setHealthAssigned(f, x)
        elseif hbv_Aux_GetBarVar("USE", f, x) == 11 then
            HealBot_Aux_setStateAssigned(f, x)
        end
    end
end

function HealBot_Options_setAuxBars(frame,id)
      --HealBot_setCall("HealBot_Options_setAuxBars")
    if frame and id then
        HealBot_Options_setAuxBarsByID(frame,id)
    else
        for f=1,10 do
            for x=1,9 do
                HealBot_Options_setAuxBarsByID(f,x)
            end
        end
    end
end

function HealBot_Options_AuxBarOpacityType_DropDown()
      --HealBot_setCall("HealBot_Options_AuxBarOpacityType_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_AuxBarOpacityType_List), 1 do
        info.text=HealBot_Options_AuxBarOpacityType_List[j];
        info.func=function(self)
                        if hbv_Aux_GetBarVar("OTYPE", hb_lVars["Frame"], hb_lVars["AuxBar"])~=self:GetID() then
                            if hbv_Aux_GetBarVar("OTYPE", hb_lVars["Frame"], hb_lVars["AuxBar"]) == 2 then
                                HealBot_Aux_resetFrameBar(hb_lVars["Frame"], hb_lVars["AuxBar"])
                            end
                            hbv_Data_AuxSetBarVar(self:GetID(), "OTYPE", hb_lVars["Frame"], hb_lVars["AuxBar"])
                            UIDropDownMenu_SetText(HealBot_Options_AuxBarOpacityType,HealBot_Options_AuxBarOpacityType_List[hbv_Aux_GetBarVar("OTYPE", hb_lVars["Frame"], hb_lVars["AuxBar"])])
                            HealBot_Aux_UpdateAllAuxByType(hb_lVars["Frame"], hb_lVars["AuxBar"])
                        end
                    end
        info.checked=false;
        if hbv_Aux_GetBarVar("OTYPE", hb_lVars["Frame"], hb_lVars["AuxBar"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_AuxConfigBar_DropDown()
      --HealBot_setCall("HealBot_Options_AuxConfigBar_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AuxConfigSelect"]), 1 do
        info.text=HealBot_Options_Lists["AuxConfigSelect"][j];
        info.func=function(self)
                        if hb_lVars["AuxBar"]~=self:GetID() then
                            hb_lVars["AuxBar"]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_AuxConfigBar,HealBot_Options_Lists["AuxConfigSelect"][hb_lVars["AuxBar"]])
                            HealBot_Options_AuxConfigBarChange()
                        end
                    end
        info.checked=false;
        if hb_lVars["AuxBar"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_AuxTextSelect_DropDown(object)
      --HealBot_setCall("HealBot_Options_AuxTextSelect_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AuxConfigSelect"]), 1 do
        info.text=HealBot_Options_Lists["AuxConfigSelect"][j];
        info.func=function(self)
                        if hb_lVars["AuxTxtBar"]~=self:GetID() then
                            hb_lVars["AuxTxtBar"]=self:GetID()
                            UIDropDownMenu_SetText(object,HealBot_Options_Lists["AuxConfigSelect"][hb_lVars["AuxTxtBar"]])
                            HealBot_Options_AuxConfigTxtChange()
                        end
                    end
        info.checked=false;
        if hb_lVars["AuxTxtBar"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_AuxTextSelect1_DropDown()
      --HealBot_setCall("HealBot_Options_AuxTextSelect1_DropDown")
    HealBot_Options_AuxTextSelect_DropDown(HealBot_Options_AuxTextSelect1)
end

function HealBot_Options_AuxTextSelect2_DropDown()
      --HealBot_setCall("HealBot_Options_AuxTextSelect2_DropDown")
    HealBot_Options_AuxTextSelect_DropDown(HealBot_Options_AuxTextSelect2)
end

function HealBot_Options_AuxBarColour_DropDown()
      --HealBot_setCall("HealBot_Options_AuxBarColour_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_AuxBarColours_List), 1 do
        info.text=HealBot_Options_AuxBarColours_List[j];
        info.func=function(self)
                        if hbv_Aux_GetBarVar("COLOUR", hb_lVars["Frame"], hb_lVars["AuxBar"])~=self:GetID() then
                            hbv_Data_AuxSetBarVar(self:GetID(), "COLOUR", hb_lVars["Frame"], hb_lVars["AuxBar"])
                            UIDropDownMenu_SetText(HealBot_Options_AuxBarColour,HealBot_Options_AuxBarColours_List[hbv_Aux_GetBarVar("COLOUR", hb_lVars["Frame"], hb_lVars["AuxBar"])])
                            HealBot_Aux_UpdateAllAuxByType(hb_lVars["Frame"], hb_lVars["AuxBar"])
                            if hb_lVars["TestBarsOn"] and HealBot_Action_FrameIsVisible(hb_lVars["Frame"]) then HealBot_Timers_Set("AUX","TestUpdate") end
                        end
                    end
        info.checked=false;
        if hbv_Aux_GetBarVar("COLOUR", hb_lVars["Frame"], hb_lVars["AuxBar"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end


function HealBot_Options_AuxBarAnchor_DropDown()
      --HealBot_setCall("HealBot_Options_AuxBarAnchor_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_AuxBarAnchor_List), 1 do
        info.text=HealBot_Options_AuxBarAnchor_List[j];
        info.func=function(self)
                        if hbv_Aux_GetBarVar("ANCHOR", hb_lVars["Frame"], hb_lVars["AuxBar"])~=self:GetID() then
                            hbv_Data_AuxSetBarVar(self:GetID(), "ANCHOR", hb_lVars["Frame"], hb_lVars["AuxBar"])
                            UIDropDownMenu_SetText(HealBot_Options_AuxBarAnchor,HealBot_Options_AuxBarAnchor_List[hbv_Aux_GetBarVar("ANCHOR", hb_lVars["Frame"], hb_lVars["AuxBar"])])
                            HealBot_Aux_UpdateAllAuxByType(hb_lVars["Frame"], hb_lVars["AuxBar"])
                            HealBot_Panel_SkinResetFrame(hb_lVars["Frame"])
                            HealBot_Options_framesChanged(true, false, false, false, true)
                        end
                    end
        info.checked=false;
        if hbv_Aux_GetBarVar("ANCHOR", hb_lVars["Frame"], hb_lVars["AuxBar"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

--------------------------------------------------------------------------------
function HealBot_Options_AggroAlertLevel_DropDown()
      --HealBot_setCall("HealBot_Options_AggroAlertLevel_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_AggroAlertLevel_List), 1 do
        info.text=HealBot_Options_AggroAlertLevel_List[j];
        info.func=function(self)
                        hbv_Skins_SetFrameVar(self:GetID(), "BarAggro", "ALERT", hb_lVars["Frame"])
                        UIDropDownMenu_SetText(HealBot_Options_AggroAlertLevel,HealBot_Options_AggroAlertLevel_List[hbv_Skins_GetFrameVar("BarAggro", "ALERT", hb_lVars["Frame"])])
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarAggro", "ALERT", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_AggroIndAlertLevel_DropDown()
      --HealBot_setCall("HealBot_Options_AggroIndAlertLevel_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AggroIndAlertLevel"]), 1 do
        info.text=HealBot_Options_Lists["AggroIndAlertLevel"][j];
        info.func=function(self)
                        hbv_Skins_SetFrameVar(self:GetID(), "BarAggro", "ALERTIND", hb_lVars["Frame"])
                        UIDropDownMenu_SetText(HealBot_Options_AggroIndAlertLevel,HealBot_Options_Lists["AggroIndAlertLevel"][hbv_Skins_GetFrameVar("BarAggro", "ALERTIND", hb_lVars["Frame"])])
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("BarAggro", "ALERTIND", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

--------------------------------------------------------------------------------

function HealBot_Options_DoEffects_DropDowns()
      --HealBot_setCall("HealBot_Options_DoEffects_DropDowns")
    HealBot_Options_UseFocusGroups.initialize=HealBot_Options_UseFocusGroups_DropDown
    HealBot_Options_UseOverrideFocusGroups.initialize=HealBot_Options_UseOverrideFocusGroups_DropDown
    HealBot_Options_HotBarDebuffPrio.initialize=HealBot_Options_HotBarDebuffPrio_DropDown
    HealBot_Options_GroupHealthRange.initialize=HealBot_Options_GroupHealthRange_DropDown
    HealBot_Options_OverrideHotBarDebuffPrio.initialize=HealBot_Options_OverrideHotBarDebuffPrio_DropDown
    HealBot_Options_OverrideGroupHealthRange.initialize=HealBot_Options_OverrideGroupHealthRange_DropDown
    if HealBot_Globals.OverrideEffects["USEBARS"] == 2 then
        UIDropDownMenu_SetText(HealBot_Options_UseOverrideFocusGroups, HealBot_Options_UseOverrideFocusGroups_List[HealBot_Globals.OverrideEffects["FOCUSGROUPS"]])
        UIDropDownMenu_SetText(HealBot_Options_OverrideHotBarDebuffPrio, HealBot_Options_Lists["HotBarsDebuffPrio"][HealBot_Globals.OverrideEffects["HOTBARDEBUFF"]])
        UIDropDownMenu_SetText(HealBot_Options_OverrideGroupHealthRange, HealBot_Options_Lists["GroupHealthRange"][HealBot_Globals.OverrideEffects["GHRANGE"]])
        UIDropDownMenu_SetText(HealBot_Options_UseFocusGroups," ")
        UIDropDownMenu_SetText(HealBot_Options_HotBarDebuffPrio," ")
        UIDropDownMenu_SetText(HealBot_Options_GroupHealthRange," ")
    else
        UIDropDownMenu_SetText(HealBot_Options_UseFocusGroups, HealBot_Options_UseOverrideFocusGroups_List[hbv_Skins_GetVar("General", "FOCUSGROUPS")])
        UIDropDownMenu_SetText(HealBot_Options_HotBarDebuffPrio, HealBot_Options_Lists["HotBarsDebuffPrio"][hbv_Skins_GetVar("General", "HOTBARDEBUFF")])
        UIDropDownMenu_SetText(HealBot_Options_GroupHealthRange, HealBot_Options_Lists["GroupHealthRange"][hbv_Skins_GetVar("General", "GHRANGE")])
        UIDropDownMenu_SetText(HealBot_Options_UseOverrideFocusGroups," ")
        UIDropDownMenu_SetText(HealBot_Options_OverrideHotBarDebuffPrio," ")
        UIDropDownMenu_SetText(HealBot_Options_OverrideGroupHealthRange," ")
    end
end

--------------------------------------------------------------------------------

function HealBot_Options_Skins_DropDown()
      --HealBot_setCall("HealBot_Options_Skins_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(Healbot_Config_Skins.Skins), 1 do
        info.text=Healbot_Config_Skins.Skins[j];
        info.func=function(self)
                        if Healbot_Config_Skins.Skin_ID~=self:GetID() then
                            Healbot_Config_Skins.Skin_ID=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_SelectSkin,Healbot_Config_Skins.Skins[Healbot_Config_Skins.Skin_ID])
                            if self:GetID()>=1 then HealBot_Options_Set_Current_Skin(self:GetText(), true) end
                        end
                    end
        info.checked=false;
        if Healbot_Config_Skins.Skin_ID == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_DoSet_Current_Skin(newSkin, ddRefresh, noCallback, optSetSkins)
      --HealBot_setCall("HealBot_Options_DoSet_Current_Skin")
    if newSkin then
        HealBot_Panel_resetInitFrames()
        local hbFoundSkin=nil
        local hbValidSkins=nil
        for j=1, getn(Healbot_Config_Skins.Skins), 1 do
            if newSkin == Healbot_Config_Skins.Skins[j] then
                hbFoundSkin=true
                Healbot_Config_Skins.Skin_ID=j
                if Healbot_Config_Skins.Current_Skin~=Healbot_Config_Skins.Skins[j] then
                    Healbot_Config_Skins.Current_Skin=Healbot_Config_Skins.Skins[j]
                    HealBot_ActionIcons_ConditionsDelAll()
                    HealBot_Panel_SkinReset()
                    for j=1,10 do
                        HealBot_Action_HidePanel(j, true)
                    end
                    HealBot_Aux_setLuVars("FluidInUse", false)
                    HealBot_Action_setLuVars("FluidInUse", false)
                    HealBot_Skins_Check(Healbot_Config_Skins.Current_Skin)
                    HealBot_Options_CopyActionIconsProfile(Healbot_Config_Skins.Current_Skin)
                    HealBot_Config.LastAutoSkinChangeTime=GetTime()+300
                    optSetSkins=true
                    HealBot_setLuVars("showReloadMsg", true)
                    HealBot_Action_setLuVars("resetIcon", true)
                    HealBot_Action_setLuVars("resetSkin", true)
                    HealBot_Action_setLuVars("resetIndicator", true)
                    HealBot_Action_setLuVars("resetText", true)
                    --HealBot_Action_setLuVars("resetAux", true)
                    HealBot_Update_ResetrCalls()
                    HealBot_Timers_ToggleBlizzardFrames()
                    HealBot_Timers_Set("SKINS","EmergHealthCol")
                    HealBot_Timers_Set("SKINS","SetAdaptive")
                    HealBot_Timers_Set("SKINS","SkinChangePluginUpdate",true)
                    HealBot_Timers_Set("INIT","SeparateInHealsAbsorbs")
                    HealBot_Timers_Set("LAST","CheckFramesOnCombat")
                    HealBot_Timers_Set("LAST","DisableAllButtonGlow")
                    HealBot_Timers_Set("LAST","DisableAllIconGlow")
                    HealBot_Timers_Set("OOC","EventsSetFrameUnits")
                    HealBot_ActionIcons_UpdateNumIconsAll()
                    --HealBot_Timers_Set("LAST","UpdateFramesOpacity",true)
                    if HealBot_Globals.OverrideColours["USECLASS"] == 1 then
                        HealBot_Timers_Set("LAST","ClassColourUpdate")
                    end
                    if HealBot_Globals.OverrideColours["USEROLE"] == 1 then
                        HealBot_Timers_Set("LAST","RoleColourUpdate")
                    end
                    if HealBot_Globals.OverrideColours["USEPOWER"] == 1 then
                        HealBot_Timers_Set("LAST","PowerColourUpdate")
                    end
                    HealBot_Skins_ResetSkin("init")
                    --if not ddRefresh then
                        --HealBot_Timers_Set("AURA","ResetClassIconTexture",true)
                    --end
                    HealBot_setLuVars("TargetNeedReset", true)
                    HealBot_setLuVars("FocusNeedReset", true)
                    HealBot_setLuVars("newSkin", true)
                    HealBot_Timers_Set("OOC","PlayersTargetsReset")
                    if HealBot_Data["TIPUSE"] then HealBot_Tooltip_CustomAnchor_Hide() end
                    HealBot_Timers_InitExtraOptions()
                    HealBot_Timers_Set("SKINS","VarsHasSkin")
                    HealBot_Timers_Set("SKINS","TagWithName")
                    HealBot_Timers_Set("SKINS","ResetClassRoleIcons")
                    HealBot_Timers_Set("SKINS","ResetRankIcons")
                    HealBot_Timers_Set("SKINS","ResetTargetIcons")
                    HealBot_Timers_Set("SKINS","ResetReadyCheckIcons")
                    HealBot_Timers_Set("SKINS","PostChange",true)
                   -- HealBot_AddDebug("Update Skins","Frame",true)
                    HealBot_Timers_TurboOn()
                    hb_lVars["SetNewSkin"]=true
                end
            end
            if hbValidSkins then
                hbValidSkins=hbValidSkins.."  +  "..Healbot_Config_Skins.Skins[j]
            else
                hbValidSkins=Healbot_Config_Skins.Skins[j]
            end
        end
        if not hbFoundSkin then
            if not Healbot_Config_Skins.Author[Healbot_Config_Skins.Current_Skin] then
                local retryWithSkin=HealBot_getDefaultSkin()
                if not noCallback then
                    HealBot_Options_DoSet_Current_Skin(retryWithSkin, nil, true, optSetSkins)
                elseif newSkin~=HEALBOT_SKINS_STD then
                    HealBot_Options_DoSet_Current_Skin(HEALBOT_SKINS_STD, nil, true, optSetSkins)
                end
            else
                HealBot_AddChat(HEALBOT_CHAT_CHANGESKINERR1..newSkin)
                if hbValidSkins then HealBot_AddChat(HEALBOT_CHAT_CHANGESKINERR2..hbValidSkins) end
            end
        end
    elseif not Healbot_Config_Skins.Author[Healbot_Config_Skins.Current_Skin] then
        local retryWithSkin=HealBot_getDefaultSkin()
        if not noCallback then
            HealBot_Options_DoSet_Current_Skin(retryWithSkin, nil, true, optSetSkins)
        elseif newSkin~=HEALBOT_SKINS_STD then
            HealBot_Options_DoSet_Current_Skin(HEALBOT_SKINS_STD, nil, true, optSetSkins)
        end
        HealBot_Timers_Set("RESET","Skins")
    end
    return optSetSkins
end

function HealBot_Options_Set_Current_Skin(newSkin, ddRefresh, noCallback, optSetSkins)
      --HealBot_setCall("HealBot_Options_Set_Current_Skin")
    if not HealBot_Data["UILOCK"] then
        if HealBot_Options_DoSet_Current_Skin(newSkin, ddRefresh, noCallback, optSetSkins) then
            HealBot_Options_SetSkins(true)
        end
    elseif not hb_lVars["SetSkinDelayed"] then
        hb_lVars["SetSkinDelayed"]=true
        C_Timer.After(2, function() hb_lVars["SetSkinDelayed"]=false; HealBot_Options_Set_Current_Skin(newSkin, ddRefresh, noCallback, optSetSkins) end)
    end
end

function HealBot_Options_Set_Coords()
    if hb_lVars["SetNewSkin"] then
        hb_lVars["SetNewSkin"]=false
        HealBot_Action_setPoint(hb_lVars["Frame"], true)
    end
end
--------------------------------------------------------------------------------
hb_lVars["InOutSkin"]=1
hb_lVars["hbTempNumUnitNames"]=0
function HealBot_Options_InOutSkin_DropDown()
      --HealBot_setCall("HealBot_Options_InOutSkin_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(Healbot_Config_Skins.Skins), 1 do
        info.text=Healbot_Config_Skins.Skins[j];
        info.func=function(self)
                        hb_lVars["InOutSkin"]=self:GetID()
                        HealBot_Share_setLuVars("InOutSkin", hb_lVars["InOutSkin"])
                        UIDropDownMenu_SetText(HealBot_Options_InOutSkin,Healbot_Config_Skins.Skins[hb_lVars["InOutSkin"]])
                    end
        info.checked=false;
        if hb_lVars["InOutSkin"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_ExtraSkins_Image(show, name)
      --HealBot_setCall("HealBot_Options_ExtraSkins_Image")
    if show then
        HealBot_Share_ClosePostLink();
        local image, desc=HealBot_ExtraSkins_retImageDesc(name)
        HealBot_ExtraSkins_Image:SetTexture(image,"CLAMPTOBLACKADDITIVE","CLAMPTOBLACKADDITIVE")
        HealBot_ExtraSkins_Image:Show()
        HealBot_Options_ExtraSkinsImageClose:Show()
        HealBot_Options_ShareExternalScroll:Hide()
        HealBot_Options_ShareExternalEditBox:Hide()
        g=_G["HealBot_Options_ExtraSkinsDesc"]
        g:SetText(desc)
    else
        HealBot_ExtraSkins_Image:Hide()
        HealBot_Options_ExtraSkinsImageClose:Hide()
        HealBot_Options_ShareExternalScroll:Show()
        HealBot_Options_ShareExternalEditBox:Show()
        g=_G["HealBot_Options_ExtraSkinsDesc"]
        g:SetText("")
    end
end

function HealBot_Options_ExtraSkins_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_ExtraSkins_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    if level == 1 then
        for j=1, getn(HealBot_Options_ExtraSkinsCat_List), 1 do
            info.text="    "..HealBot_Options_ExtraSkinsCat_List[j];
            info.hasArrow=true
            info.notCheckable=true
            info.menuList=HealBot_Options_ExtraSkinsCat_List[j], true, HealBot_Options_ExtraSkinsCat_List[j]
            UIDropDownMenu_AddButton(info)
        end
    elseif menuList == HEALBOT_SORTBY_GROUP then
        local skinlist=HealBot_ExtraSkins_retNamesForCat("GROUP")
        for j=1, getn(skinlist), 1 do
            info.text=skinlist[j];
            info.func=function(self)
                        hb_lVars["ExtraSkins"]=skinlist[j]
                        HealBot_ExtraSkins_copyData(skinlist[j])
                        UIDropDownMenu_SetText(HealBot_Options_ExtraSkins, skinlist[j])
                        HealBot_Options_ExtraSkins_Image(true, hb_lVars["ExtraSkins"])
                    end
            info.checked=false;
            if hb_lVars["ExtraSkins"] == skinlist[j] then info.checked=true; end
            UIDropDownMenu_AddButton(info, level);
        end
    elseif menuList == HEALBOT_EXTRASKINS_CAT_SRAID then
        local skinlist=HealBot_ExtraSkins_retNamesForCat("SMALL-RAID")
        for j=1, getn(skinlist), 1 do
            info.text=skinlist[j];
            info.func=function(self)
                        hb_lVars["ExtraSkins"]=skinlist[j]
                        HealBot_ExtraSkins_copyData(skinlist[j])
                        UIDropDownMenu_SetText(HealBot_Options_ExtraSkins, skinlist[j])
                        HealBot_Options_ExtraSkins_Image(true, hb_lVars["ExtraSkins"])
                    end
            info.checked=false;
            if hb_lVars["ExtraSkins"] == skinlist[j] then info.checked=true; end
            UIDropDownMenu_AddButton(info, level);
        end
    elseif menuList == HEALBOT_EXTRASKINS_CAT_LRAID then
        local skinlist=HealBot_ExtraSkins_retNamesForCat("LARGE-RAID")
        for j=1, getn(skinlist), 1 do
            info.text=skinlist[j];
            info.func=function(self)
                        hb_lVars["ExtraSkins"]=skinlist[j]
                        HealBot_ExtraSkins_copyData(skinlist[j])
                        UIDropDownMenu_SetText(HealBot_Options_ExtraSkins, skinlist[j])
                        HealBot_Options_ExtraSkins_Image(true, hb_lVars["ExtraSkins"])
                    end
            info.checked=false;
            if hb_lVars["ExtraSkins"] == skinlist[j] then info.checked=true; end
            UIDropDownMenu_AddButton(info, level);
        end
    end
end

hb_lVars["InMethodSpell"]=2
hb_lVars["InMethodBuff"]=2
hb_lVars["InMethodDebuff"]=2
function HealBot_Options_ImportMethod_DropDown(object, id)
      --HealBot_setCall("HealBot_Options_ImportMethod_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["ImportMethods"]), 1 do
        info.text=HealBot_Options_Lists["ImportMethods"][j];
        info.func=function(self)
                        hb_lVars[id]=self:GetID()
                        HealBot_Share_setLuVars(id, hb_lVars[id])
                        UIDropDownMenu_SetText(object,HealBot_Options_Lists["ImportMethods"][hb_lVars[id]])
                    end
        info.checked=false;
        if hb_lVars[id] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_ImportMethodSpells_DropDown()
      --HealBot_setCall("HealBot_Options_ImportMethodSpells_DropDown")
    HealBot_Options_ImportMethod_DropDown(HealBot_Options_ImportMethodSpells, "InMethodSpell")
end

function HealBot_Options_ImportMethodBuffs_DropDown()
      --HealBot_setCall("HealBot_Options_ImportMethodBuffs_DropDown")
    HealBot_Options_ImportMethod_DropDown(HealBot_Options_ImportMethodBuffs, "InMethodBuff")
end

function HealBot_Options_ImportMethodCDebuff_DropDown()
      --HealBot_setCall("HealBot_Options_ImportMethodCDebuff_DropDown")
    HealBot_Options_ImportMethod_DropDown(HealBot_Options_ImportMethodCDebuff, "InMethodDebuff")
end

hb_lVars["curPlugin"]=1
local function HealBot_Options_Plugins_ShowFrame()
      --HealBot_setCall("HealBot_Options_Plugins_ShowFrame")
    local pluginId={[1]="pluginThreat",
                    [2]="pluginTimeToDie",
                    [3]="pluginTimeToLive",
                    [4]="pluginExtraButtons",
                    [5]="pluginCombatProt",
                    [6]="pluginPerformance",
                    [7]="pluginMyCooldowns",
                    [8]="pluginTweaks",
                    [9]="pluginRequests",
                   [10]="pluginAuraWatch",
                   [11]="pluginHealthWatch",
                   [12]="pluginManaWatch",
                   [13]="pluginMedia",}
    HealBot_Options_PluginThreatFrame:Hide()
    HealBot_Options_PluginTimeToDieFrame:Hide()
    HealBot_Options_PluginTimeToLiveFrame:Hide()
    HealBot_Options_PluginExtraButtonsFrame:Hide()
    HealBot_Options_PluginCombatProtFrame:Hide()
    HealBot_Options_PluginPerformanceFrame:Hide()
    HealBot_Options_PluginTweaksFrame:Hide()
    HealBot_Options_PluginRequestsFrame:Hide()
    HealBot_Options_PluginAuraWatchFrame:Hide()
    HealBot_Options_PluginHealthWatchFrame:Hide()
    HealBot_Options_PluginManaWatchFrame:Hide()
    HealBot_Options_PluginMyCooldownsFrame:Hide()
    HealBot_Options_PluginMediaFrame:Hide()
    if not HealBot_Init_retLuVars(pluginId[hb_lVars["curPlugin"]].."Loaded") then
        HealBot_Options_PluginNATxt:Show()
        HealBot_Options_PluginNAReasonTxt:Show()
        HealBot_Options_PluginNAReasonTxt:SetText(HealBot_Init_retLuVars(pluginId[hb_lVars["curPlugin"]].."Reason"))
    else
        HealBot_Options_PluginNATxt:Hide()
        HealBot_Options_PluginNAReasonTxt:Hide()
        if hb_lVars["curPlugin"] == 1 then
            HealBot_Options_PluginThreatFrame:Show()
            HealBot_Plugin_Threat_Options()
        elseif hb_lVars["curPlugin"] == 2 then
            HealBot_Plugin_TimeToDie_Options()
            HealBot_Options_PluginTimeToDieFrame:Show()
        elseif hb_lVars["curPlugin"] == 3 then
            HealBot_Plugin_TimeToLive_Options()
            HealBot_Options_PluginTimeToLiveFrame:Show()
        elseif hb_lVars["curPlugin"] == 4 then
            HealBot_Plugin_ExtraButtons_Options()
            HealBot_Options_PluginExtraButtonsFrame:Show()
        elseif hb_lVars["curPlugin"] == 5 then
            HealBot_Plugin_CombatProt_Options()
            HealBot_Options_PluginCombatProtFrame:Show()
        elseif hb_lVars["curPlugin"] == 6 then
            HealBot_Plugin_Performance_Options()
            HealBot_Options_PluginPerformanceFrame:Show()
        elseif hb_lVars["curPlugin"] == 7 then
            HealBot_Plugin_MyCooldowns_Options()
            HealBot_Options_PluginMyCooldownsFrame:Show()
        elseif hb_lVars["curPlugin"] == 8 then
            HealBot_Plugin_Tweaks_Options()
            HealBot_Options_PluginTweaksFrame:Show()
        elseif hb_lVars["curPlugin"] == 9 then
            HealBot_Plugin_Requests_Options()
            HealBot_Options_PluginRequestsFrame:Show()
        elseif hb_lVars["curPlugin"] == 10 then
            HealBot_Plugin_AuraWatch_Options()
            HealBot_Options_PluginAuraWatchFrame:Show()
        elseif hb_lVars["curPlugin"] == 11 then
            HealBot_Plugin_HealthWatch_Options()
            HealBot_Options_PluginHealthWatchFrame:Show()
        elseif hb_lVars["curPlugin"] == 12 then
            HealBot_Plugin_ManaWatch_Options()
            HealBot_Options_PluginManaWatchFrame:Show()
        elseif hb_lVars["curPlugin"] == 13 then
            HealBot_Plugin_Media_Options()
            HealBot_Options_PluginMediaFrame:Show()
        end
    end
end

function HealBot_Options_Plugins_DropDown()
      --HealBot_setCall("HealBot_Options_Plugins_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["Plugins"]), 1 do
        info.text=HealBot_Options_Lists["Plugins"][j];
        info.func=function(self)
                        if hb_lVars["curPlugin"]~=self:GetID() then
                            hb_lVars["curPlugin"]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_Plugins,HealBot_Options_Lists["Plugins"][hb_lVars["curPlugin"]])
                            HealBot_Options_Plugins_ShowFrame()
                        end
                    end
        info.checked=false;
        if hb_lVars["curPlugin"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_ResetDoneInit(n)
      --HealBot_setCall("HealBot_Options_ResetDoneInit")
    DoneInitTab[n]=nil
end

function HealBot_SpellAutoButton_Update(autoType, autoMod, ActionBarsCombo, Buttons_Button, isTrue)
      --HealBot_setCall("HealBot_SpellAutoButton_Update")
    local combo=nil
    if ActionBarsCombo == 1 then
        if autoType == "Target" then combo=HealBot_Config_Spells.EnabledSpellTarget;
        elseif autoType == "Trinket1" then combo=HealBot_Config_Spells.EnabledSpellTrinket1;
        elseif autoType == "Trinket2" then combo=HealBot_Config_Spells.EnabledSpellTrinket2;
        else combo=HealBot_Config_Spells.EnabledAvoidBlueCursor; end
    elseif ActionBarsCombo == 2 then
        if autoType == "Target" then combo=HealBot_Config_Spells.EnemySpellTarget;
        elseif autoType == "Trinket1" then combo=HealBot_Config_Spells.EnemySpellTrinket1;
        elseif autoType == "Trinket2" then combo=HealBot_Config_Spells.EnemySpellTrinket2;
        else combo=HealBot_Config_Spells.EnemyAvoidBlueCursor; end
    else
        if autoType == "Target" then combo=HealBot_Config_Spells.EmergSpellTarget;
        elseif autoType == "Trinket1" then combo=HealBot_Config_Spells.EmergSpellTrinket1;
        elseif autoType == "Trinket2" then combo=HealBot_Config_Spells.EmergSpellTrinket2;
        else combo=HealBot_Config_Spells.EmergAvoidBlueCursor; end
    end
    local button=HealBot_Options_ComboClass_Button(Buttons_Button)
    if isTrue == "true" then
        combo[HealBot_Action_GetCombo(autoMod, button)]=true
    else
        combo[HealBot_Action_GetCombo(autoMod, button)]=nil
    end
end

function HealBot_Options_checkSkinName(skinName)
      --HealBot_setCall("HealBot_Options_checkSkinName")
    local hbFoundSkin=false
    table.foreach(Healbot_Config_Skins.Skins, function (index,skin)
        if skin == skinName then hbFoundSkin=true; end
    end)
    return hbFoundSkin
end

function HealBot_Options_val2str ( v )
      --HealBot_setCall("HealBot_Options_val2str")
  if "string" == type( v ) then
    v=string.gsub( v, "\n", "\\n" )
    if string.match( string.gsub(v,"[^'\"]",""), '^"+$' ) then
      return "'" .. v .. "'"
    end
    return '"' .. string.gsub(v,'"', '\\"' ) .. '"'
  else
    return "table" == type( v ) and HealBot_Options_tab2str( v ) or
      tostring( v )
  end
end

function HealBot_Options_key2str ( k )
      --HealBot_setCall("HealBot_Options_key2str")
  if "string" == type( k ) and string.match( k, "^[_%a][_%a%d]*$" ) then
    return k
  else
    return "[" .. HealBot_Options_val2str( k ) .. "]"
  end
end

function HealBot_Options_tab2str( tbl )
      --HealBot_setCall("HealBot_Options_tab2str")
  local result, done={}, {}
  for k, v in ipairs( tbl ) do
    local value='"' .. HealBot_Options_val2str( v ) .. '"'
    if value~='"false"' and value~='"true"' then value=HealBot_Options_val2str( v ) end
    table.insert( result, value )
    done[ k ]=true
  end
  for k, v in pairs( tbl ) do
    if not done[ k ] then
      local value='"' .. HealBot_Options_val2str( v ) .. '"'
      if value~='"false"' and value~='"true"' then value=HealBot_Options_val2str( v ) end
      table.insert( result,
        HealBot_Options_key2str( k ) .. "=" .. value )
    end
  end
  return "{" .. table.concat( result, "," ) .. "}"
end

--------------------------------------------------------------------------------

function HealBot_Options_TooltipPos_DropDown()
      --HealBot_setCall("HealBot_Options_TooltipPos_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["TooltipPos"]), 1 do
        info.text=HealBot_Options_Lists["TooltipPos"][j];
        info.func=function(self)
                        hbv_Skins_SetFrameVar(self:GetID(), "Frame", "TIPLOC", hb_lVars["Frame"])
                        UIDropDownMenu_SetText(HealBot_Options_TooltipPos,HealBot_Options_Lists["TooltipPos"][hbv_Skins_GetFrameVar("Frame", "TIPLOC", hb_lVars["Frame"])])
                    end
        info.checked=false;
        if hbv_Skins_GetFrameVar("Frame", "TIPLOC", hb_lVars["Frame"]) == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

--------------------------------------------------------------------------------

local function HealBot_Options_BuffTxt_DropDown(object, id)
      --HealBot_setCall("HealBot_Options_BuffTxt_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    info.text=HEALBOT_WORDS_NONE;
    info.func=function(self)
                    BuffTextClass=HealBot_Config_Buffs.HealBotBuffText
                    BuffTextClass[HealBot_Options_getDropDownId_bySpec(id)]=self:GetText()
                    UIDropDownMenu_SetText(object,HEALBOT_WORDS_NONE)
                    HealBot_Timers_Set("AURA","BuffReset")
                end
    info.checked=false;
    if BuffTextClass[HealBot_Options_getDropDownId_bySpec(id)] == HEALBOT_WORDS_NONE then info.checked=true end
    UIDropDownMenu_AddButton(info);
    for j=1, getn(HealBot_Buff_Spells_List), 1 do
        local sName=HealBot_Buff_Spells_List[j];
        info.text=sName
        info.func=function(self)
                        BuffTextClass=HealBot_Config_Buffs.HealBotBuffText
                        BuffTextClass[HealBot_Options_getDropDownId_bySpec(id)]=self:GetText()
                        UIDropDownMenu_SetText(object,sName)
                        HealBot_Timers_Set("AURA","BuffReset")
                    end
        info.checked=false;
        if BuffTextClass[HealBot_Options_getDropDownId_bySpec(id)] == HealBot_Buff_Spells_List[j] then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

local function HealBot_Options_BuffTxt1_DropDown()
      --HealBot_setCall("HealBot_Options_BuffTxt1_DropDown")
    HealBot_Options_BuffTxt_DropDown(HealBot_Options_BuffTxt1, 1)
end

local function HealBot_Options_BuffTxt2_DropDown()
      --HealBot_setCall("HealBot_Options_BuffTxt2_DropDown")
    HealBot_Options_BuffTxt_DropDown(HealBot_Options_BuffTxt2, 2)
end

local function HealBot_Options_BuffTxt3_DropDown()
      --HealBot_setCall("HealBot_Options_BuffTxt3_DropDown")
    HealBot_Options_BuffTxt_DropDown(HealBot_Options_BuffTxt3, 3)
end

local function HealBot_Options_BuffTxt4_DropDown()
      --HealBot_setCall("HealBot_Options_BuffTxt4_DropDown")
    HealBot_Options_BuffTxt_DropDown(HealBot_Options_BuffTxt4, 4)
end

local function HealBot_Options_BuffTxt5_DropDown()
      --HealBot_setCall("HealBot_Options_BuffTxt5_DropDown")
    HealBot_Options_BuffTxt_DropDown(HealBot_Options_BuffTxt5, 5)
end

local function HealBot_Options_BuffTxt6_DropDown()
      --HealBot_setCall("HealBot_Options_BuffTxt6_DropDown")
    HealBot_Options_BuffTxt_DropDown(HealBot_Options_BuffTxt6, 6)
end

local function HealBot_Options_BuffTxt7_DropDown()
      --HealBot_setCall("HealBot_Options_BuffTxt7_DropDown")
    HealBot_Options_BuffTxt_DropDown(HealBot_Options_BuffTxt7, 7)
end

local function HealBot_Options_BuffTxt8_DropDown()
      --HealBot_setCall("HealBot_Options_BuffTxt8_DropDown")
    HealBot_Options_BuffTxt_DropDown(HealBot_Options_BuffTxt8, 8)
end

local function HealBot_Options_BuffGroups_DropDown(object, id)
      --HealBot_setCall("HealBot_Options_BuffGroups_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local BuffDropDownClass=HealBot_Config_Buffs.HealBotBuffDropDown
    for j=1, getn(HealBot_Options_BuffTxt_List), 1 do
        info.text=HealBot_Options_BuffTxt_List[j];
        info.func=function(self)
                        BuffDropDownClass=HealBot_Config_Buffs.HealBotBuffDropDown
                        BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(id)]=self:GetID()
                        UIDropDownMenu_SetText(object,HealBot_Options_BuffTxt_List[BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(id)]])
                        ClickedBuffGroupDD=id
                        HealBot_Timers_Set("AURA","BuffReset")
                    end
        info.checked=false;
        if BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(id)] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

local function HealBot_Options_BuffGroups1_DropDown()
      --HealBot_setCall("HealBot_Options_BuffGroups1_DropDown")
    HealBot_Options_BuffGroups_DropDown(HealBot_Options_BuffGroups1, 1)
end

local function HealBot_Options_BuffGroups2_DropDown()
      --HealBot_setCall("HealBot_Options_BuffGroups2_DropDown")
    HealBot_Options_BuffGroups_DropDown(HealBot_Options_BuffGroups2, 2)
end

local function HealBot_Options_BuffGroups3_DropDown()
      --HealBot_setCall("HealBot_Options_BuffGroups3_DropDown")
    HealBot_Options_BuffGroups_DropDown(HealBot_Options_BuffGroups3, 3)
end

local function HealBot_Options_BuffGroups4_DropDown()
      --HealBot_setCall("HealBot_Options_BuffGroups4_DropDown")
    HealBot_Options_BuffGroups_DropDown(HealBot_Options_BuffGroups4, 4)
end

local function HealBot_Options_BuffGroups5_DropDown()
      --HealBot_setCall("HealBot_Options_BuffGroups5_DropDown")
    HealBot_Options_BuffGroups_DropDown(HealBot_Options_BuffGroups5, 5)
end

local function HealBot_Options_BuffGroups6_DropDown()
      --HealBot_setCall("HealBot_Options_BuffGroups6_DropDown")
    HealBot_Options_BuffGroups_DropDown(HealBot_Options_BuffGroups6, 6)
end

local function HealBot_Options_BuffGroups7_DropDown()
      --HealBot_setCall("HealBot_Options_BuffGroups7_DropDown")
    HealBot_Options_BuffGroups_DropDown(HealBot_Options_BuffGroups7, 7)
end

local function HealBot_Options_BuffGroups8_DropDown()
      --HealBot_setCall("HealBot_Options_BuffGroups8_DropDown")
    HealBot_Options_BuffGroups_DropDown(HealBot_Options_BuffGroups8, 8)
end

function HealBot_Options_BuffWeaponEnchant_DropDown(object, id, eId)
      --HealBot_setCall("HealBot_Options_BuffWeaponEnchant_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local BuffDropDownClass=HealBot_Config_Buffs.HealBotBuffDropDown
    for j=1, getn(HealBot_Buff_WeaponEnchant_List[eId]), 1 do
        info.text=HealBot_Buff_WeaponEnchant_List[eId][j];
        info.func=function(self)
                        if BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(id)]~=self:GetID() then
                            BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(id)]=self:GetID()
                            if eId == 1 then
                                UIDropDownMenu_SetText(HealBot_Options_BuffWeaponEnchant1,HealBot_Buff_WeaponEnchant_List[eId][BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(id)]])
                            else
                                UIDropDownMenu_SetText(HealBot_Options_BuffWeaponEnchant2,HealBot_Buff_WeaponEnchant_List[eId][BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(id)]])
                            end
                            HealBot_Options_BuffWeaponEnchantSetAura(eId)
                            HealBot_Timers_Set("AURA","BuffReset")
                        end
                    end
        info.checked=false;
        if BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(id)] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BuffWeaponEnchant1_DropDown()
      --HealBot_setCall("HealBot_Options_BuffWeaponEnchant1_DropDown")
    HealBot_Options_BuffWeaponEnchant_DropDown(HealBot_Options_BuffWeaponEnchant1, 9, 1)
end

function HealBot_Options_BuffWeaponEnchant2_DropDown()
      --HealBot_setCall("HealBot_Options_BuffWeaponEnchant2_DropDown")
    HealBot_Options_BuffWeaponEnchant_DropDown(HealBot_Options_BuffWeaponEnchant2, 10, 2)
end

function HealBot_Options_BuffWarnRange_DropDown(id, var)
      --HealBot_setCall("HealBot_Options_BuffWarnRange_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["RangeWarning"]), 1 do
        info.text=HealBot_Options_Lists["RangeWarning"][j];
        info.func=function(self)
                        if id == 1 then
                            HealBot_Config_Buffs.WarnRange_Bar=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_BuffWarnRange1,HealBot_Options_Lists["RangeWarning"][HealBot_Config_Buffs.WarnRange_Bar])
                        elseif id == 3 then
                            HealBot_Config_Buffs.WarnRange_Screen=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_BuffWarnRange3,HealBot_Options_Lists["RangeWarning"][HealBot_Config_Buffs.WarnRange_Screen])
                        else
                            HealBot_Config_Buffs.WarnRange_Sound=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_BuffWarnRange4,HealBot_Options_Lists["RangeWarning"][HealBot_Config_Buffs.WarnRange_Sound])
                        end
                    end
        info.checked=false;
        if var == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BuffWarnRange1_DropDown()
      --HealBot_setCall("HealBot_Options_BuffWarnRange1_DropDown")
    HealBot_Options_BuffWarnRange_DropDown(1, HealBot_Config_Buffs.WarnRange_Bar)
end

function HealBot_Options_BuffWarnRange3_DropDown()
      --HealBot_setCall("HealBot_Options_BuffWarnRange3_DropDown")
    HealBot_Options_BuffWarnRange_DropDown(3, HealBot_Config_Buffs.WarnRange_Screen)
end

function HealBot_Options_BuffWarnRange4_DropDown()
      --HealBot_setCall("HealBot_Options_BuffWarnRange4_DropDown")
    HealBot_Options_BuffWarnRange_DropDown(4, HealBot_Config_Buffs.WarnRange_Sound)
end

function HealBot_Options_BuffWeaponEnchantSetAura(x)
      --HealBot_setCall("HealBot_Options_BuffWeaponEnchantSetAura")
    local BuffDropDownClass=HealBot_Config_Buffs.HealBotBuffDropDown
    HealBot_Aura_WeaponEnchants(HealBot_Buff_WeaponEnchant_List[x][BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(8+x)]], x)
end

function HealBot_Options_BuffManaDrinkItems_DropDown()
      --HealBot_setCall("HealBot_Options_BuffManaDrinkItems_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local BuffDropItems=HealBot_retManaDrinkItems()

    info.text=HEALBOT_WORDS_NONE;
    info.func=function(self)
                    if HealBot_Config_Buffs.ManaDrinkItem~="" then
                        HealBot_Options_BuffManaDrinkItem:SetText("")
                        HealBot_Options_BuffManaDrinkItem_HelpItemSelect_OnClick()
                    end
                end
    info.checked=false;
    UIDropDownMenu_AddButton(info);
    for iName,_ in pairs(BuffDropItems) do
        info.text=iName;
        info.func=function(self)
                        if HealBot_Config_Buffs.ManaDrinkItem~=self:GetText() then
                            HealBot_Options_BuffManaDrinkItem:SetText(self:GetText())
                            HealBot_Options_BuffManaDrinkItem_HelpItemSelect_OnClick()
                        end
                    end
        info.checked=false;
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BuffBackupManaDrinkItems_DropDown()
      --HealBot_setCall("HealBot_Options_BuffBackupManaDrinkItems_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local BuffDropItems=HealBot_retManaDrinkItems()

    info.text=HEALBOT_WORDS_NONE;
    info.func=function(self)
                    if HealBot_Config_Buffs.BackupManaDrinkItem~="" then
                        HealBot_Options_BuffBackupManaDrinkItem:SetText("")
                        HealBot_Options_BuffBackupManaDrinkItem_HelpItemSelect_OnClick()
                    end
                end
    info.checked=false;
    UIDropDownMenu_AddButton(info);
    for iName,_ in pairs(BuffDropItems) do
        info.text=iName;
        info.func=function(self)
                        if HealBot_Config_Buffs.BackupManaDrinkItem~=self:GetText() then
                            HealBot_Options_BuffBackupManaDrinkItem:SetText(self:GetText())
                            HealBot_Options_BuffBackupManaDrinkItem_HelpItemSelect_OnClick()
                        end
                    end
        info.checked=false;
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BuffExtraItems1_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_BuffExtraItems1_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local spells=HealBot_Options_SelectAllSpellsCombo_list()
    if level == 1 then
        local BuffDropItems=HealBot_retBuffExtraItems()

        info.text=HEALBOT_WORDS_NONE;
        info.func=function(self)
                        if HealBot_Config_Buffs.CustomItemName[1]~="" then
                            HealBot_Options_BuffExtraItem1:SetText("")
                            HealBot_Options_BuffExtraBuff1:SetText("")
                            HealBot_Options_BuffExtraItems1_HelpItemSelect_OnClick()
                        end
                    end
        info.checked=false;
        UIDropDownMenu_AddButton(info);
        wipe(info)
        info.disabled=true
        info.notCheckable=true
        UIDropDownMenu_AddButton(info)
        info.text=HEALBOT_OPTIONS_ITEMS
        UIDropDownMenu_AddButton(info)
        info.disabled=false
        info.notCheckable=false
        for iName,_ in pairs(BuffDropItems) do
            info.text=iName;
            info.func=function(self)
                            if HealBot_Config_Buffs.CustomItemName[1]~=self:GetText() then
                                HealBot_Options_BuffExtraItem1:SetText(self:GetText())
                                if HealBot_Config_Buffs.CustomBuffName[1] == "" then
                                    HealBot_Config_Buffs.CustomBuffName[1]=self:GetText()
                                    HealBot_Options_BuffExtraBuff1:SetText(HealBot_Config_Buffs.CustomBuffName[1])
                                end
                                HealBot_Options_BuffExtraItems1_HelpItemSelect_OnClick()
                            end
                        end
            info.checked=false;
            UIDropDownMenu_AddButton(info);
        end
        wipe(info)
        info.disabled=true
        info.notCheckable=true
        UIDropDownMenu_AddButton(info)
        info.text=HEALBOT_OPTIONS_TAB_SPELLS
        UIDropDownMenu_AddButton(info)
        info.disabled=false
        info.notCheckable=false
        for j=1, ceil(getn(spells)/10), 1 do
            local n=j*10
            if n > getn(spells) then n=getn(spells) end
            info.text="    "..((j*10)-9).." - "..n;
            info.hasArrow=true
            info.notCheckable=true
            info.menuList=j, true, j
            UIDropDownMenu_AddButton(info)
        end
    else
        local n=menuList*10
        if n > getn(spells) then n=getn(spells) end
        for j=((menuList*10)-9), n, 1 do
            local mText=spells[j]
            info.text=mText
            info.func=function(self)
                            HealBot_Options_BuffExtraItem1:SetText(mText)
                            if HealBot_Config_Buffs.CustomBuffName[1] == "" then
                                HealBot_Config_Buffs.CustomBuffName[1]=mText
                                HealBot_Options_BuffExtraBuff1:SetText(HealBot_Config_Buffs.CustomBuffName[1])
                            end
                            HealBot_Options_BuffExtraItems1_HelpItemSelect_OnClick()
                        end
            info.checked=false;
            UIDropDownMenu_AddButton(info, level)
        end
    end
end

function HealBot_Options_BuffExtraItems2_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_BuffExtraItems2_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local spells=HealBot_Options_SelectAllSpellsCombo_list()
    if level == 1 then
        local BuffDropItems=HealBot_retBuffExtraItems()

        info.text=HEALBOT_WORDS_NONE;
        info.func=function(self)
                        if HealBot_Config_Buffs.CustomItemName[2]~="" then
                            HealBot_Options_BuffExtraItem2:SetText("")
                            HealBot_Options_BuffExtraBuff2:SetText("")
                            HealBot_Options_BuffExtraItems2_HelpItemSelect_OnClick()
                        end
                    end
        info.checked=false;
        UIDropDownMenu_AddButton(info);
        wipe(info)
        info.disabled=true
        info.notCheckable=true
        UIDropDownMenu_AddButton(info)
        info.text=HEALBOT_OPTIONS_ITEMS
        UIDropDownMenu_AddButton(info)
        info.disabled=false
        info.notCheckable=false
        for iName,_ in pairs(BuffDropItems) do
            info.text=iName;
            info.func=function(self)
                            if HealBot_Config_Buffs.CustomItemName[2]~=self:GetText() then
                                HealBot_Options_BuffExtraItem2:SetText(self:GetText())
                                if HealBot_Config_Buffs.CustomBuffName[2] == "" then
                                    HealBot_Config_Buffs.CustomBuffName[2]=self:GetText()
                                    HealBot_Options_BuffExtraBuff2:SetText(HealBot_Config_Buffs.CustomBuffName[2])
                                end
                                HealBot_Options_BuffExtraItems2_HelpItemSelect_OnClick()
                            end
                        end
            info.checked=false;
            UIDropDownMenu_AddButton(info);
        end
        wipe(info)
        info.disabled=true
        info.notCheckable=true
        UIDropDownMenu_AddButton(info)
        info.text=HEALBOT_OPTIONS_TAB_SPELLS
        UIDropDownMenu_AddButton(info)
        info.disabled=false
        info.notCheckable=false
        for j=1, ceil(getn(spells)/10), 1 do
            local n=j*10
            if n > getn(spells) then n=getn(spells) end
            info.text="    "..((j*10)-9).." - "..n;
            info.hasArrow=true
            info.notCheckable=true
            info.menuList=j, true, j
            UIDropDownMenu_AddButton(info)
        end
    else
        local n=menuList*10
        if n > getn(spells) then n=getn(spells) end
        for j=((menuList*10)-9), n, 1 do
            local mText=spells[j]
            info.text=mText
            info.func=function(self)
                            HealBot_Options_BuffExtraItem2:SetText(mText)
                            if HealBot_Config_Buffs.CustomBuffName[2] == "" then
                                HealBot_Config_Buffs.CustomBuffName[2]=mText
                                HealBot_Options_BuffExtraBuff2:SetText(HealBot_Config_Buffs.CustomBuffName[2])
                            end
                            HealBot_Options_BuffExtraItems2_HelpItemSelect_OnClick()
                        end
            info.checked=false;
            UIDropDownMenu_AddButton(info, level)
        end
    end
end

function HealBot_Options_BuffExtraItems3_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_BuffExtraItems3_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local spells=HealBot_Options_SelectAllSpellsCombo_list()
    if level == 1 then
        local BuffDropItems=HealBot_retBuffExtraItems()

        info.text=HEALBOT_WORDS_NONE;
        info.func=function(self)
                        if HealBot_Config_Buffs.CustomItemName[3]~="" then
                            HealBot_Options_BuffExtraItem3:SetText("")
                            HealBot_Options_BuffExtraBuff3:SetText("")
                            HealBot_Options_BuffExtraItems3_HelpItemSelect_OnClick()
                        end
                    end
        info.checked=false;
        UIDropDownMenu_AddButton(info);
        wipe(info)
        info.disabled=true
        info.notCheckable=true
        UIDropDownMenu_AddButton(info)
        info.text=HEALBOT_OPTIONS_ITEMS
        UIDropDownMenu_AddButton(info)
        info.disabled=false
        info.notCheckable=false
        for iName,_ in pairs(BuffDropItems) do
            info.text=iName;
            info.func=function(self)
                            if HealBot_Config_Buffs.CustomItemName[3]~=self:GetText() then
                                HealBot_Options_BuffExtraItem3:SetText(self:GetText())
                                if HealBot_Config_Buffs.CustomBuffName[3] == "" then
                                    HealBot_Config_Buffs.CustomBuffName[3]=self:GetText()
                                    HealBot_Options_BuffExtraBuff3:SetText(HealBot_Config_Buffs.CustomBuffName[3])
                                end
                                HealBot_Options_BuffExtraItems3_HelpItemSelect_OnClick()
                            end
                        end
            info.checked=false;
            UIDropDownMenu_AddButton(info);
        end
        wipe(info)
        info.disabled=true
        info.notCheckable=true
        UIDropDownMenu_AddButton(info)
        info.text=HEALBOT_OPTIONS_TAB_SPELLS
        UIDropDownMenu_AddButton(info)
        info.disabled=false
        info.notCheckable=false
        for j=1, ceil(getn(spells)/10), 1 do
            local n=j*10
            if n > getn(spells) then n=getn(spells) end
            info.text="    "..((j*10)-9).." - "..n;
            info.hasArrow=true
            info.notCheckable=true
            info.menuList=j, true, j
            UIDropDownMenu_AddButton(info)
        end
    else
        local n=menuList*10
        if n > getn(spells) then n=getn(spells) end
        for j=((menuList*10)-9), n, 1 do
            local mText=spells[j]
            info.text=mText
            info.func=function(self)
                            HealBot_Options_BuffExtraItem3:SetText(mText)
                            if HealBot_Config_Buffs.CustomBuffName[3] == "" then
                                HealBot_Config_Buffs.CustomBuffName[3]=mText
                                HealBot_Options_BuffExtraBuff3:SetText(HealBot_Config_Buffs.CustomBuffName[3])
                            end
                            HealBot_Options_BuffExtraItems3_HelpItemSelect_OnClick()
                        end
            info.checked=false;
            UIDropDownMenu_AddButton(info, level)
        end
    end
end

function HealBot_Options_BuffExtraItems4_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_BuffExtraItems4_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local spells=HealBot_Options_SelectAllSpellsCombo_list()
    if level == 1 then
        local BuffDropItems=HealBot_retBuffExtraItems()

        info.text=HEALBOT_WORDS_NONE;
        info.func=function(self)
                        if HealBot_Config_Buffs.CustomItemName[4]~="" then
                            HealBot_Options_BuffExtraItem4:SetText("")
                            HealBot_Options_BuffExtraBuff4:SetText("")
                            HealBot_Options_BuffExtraItems4_HelpItemSelect_OnClick()
                        end
                    end
        info.checked=false;
        UIDropDownMenu_AddButton(info);
        wipe(info)
        info.disabled=true
        info.notCheckable=true
        UIDropDownMenu_AddButton(info)
        info.text=HEALBOT_OPTIONS_ITEMS
        UIDropDownMenu_AddButton(info)
        info.disabled=false
        info.notCheckable=false
        for iName,_ in pairs(BuffDropItems) do
            info.text=iName;
            info.func=function(self)
                            if HealBot_Config_Buffs.CustomItemName[4]~=self:GetText() then
                                HealBot_Options_BuffExtraItem4:SetText(self:GetText())
                                if HealBot_Config_Buffs.CustomBuffName[4] == "" then
                                    HealBot_Config_Buffs.CustomBuffName[4]=self:GetText()
                                    HealBot_Options_BuffExtraBuff4:SetText(HealBot_Config_Buffs.CustomBuffName[4])
                                end
                                HealBot_Options_BuffExtraItems4_HelpItemSelect_OnClick()
                            end
                        end
            info.checked=false;
            UIDropDownMenu_AddButton(info);
        end
        wipe(info)
        info.disabled=true
        info.notCheckable=true
        UIDropDownMenu_AddButton(info)
        info.text=HEALBOT_OPTIONS_TAB_SPELLS
        UIDropDownMenu_AddButton(info)
        info.disabled=false
        info.notCheckable=false
        for j=1, ceil(getn(spells)/10), 1 do
            local n=j*10
            if n > getn(spells) then n=getn(spells) end
            info.text="    "..((j*10)-9).." - "..n;
            info.hasArrow=true
            info.notCheckable=true
            info.menuList=j, true, j
            UIDropDownMenu_AddButton(info)
        end
    else
        local n=menuList*10
        if n > getn(spells) then n=getn(spells) end
        for j=((menuList*10)-9), n, 1 do
            local mText=spells[j]
            info.text=mText
            info.func=function(self)
                            HealBot_Options_BuffExtraItem4:SetText(mText)
                            if HealBot_Config_Buffs.CustomBuffName[4] == "" then
                                HealBot_Config_Buffs.CustomBuffName[4]=mText
                                HealBot_Options_BuffExtraBuff4:SetText(HealBot_Config_Buffs.CustomBuffName[4])
                            end
                            HealBot_Options_BuffExtraItems4_HelpItemSelect_OnClick()
                        end
            info.checked=false;
            UIDropDownMenu_AddButton(info, level)
        end
    end
end

function HealBot_Options_BuffWellFedItems_DropDown()
      --HealBot_setCall("HealBot_Options_BuffWellFedItems_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local BuffDropItems=HealBot_retWellFedItems()

    info.text=HEALBOT_WORDS_NONE;
    info.func=function(self)
                    if HealBot_Config_Buffs.WellFedItem~="" then
                        HealBot_Options_BuffWellFedItem:SetText("")
                        HealBot_Options_BuffWellFedItem_HelpItemSelect_OnClick()
                    end
                end
    info.checked=false;
    UIDropDownMenu_AddButton(info);
    for iName,_ in pairs(BuffDropItems) do
        info.text=iName;
        info.func=function(self)
                        if HealBot_Config_Buffs.WellFedItem~=self:GetText() then
                            HealBot_Options_BuffWellFedItem:SetText(self:GetText())
                            HealBot_Options_BuffWellFedItem_HelpItemSelect_OnClick()
                        end
                    end
        info.checked=false;
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BackupBuffWellFedItems_DropDown()
      --HealBot_setCall("HealBot_Options_BackupBuffWellFedItems_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local BuffDropItems=HealBot_retWellFedItems()

    info.text=HEALBOT_WORDS_NONE;
    info.func=function(self)
                    if HealBot_Config_Buffs.BackupWellFedItem~="" then
                        HealBot_Options_BuffBackupWellFedItem:SetText("")
                        HealBot_Options_BuffBackupWellFedItem_HelpItemSelect_OnClick()
                    end
                end
    info.checked=false;
    UIDropDownMenu_AddButton(info);
    for iName,_ in pairs(BuffDropItems) do
        info.text=iName;
        info.func=function(self)
                        if HealBot_Config_Buffs.BackupWellFedItem~=self:GetText() then
                            HealBot_Options_BuffBackupWellFedItem:SetText(self:GetText())
                            HealBot_Options_BuffBackupWellFedItem_HelpItemSelect_OnClick()
                        end
                    end
        info.checked=false;
        UIDropDownMenu_AddButton(info);
    end
end
--------------------------------------------------------------------------------

function HealBot_Options_CDCTxt_DropDown(object, id)
      --HealBot_setCall("HealBot_Options_CDCTxt_DropDown")
    local DebuffSpells_List=HealBot_Options_GetDebuffSpells_List(HealBot_Data["PCLASSTRIM"])
    table.sort(DebuffSpells_List)
    local RacialDebuffSpells_List=HealBot_Options_GetRacialDebuffSpells_List(HealBot_Data["PRACE_EN"])
    table.sort(RacialDebuffSpells_List)
    local info=UIDropDownMenu_CreateInfo()
    info.text=HEALBOT_WORDS_NONE;
    info.func=function(self)
                    HealBot_Config_Cures.HealBotDebuffText[HealBot_Options_getDropDownId_bySpec(id)]=self:GetText()
                    HealBot_Timers_Set("AURA","DebuffReset")
                    UIDropDownMenu_SetText(object,HEALBOT_WORDS_NONE)
                end
    info.checked=false;
    if HealBot_Config_Cures.HealBotDebuffText[HealBot_Options_getDropDownId_bySpec(id)] == HEALBOT_WORDS_NONE then info.checked=true end
    UIDropDownMenu_AddButton(info);
    local noDupSpells={}
    for j=1, getn(DebuffSpells_List), 1 do
        local sName=HealBot_Spells_KnownByID(DebuffSpells_List[j])
        if sName and not noDupSpells[sName] then
            noDupSpells[sName]=true
            info.text=sName;
            info.func=function(self)
                            HealBot_Config_Cures.HealBotDebuffText[HealBot_Options_getDropDownId_bySpec(id)]=self:GetText()
                            HealBot_Timers_Set("AURA","DebuffReset")
                            UIDropDownMenu_SetText(object,sName)
                        end
            info.checked=false;
            if HealBot_Config_Cures.HealBotDebuffText[HealBot_Options_getDropDownId_bySpec(id)] == sName then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
    for j=1, getn(RacialDebuffSpells_List), 1 do
        local rName=HealBot_Spells_KnownByID(RacialDebuffSpells_List[j]);
        info.text=rName
        info.func=function(self)
                        HealBot_Config_Cures.HealBotDebuffText[HealBot_Options_getDropDownId_bySpec(id)]=self:GetText()
                        HealBot_Timers_Set("AURA","DebuffReset")
                        UIDropDownMenu_SetText(object,rName)
                    end
        info.checked=false;
        if HealBot_Config_Cures.HealBotDebuffText[HealBot_Options_getDropDownId_bySpec(id)] == rName then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
    for j=1, getn(HealBot_Options_Lists["DebuffItems"]), 1 do
        local iName=HealBot_WoWAPI_ItemInfo(HealBot_Options_Lists["DebuffItems"][j]);
        if iName then
            info.text=iName
            info.func=function(self)
                            HealBot_Config_Cures.HealBotDebuffText[HealBot_Options_getDropDownId_bySpec(id)]=self:GetText()
                            HealBot_Timers_Set("AURA","DebuffReset")
                            UIDropDownMenu_SetText(object,iName)
                        end
            info.checked=false;
            if HealBot_Config_Cures.HealBotDebuffText[HealBot_Options_getDropDownId_bySpec(id)] == iName then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
    for j=1, getn(HealBot_Options_Lists["DebuffTypes"]), 1 do
        local tName=HealBot_Options_Lists["DebuffTypes"][j]
        info.text=tName
        info.func=function(self)
                        HealBot_Config_Cures.HealBotDebuffText[HealBot_Options_getDropDownId_bySpec(id)]=self:GetText()
                        HealBot_Timers_Set("AURA","DebuffReset")
                        UIDropDownMenu_SetText(object,tName)
                    end
        info.checked=false;
        if HealBot_Config_Cures.HealBotDebuffText[HealBot_Options_getDropDownId_bySpec(id)] == tName then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_CDCTxt1_DropDown()
      --HealBot_setCall("HealBot_Options_CDCTxt1_DropDown")
    HealBot_Options_CDCTxt_DropDown(HealBot_Options_CDCTxt1, 1)
end

function HealBot_Options_CDCTxt2_DropDown()
      --HealBot_setCall("HealBot_Options_CDCTxt2_DropDown")
    HealBot_Options_CDCTxt_DropDown(HealBot_Options_CDCTxt2, 2)
end

function HealBot_Options_CDCTxt3_DropDown()
      --HealBot_setCall("HealBot_Options_CDCTxt3_DropDown")
    HealBot_Options_CDCTxt_DropDown(HealBot_Options_CDCTxt3, 3)
end

function HealBot_Options_CDCTxt4_DropDown()
      --HealBot_setCall("HealBot_Options_CDCTxt4_DropDown")
    HealBot_Options_CDCTxt_DropDown(HealBot_Options_CDCTxt4, 4)
end

function HealBot_Options_CDCTxt5_DropDown()
      --HealBot_setCall("HealBot_Options_CDCTxt5_DropDown")
    HealBot_Options_CDCTxt_DropDown(HealBot_Options_CDCTxt5, 5)
end

function HealBot_Options_CDCGroups_DropDown(object, id)
      --HealBot_setCall("HealBot_Options_CDCGroups_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_BuffTxt_List), 1 do
        info.text=HealBot_Options_BuffTxt_List[j];
        info.func=function(self)
                        HealBot_Config_Cures.HealBotDebuffDropDown[HealBot_Options_getDropDownId_bySpec(id)]=self:GetID()
                        UIDropDownMenu_SetText(object,HealBot_Options_BuffTxt_List[HealBot_Config_Cures.HealBotDebuffDropDown[HealBot_Options_getDropDownId_bySpec(id)]])
                        ClickedBuffGroupDD=id
                        HealBot_Timers_Set("AURA","DebuffReset")
                    end
        info.checked=false;
        if HealBot_Config_Cures.HealBotDebuffDropDown[HealBot_Options_getDropDownId_bySpec(id)] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_CDCGroups1_DropDown()
      --HealBot_setCall("HealBot_Options_CDCGroups1_DropDown")
    HealBot_Options_CDCGroups_DropDown(HealBot_Options_CDCGroups1, 1)
end

function HealBot_Options_CDCGroups2_DropDown()
      --HealBot_setCall("HealBot_Options_CDCGroups2_DropDown")
    HealBot_Options_CDCGroups_DropDown(HealBot_Options_CDCGroups2, 2)
end

function HealBot_Options_CDCGroups3_DropDown()
      --HealBot_setCall("HealBot_Options_CDCGroups3_DropDown")
    HealBot_Options_CDCGroups_DropDown(HealBot_Options_CDCGroups3, 3)
end

function HealBot_Options_CDCGroups4_DropDown()
      --HealBot_setCall("HealBot_Options_CDCGroups4_DropDown")
    HealBot_Options_CDCGroups_DropDown(HealBot_Options_CDCGroups4, 4)
end

function HealBot_Options_CDCGroups5_DropDown()
      --HealBot_setCall("HealBot_Options_CDCGroups5_DropDown")
    HealBot_Options_CDCGroups_DropDown(HealBot_Options_CDCGroups5, 5)
end

function HealBot_Options_CDCPriority_DropDown(object, dType)
      --HealBot_setCall("HealBot_Options_CDCPriority_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, 20, 1 do
        info.text=j;
        info.func=function(self)
                        HealBot_Config_Cures.HealBotDebuffPriority[dType]=self:GetID()
                        UIDropDownMenu_SetText(object,HealBot_Config_Cures.HealBotDebuffPriority[dType])
                        HealBot_Timers_Set("AURA","CustomDebuffListPrep")
                    end
        info.checked=false;
        if HealBot_Config_Cures.HealBotDebuffPriority[dType] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_CDCPriority1_DropDown()
      --HealBot_setCall("HealBot_Options_CDCPriority1_DropDown")
    HealBot_Options_CDCPriority_DropDown(HealBot_Options_CDCPriority1, HEALBOT_DISEASE_en)
end

function HealBot_Options_CDCPriority2_DropDown()
      --HealBot_setCall("HealBot_Options_CDCPriority2_DropDown")
    HealBot_Options_CDCPriority_DropDown(HealBot_Options_CDCPriority2, HEALBOT_MAGIC_en)
end

function HealBot_Options_CDCPriority3_DropDown()
      --HealBot_setCall("HealBot_Options_CDCPriority3_DropDown")
    HealBot_Options_CDCPriority_DropDown(HealBot_Options_CDCPriority3, HEALBOT_POISON_en)
end

function HealBot_Options_CDCPriority4_DropDown()
      --HealBot_setCall("HealBot_Options_CDCPriority4_DropDown")
    HealBot_Options_CDCPriority_DropDown(HealBot_Options_CDCPriority4, HEALBOT_CURSE_en)
end

function HealBot_Options_CDCPriority5_DropDown()
      --HealBot_setCall("HealBot_Options_CDCPriority5_DropDown")
    HealBot_Options_CDCPriority_DropDown(HealBot_Options_CDCPriority5, HEALBOT_BLEED_en)
end

function HealBot_Options_CDebuffFilterC_DropDown()
      --HealBot_setCall("HealBot_Options_CDebuffFilterC_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AuraFilters"]), 1 do
        info.text=HealBot_Options_Lists["AuraFilters"][j];
        info.func=function(self)
                    local x=self:GetID()
                    if hb_lVars["CDebuffcustomSpellID"] then
                        if x>1 then
                            HealBot_Globals.CustomDebuffsFilter[hb_lVars["CDebuffcustomSpellID"]]=x
                        else
                            HealBot_Globals.CustomDebuffsFilter[hb_lVars["CDebuffcustomSpellID"]]=nil
                        end
                    end
                    UIDropDownMenu_SetSelectedID(HealBot_Options_CDebuffFilterC,x)
                    HealBot_Timers_Set("AURA","ConfigDebuffs")
                    HealBot_Timers_Set("AURA","CustomDebuffListPrep")
                  end
        info.checked=false;
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_CDCPriorityC_DropDown()
      --HealBot_setCall("HealBot_Options_CDCPriorityC_DropDown")
    local s,e=1,20
    local info=UIDropDownMenu_CreateInfo()
--    if hb_lVars["CDebuffcustomNameDefault"] == HEALBOT_CUSTOM_CAT_CUSTOM_AUTOMATIC then
--        s,e=15,15
--    end
    for j=s, e, 1 do
        info.text=j;
        info.func=function(self)
                        local x=self:GetID()
                        if hb_lVars["CDebuffcustomSpellID"] then
                            HealBot_Globals.CustomDebuffs[hb_lVars["CDebuffcustomSpellID"]]=x
                        end
                        HealBot_SetCDCBarColours()
                        HealBot_Timers_Set("AURA","DebuffPriority")
                        UIDropDownMenu_SetSelectedID(HealBot_Options_CDCPriorityC,x)
                        HealBot_Timers_Set("AURA","CustomDebuffListPrep")
                    end
        info.checked=false;
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BuffFilterC_DropDown()
      --HealBot_setCall("HealBot_Options_BuffFilterC_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AuraFilters"]), 1 do
        info.text=HealBot_Options_Lists["AuraFilters"][j];
        info.func=function(self)
                    local x=self:GetID()
                    if hb_lVars["HoTname"] then
                        local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"])
                        if sId then
                            local sName=HealBot_Options_SpellGetName(sId)
                            if x>1 then
                                HealBot_Globals.CustomBuffsFilter[sId]=x
                                if sName then HealBot_Globals.CustomBuffsFilter[sName]=x end
                            else
                                HealBot_Globals.CustomBuffsFilter[sId]=nil
                                if sName then HealBot_Globals.CustomBuffsFilter[sName]=nil end
                            end
                        end
                    end
                    UIDropDownMenu_SetSelectedID(HealBot_Options_BuffFilterC,x)
                    HealBot_Timers_Set("AURA","ConfigClassHoT")
                    HealBot_Timers_Set("AURA","CustomBuffListPrep")
                  end
        info.checked=false;
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BuffPriorityC_DropDown()
      --HealBot_setCall("HealBot_Options_BuffPriorityC_DropDown")
    local s,e=1,20
    local info=UIDropDownMenu_CreateInfo()
    if hb_lVars["HoTname"] == HEALBOT_CUSTOM_CAT_CUSTOM_AUTOBUFFS then
        info.text=20
        info.checked=true
        UIDropDownMenu_AddButton(info)
    else
        for j=s, e, 1 do
            info.text=j;
            info.func=function(self)
                            local x=self:GetID()
                            if hb_lVars["HoTname"] then
                                local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"])
                                if sId then
                                    local sName=HealBot_Options_SpellGetName(sId)
                                    if x<20 then
                                        HealBot_Globals.CustomBuffs[sId]=x
                                        if sName then HealBot_Globals.CustomBuffs[sName]=x end
                                    else
                                        HealBot_Globals.CustomBuffs[sId]=nil
                                        if sName then HealBot_Globals.CustomBuffs[sName]=nil end
                                    end
                                    HealBot_Timers_Set("AURA","ConfigClassHoT")
                                    HealBot_SetCustomBuffBarColours()
                                end
                            end
                            UIDropDownMenu_SetSelectedID(HealBot_Options_BuffPriorityC,x)
                            HealBot_Timers_Set("AURA","CustomBuffListPrep")
                        end
            info.checked=false;
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_CDCWarnRange_DropDown(id, var)
      --HealBot_setCall("HealBot_Options_CDCWarnRange_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["RangeWarning"]), 1 do
        info.text=HealBot_Options_Lists["RangeWarning"][j];
        info.func=function(self)
                        if id == 1 then
                            HealBot_Config_Cures.WarnRange_Bar=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_CDCWarnRange1,HealBot_Options_Lists["RangeWarning"][HealBot_Config_Cures.WarnRange_Bar])
                        elseif id == 3 then
                            HealBot_Config_Cures.WarnRange_Screen=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_CDCWarnRange3,HealBot_Options_Lists["RangeWarning"][HealBot_Config_Cures.WarnRange_Screen])
                        else
                            HealBot_Config_Cures.WarnRange_Sound=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_CDCWarnRange4,HealBot_Options_Lists["RangeWarning"][HealBot_Config_Cures.WarnRange_Sound])
                        end
                    end
        info.checked=false;
        if var == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_CDCWarnRange1_DropDown()
      --HealBot_setCall("HealBot_Options_CDCWarnRange1_DropDown")
    HealBot_Options_CDCWarnRange_DropDown(1, HealBot_Config_Cures.WarnRange_Bar)
end

function HealBot_Options_CDCWarnRange3_DropDown()
      --HealBot_setCall("HealBot_Options_CDCWarnRange3_DropDown")
    HealBot_Options_CDCWarnRange_DropDown(3, HealBot_Config_Cures.WarnRange_Screen)
end

function HealBot_Options_CDCWarnRange4_DropDown()
      --HealBot_setCall("HealBot_Options_CDCWarnRange4_DropDown")
    HealBot_Options_CDCWarnRange_DropDown(4, HealBot_Config_Cures.WarnRange_Sound)
end

function HealBot_Options_CDCSoundChan_DropDown()
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["SoundChannels"]), 1 do
        info.text=HealBot_Options_Lists["SoundChannels"][j];
        info.func=function(self)
                      HealBot_Config_Cures.SoundDebuffChan=self:GetID()
                      UIDropDownMenu_SetText(HealBot_Options_CDCSoundChan, HealBot_Options_Lists["SoundChannels"][HealBot_Config_Cures.SoundDebuffChan])
                  end
        info.checked=false;
        if HealBot_Config_Cures.SoundDebuffChan == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BuffSoundChan_DropDown()
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["SoundChannels"]), 1 do
        info.text=HealBot_Options_Lists["SoundChannels"][j];
        info.func=function(self)
                      HealBot_Config_Buffs.SoundBuffChan=self:GetID()
                      UIDropDownMenu_SetText(HealBot_Options_BuffSoundChan, HealBot_Options_Lists["SoundChannels"][HealBot_Config_Buffs.SoundBuffChan])
                  end
        info.checked=false;
        if HealBot_Config_Buffs.SoundBuffChan == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_CDebuffTextID(dName)
      --HealBot_setCall("HealBot_Options_CDebuffTextID")
    if dName then
        local cdName=dName
        local name, _, _, _, _, _, spellId=HealBot_WoWAPI_SpellInfo(dName)
        if name and spellId then cdName=name.." ("..spellId..")" end
        return cdName
    else
        return ""
    end
end

hb_lVars["CDebuffCatID"]=2
function HealBot_Options_CDebuffCat_genList()
      --HealBot_setCall("HealBot_Options_CDebuffCat_genList")
    local tmpCDebuffCat_List={}
    local j=0
    local dText=""
    for dID,x in pairs(HealBot_Globals.Custom_Debuff_Categories) do
        if hb_lVars["CDebuffCatID"] == x and HealBot_Globals.CustomDebuffs[dID] then
            local dName=HealBot_Options_CDebuffTextID(dID)
            if tonumber(dName) == nil then
                table.insert(tmpCDebuffCat_List, dName)
                j=j+1
            else
                HealBot_Options_DeleteCDebuff(dID, dName)
            end
        end
    end
    local x=nil
    if j>0 then
        table.sort(tmpCDebuffCat_List)
        for j=1, getn(tmpCDebuffCat_List), 1 do
            dText=HealBot_Options_CDebuffGetId(tmpCDebuffCat_List[j])
            if dText == hb_lVars["CDebuffcustomSpellID"] then
                hb_lVars["CDebuffcustomID"]=j
                x=true
                break
            end
        end
    end
    if not x then
        hb_lVars["CDebuffcustomID"]=1
        dText=HealBot_Options_CDebuffGetId(tmpCDebuffCat_List[hb_lVars["CDebuffcustomID"]])
        hb_lVars["CDebuffcustomNameDefault"]=dText
        HealBot_Options_CDebuffCatNameUpdate()
    end
    dText=HealBot_Options_CDebuffGetId(tmpCDebuffCat_List[hb_lVars["CDebuffcustomID"]])
    hb_lVars["CDebuffcustomSpellID"]=dText
    return tmpCDebuffCat_List
end

function HealBot_Options_CDebuffCat_DropDown()
      --HealBot_setCall("HealBot_Options_CDebuffCat_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["CDebuffCat"]), 1 do
        info.text=HealBot_Options_Lists["CDebuffCat"][j];
        info.func=function(self)
                        if hb_lVars["CDebuffCatID"]~=self:GetID() then
                            hb_lVars["CDebuffCatID"]=self:GetID()
                            UIDropDownMenu_SetText(HealBot_Options_CDebuffCat,HealBot_Options_Lists["CDebuffCat"][hb_lVars["CDebuffCatID"]])
                            hb_lVars["CDebuffcustomNameDefault"]=hb_lVars["CDebuffcustomSpellID"]
                            local CDebuffCat_List=HealBot_Options_CDebuffCat_genList()
                            hb_lVars["numCustomDebuffs"]=#CDebuffCat_List
                            HealBot_Options_CDebuffCatNameUpdate()
                            HealBot_SetCDCBarColours();
                            HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
                            if hb_lVars["CDebuffCatID"] == 1 then
                                HealBot_Options_NewCDebuff:Disable();
                                HealBot_Options_NewCDebuff:SetText("")
                            else
                                HealBot_Options_NewCDebuff:Enable();
                            end
                        end
                    end
        info.checked=false;
        if hb_lVars["CDebuffCatID"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_CDebuffGetId(cdText)
      --HealBot_setCall("HealBot_Options_CDebuffGetId")
    local rText=cdText
    if cdText then
        local s=string.find(cdText, "%(%d")
        local e=string.find(cdText, "%d%)")
        if s and e then
            rText=tonumber(string.sub(cdText,s+1,e))
        elseif HealBot_Spell_Names[cdText] then
            rText=HealBot_Spell_Names[cdText]
        elseif HealBot_WoWAPI_SpellInfo(cdText) then
            _, _, _, _, _, _, rText=HealBot_WoWAPI_SpellInfo(cdText)
        end
    end
    return rText
end

function HealBot_Options_CDebuffTxt1_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_CDebuffTxt1_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local CDebuffCat_List=HealBot_Options_CDebuffCat_genList()
    if getn(CDebuffCat_List) > 10 then
        if level == 1 then
            for j=1, ceil(getn(CDebuffCat_List)/10), 1 do
                local n=j*10
                if n > getn(CDebuffCat_List) then n=getn(CDebuffCat_List) end
                info.text="    "..((j*10)-9).." - "..n;
                info.hasArrow=true
                info.notCheckable=true
                info.menuList=j, true, j
                UIDropDownMenu_AddButton(info)
            end
        else
            local n=menuList*10
            local dText=nil
            if n > getn(CDebuffCat_List) then n=getn(CDebuffCat_List) end
            for j=((menuList*10)-9), n, 1 do
                info.text=CDebuffCat_List[j];
                info.func=function(self)
                                if hb_lVars["CDebuffcustomID"]~=self:GetID() or hb_lVars["CDClvl"]~=menuList then
                                    hb_lVars["CDClvl"]=menuList
                                    hb_lVars["CDebuffcustomID"]=self:GetID()
                                    local cdText=self.value
                                    dText=HealBot_Options_CDebuffGetId(cdText)
                                    hb_lVars["CDebuffcustomSpellID"]=dText
                                    hb_lVars["CDebuffcustomNameDefault"]=dText
                                    UIDropDownMenu_SetText(HealBot_Options_CDebuffTxt1,cdText)
                                    HealBot_Options_NewAura_SetIcon("HealBot_Options_CDebuffIcon", hb_lVars["CDebuffcustomSpellID"])
                                    HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
                                    HealBot_SetCDCBarColours()
                                end
                            end
                info.checked=false;
                dText=HealBot_Options_CDebuffGetId(CDebuffCat_List[j])
                if hb_lVars["CDebuffcustomSpellID"] == dText then info.checked=true end
                UIDropDownMenu_AddButton(info, level);
            end
        end
    else
        local dText=nil
        for j=1, getn(CDebuffCat_List), 1 do
            info.text=CDebuffCat_List[j];
            info.func=function(self)
                            if hb_lVars["CDebuffcustomID"]~=self:GetID() then
                                hb_lVars["CDebuffcustomID"]=self:GetID()
                                local cdText=self.value
                                dText=HealBot_Options_CDebuffGetId(cdText)
                                hb_lVars["CDebuffcustomSpellID"]=dText
                                hb_lVars["CDebuffcustomNameDefault"]=dText
                                UIDropDownMenu_SetText(HealBot_Options_CDebuffTxt1,cdText)
                                HealBot_Options_NewAura_SetIcon("HealBot_Options_CDebuffIcon", hb_lVars["CDebuffcustomSpellID"])
                                HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
                                HealBot_SetCDCBarColours()
                            end
                        end
            info.checked=false;
            dText=HealBot_Options_CDebuffGetId(CDebuffCat_List[j])
            if hb_lVars["CDebuffcustomSpellID"] == dText then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
    hb_lVars["numCustomDebuffs"]=#CDebuffCat_List
    HealBot_Options_CDebuffCatNameUpdate()
end

function HealBot_Options_NewAura_SetName(object, name)
    if object then
        if name then
            local n,i=string.split("!",name)
            if i then
                HealBot_Options_SetLabel(object, HEALBOT_WORD_CASTER..": "..n.." ("..i..")")
            else
                HealBot_Options_SetLabel(object, HEALBOT_WORD_CASTER..": "..name)
            end
        else
            HealBot_Options_SetLabel(object, "")
        end
    end
end

function HealBot_Options_NewAura_SetTime(object, cat, id, filter)
    if object then
        if id and hbv_Auras_GetData(cat, id, filter) then
            local t, l=HealBot_Util_GetTimeElapsed(hbv_Auras_GetData(cat, id, filter))
            if t and l then
                HealBot_Options_SetLabel(object, HEALBOT_PLUGIN_LASTSEEN..": "..t..l)
            else
                HealBot_Options_SetLabel(object, "")
            end
        else
            HealBot_Options_SetLabel(object, "")
        end
    end
end

function HealBot_Options_NewAura_SetIcon(object, id)
      --HealBot_setCall("HealBot_Options_ComboClass_SetIcon")
    if object then
        local sIcon=HealBot_WoWAPI_SpellTexture(id)
        local g=_G[object]
        if g then
            g.id=id
            if sIcon then
                g:SetTexture(sIcon)
                g:SetAlpha(1)
            else
                g:SetAlpha(0)
            end
        end
    end
end

function HealBot_Options_ActionIconsAlertBuffList_Changed(text)
    if hb_lVars["ActionIconsCondNo"] == 4 then
        HealBot_Options_ActionIconsSelfAlertBuffname:SetText(text)
    else
        HealBot_Options_ActionIconsAlertBuffname:SetText(text)
    end
    HealBot_Options_ActionIconsAlertBuffHelp_OnClick()
end


function HealBot_Options_ActionIconsAlertBuffListFilter_DropDown(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertDebuffList_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AuraHistoryCat"]), 1 do
        info.text=HealBot_Options_Lists["AuraHistoryCat"][j];
        info.func=function(self)
                        hb_lVars["AIconBuffByHistoryFilter"]=j
                        UIDropDownMenu_SetText(HealBot_Options_ActionIconsAlertBuffListFilter,HealBot_Options_Lists["AuraHistoryCat"][j])
                        HealBot_Options_ActionIconsAlertBuffList.initialize=HealBot_Options_ActionIconsAlertBuffList_DropDown
                        HealBot_Options_ActionIconsBuffByHistory_NewCat()
                    end
        info.checked=false;
        if hb_lVars["AIconBuffByHistoryFilter"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_ActionIconsBuffByHistory_NewCat()
    local BuffCat_List=hbv_Auras_GetSortedNames("BUFFS", hb_lVars["AIconBuffByHistoryFilter"])
    if #BuffCat_List > 0 then
        UIDropDownMenu_SetText(HealBot_Options_ActionIconsAlertBuffList, BuffCat_List[1])
    else
        UIDropDownMenu_SetText(HealBot_Options_ActionIconsAlertBuffList, HEALBOT_WORDS_NONE)
    end
end

function HealBot_Options_ActionIconsAlertBuffList_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertDebuffList_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local BuffCat_List=hbv_Auras_GetSortedNames("BUFFS", hb_lVars["AIconBuffByHistoryFilter"])
    if getn(BuffCat_List) > 25 then
        if level == 1 then
            info.text=HEALBOT_WORDS_NONE;
            info.func=function(self)
                            HealBot_Options_ActionIconsAlertBuffList_Changed("")
                        end
            info.checked=false;
            UIDropDownMenu_AddButton(info);
            for j=1, ceil(getn(BuffCat_List)/25), 1 do
                local n=j*25
                if n > getn(BuffCat_List) then n=getn(BuffCat_List) end
                info.text="    "..((j*25)-24).." - "..n;
                info.hasArrow=true
                info.notCheckable=true
                info.menuList=j, true, j
                UIDropDownMenu_AddButton(info)
            end
        else
            local n=menuList*25
            if n > getn(BuffCat_List) then n=getn(BuffCat_List) end
            for j=((menuList*25)-24), n, 1 do
                info.text=BuffCat_List[j];
                info.func=function(self)
                                local sId=HealBot_Options_CDebuffGetId(self:GetText())
                                local sName=HealBot_Options_SpellGetName(sId)
                                HealBot_Options_ActionIconsAlertBuffList_Changed(sName)
                            end
                info.checked=false;
                UIDropDownMenu_AddButton(info, level);
            end
        end
    else
        info.text=HEALBOT_WORDS_NONE;
        info.func=function(self)
                        HealBot_Options_ActionIconsAlertBuffList_Changed("")
                    end
        info.checked=false;
        UIDropDownMenu_AddButton(info);
        for j=1, getn(BuffCat_List), 1 do
            info.text=BuffCat_List[j];
            info.func=function(self)
                        local sId=HealBot_Options_CDebuffGetId(self:GetText())
                        local sName=HealBot_Options_SpellGetName(sId)
                        HealBot_Options_ActionIconsAlertBuffList_Changed(sName)
                    end
            info.checked=false;
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_BuffByHistoryFilter_DropDown(self)
      --HealBot_setCall("HealBot_Options_CDebuffTxt1_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AuraHistoryCat"]), 1 do
        info.text=HealBot_Options_Lists["AuraHistoryCat"][j];
        info.func=function(self)
                        hb_lVars["BuffByHistoryFilter"]=j
                        UIDropDownMenu_SetText(HealBot_Options_BuffByHistoryFilter,HealBot_Options_Lists["AuraHistoryCat"][j])
                        HealBot_Options_BuffByHistory.initialize=HealBot_Options_BuffByHistory_DropDown
                        HealBot_Options_BuffByHistory_NewCat()
                    end
        info.checked=false;
        if hb_lVars["BuffByHistoryFilter"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_BuffByHistory_NewCat()
    local BuffCat_List=hbv_Auras_GetSortedNewBuffs(hb_lVars["BuffByHistoryFilter"])
    if #BuffCat_List > 0 then
        hb_lVars["BuffByHistorySpellID"]=HealBot_Options_CDebuffGetId(BuffCat_List[1])
        UIDropDownMenu_SetText(HealBot_Options_BuffByHistory, BuffCat_List[1])
        HealBot_Options_NewHistoryBuffBtn:Enable();
    else
        hb_lVars["BuffByHistorySpellID"]=0
        UIDropDownMenu_SetText(HealBot_Options_BuffByHistory, HEALBOT_WORDS_NONE)
        HealBot_Options_NewHistoryBuffBtn:Disable();
    end
    HealBot_Options_BuffByHistory_UpdateInfo(hb_lVars["BuffByHistorySpellID"])
end

function HealBot_Options_BuffByHistory_UpdateInfo(id)
    hb_lVars["BuffByHistorySpellID"]=id
    HealBot_Options_NewAura_SetIcon("HealBot_Options_BuffByHistoryIcon", hb_lVars["BuffByHistorySpellID"])
    HealBot_Options_NewAura_SetTime("HealBot_AddBuffByHistory_TimeText", "BUFFS", hb_lVars["BuffByHistorySpellID"], hb_lVars["BuffByHistoryFilter"])
end

function HealBot_Options_BuffByHistory_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_CDebuffTxt1_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local BuffCat_List=hbv_Auras_GetSortedNewBuffs(hb_lVars["BuffByHistoryFilter"])
    if getn(BuffCat_List) > 25 then
        if level == 1 then
            for j=1, ceil(getn(BuffCat_List)/25), 1 do
                local n=j*25
                if n > getn(BuffCat_List) then n=getn(BuffCat_List) end
                info.text="    "..((j*25)-24).." - "..n;
                info.hasArrow=true
                info.notCheckable=true
                info.menuList=j, true, j
                UIDropDownMenu_AddButton(info)
            end
        else
            local n=menuList*25
            local dText=nil
            if n > getn(BuffCat_List) then n=getn(BuffCat_List) end
            for j=((menuList*25)-24), n, 1 do
                info.text=BuffCat_List[j];
                info.func=function(self)
                                UIDropDownMenu_SetText(HealBot_Options_BuffByHistory,self.value)
                                HealBot_Options_BuffByHistory_UpdateInfo(HealBot_Options_CDebuffGetId(self.value))
                            end
                info.checked=false;
                dText=HealBot_Options_CDebuffGetId(BuffCat_List[j])
                if hb_lVars["BuffByHistorySpellID"] == dText then info.checked=true end
                UIDropDownMenu_AddButton(info, level);
            end
        end
    else
        local dText=nil
        for j=1, getn(BuffCat_List), 1 do
            info.text=BuffCat_List[j];
            info.func=function(self)
                            UIDropDownMenu_SetText(HealBot_Options_BuffByHistory,self.value)
                            HealBot_Options_BuffByHistory_UpdateInfo(HealBot_Options_CDebuffGetId(self.value))
                        end
            info.checked=false;
            dText=HealBot_Options_CDebuffGetId(BuffCat_List[j])
            if hb_lVars["BuffByHistorySpellID"] == dText then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_BuffBySelf_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_CDebuffTxt1_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local BuffCat_List=HealBot_Aura_ListUnusedBuffsBySelf()
    if getn(BuffCat_List) > 10 then
        if level == 1 then
            for j=1, ceil(getn(BuffCat_List)/10), 1 do
                local n=j*10
                if n > getn(BuffCat_List) then n=getn(BuffCat_List) end
                info.text="    "..((j*10)-9).." - "..n;
                info.hasArrow=true
                info.notCheckable=true
                info.menuList=j, true, j
                UIDropDownMenu_AddButton(info)
            end
        else
            local n=menuList*10
            local dText=nil
            if n > getn(BuffCat_List) then n=getn(BuffCat_List) end
            for j=((menuList*10)-9), n, 1 do
                info.text=BuffCat_List[j];
                info.func=function(self)
                                hb_lVars["BuffBySelfSpellID"]=HealBot_Options_CDebuffGetId(self.value)
                                UIDropDownMenu_SetText(HealBot_Options_BuffBySelf,self.value)
                                HealBot_Options_NewAura_SetIcon("HealBot_Options_BuffBySelfIcon", hb_lVars["BuffBySelfSpellID"])
                            end
                info.checked=false;
                dText=HealBot_Options_CDebuffGetId(BuffCat_List[j])
                if hb_lVars["BuffBySelfSpellID"] == dText then info.checked=true end
                UIDropDownMenu_AddButton(info, level);
            end
        end
    else
        local dText=nil
        for j=1, getn(BuffCat_List), 1 do
            info.text=BuffCat_List[j];
            info.func=function(self)
                            hb_lVars["BuffBySelfSpellID"]=HealBot_Options_CDebuffGetId(self.value)
                            UIDropDownMenu_SetText(HealBot_Options_BuffBySelf,self.value)
                            HealBot_Options_NewAura_SetIcon("HealBot_Options_BuffBySelfIcon", hb_lVars["BuffBySelfSpellID"])
                        end
            info.checked=false;
            dText=HealBot_Options_CDebuffGetId(BuffCat_List[j])
            if hb_lVars["BuffBySelfSpellID"] == dText then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_BuffByClass_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_CDebuffTxt1_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local BuffCat_List, BuffCat_Info=HealBot_Aura_ListUnusedBuffsByOther(true)
    if getn(BuffCat_List) > 25 then
        if level == 1 then
            for j=1, ceil(getn(BuffCat_List)/25), 1 do
                local n=j*25
                if n > getn(BuffCat_List) then n=getn(BuffCat_List) end
                info.text="    "..((j*25)-24).." - "..n;
                info.hasArrow=true
                info.notCheckable=true
                info.menuList=j, true, j
                UIDropDownMenu_AddButton(info)
            end
        else
            local n=menuList*25
            local dText=nil
            if n > getn(BuffCat_List) then n=getn(BuffCat_List) end
            for j=((menuList*25)-24), n, 1 do
                info.text=BuffCat_List[j];
                info.func=function(self)
                                hb_lVars["BuffByClassSpellID"]=HealBot_Options_CDebuffGetId(self.value)
                                UIDropDownMenu_SetText(HealBot_Options_BuffByClass,self.value)
                                HealBot_Options_NewAura_SetIcon("HealBot_Options_BuffByClassIcon", hb_lVars["BuffByClassSpellID"])
                                HealBot_Options_NewAura_SetName("HealBot_AddBuffByOther_CasterText", BuffCat_Info[self.value])
                            end
                info.checked=false;
                dText=HealBot_Options_CDebuffGetId(BuffCat_List[j])
                if hb_lVars["BuffByClassSpellID"] == dText then info.checked=true end
                UIDropDownMenu_AddButton(info, level);
            end
        end
    else
        local dText=nil
        for j=1, getn(BuffCat_List), 1 do
            info.text=BuffCat_List[j];
            info.func=function(self)
                            hb_lVars["BuffByClassSpellID"]=HealBot_Options_CDebuffGetId(self.value)
                            UIDropDownMenu_SetText(HealBot_Options_BuffByClass,self.value)
                            HealBot_Options_NewAura_SetIcon("HealBot_Options_BuffByClassIcon", hb_lVars["BuffByClassSpellID"])
                            HealBot_Options_NewAura_SetName("HealBot_AddBuffByOther_CasterText", BuffCat_Info[self.value])
                        end
            info.checked=false;
            dText=HealBot_Options_CDebuffGetId(BuffCat_List[j])
            if hb_lVars["BuffByClassSpellID"] == dText then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_BuffByOther_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_CDebuffTxt1_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local BuffCat_List, BuffCat_Info=HealBot_Aura_ListUnusedBuffsByOther(false)
    if getn(BuffCat_List) > 25 then
        if level == 1 then
            for j=1, ceil(getn(BuffCat_List)/25), 1 do
                local n=j*25
                if n > getn(BuffCat_List) then n=getn(BuffCat_List) end
                info.text="    "..((j*25)-24).." - "..n;
                info.hasArrow=true
                info.notCheckable=true
                info.menuList=j, true, j
                UIDropDownMenu_AddButton(info)
            end
        else
            local n=menuList*25
            local dText=nil
            if n > getn(BuffCat_List) then n=getn(BuffCat_List) end
            for j=((menuList*25)-24), n, 1 do
                info.text=BuffCat_List[j];
                info.func=function(self)
                                hb_lVars["BuffByOtherSpellID"]=HealBot_Options_CDebuffGetId(self.value)
                                UIDropDownMenu_SetText(HealBot_Options_BuffByOther,self.value)
                                HealBot_Options_NewAura_SetIcon("HealBot_Options_BuffByOtherIcon", hb_lVars["BuffByOtherSpellID"])
                                HealBot_Options_NewAura_SetName("HealBot_AddBuffByOther_CasterText", BuffCat_Info[self.value])
                            end
                info.checked=false;
                dText=HealBot_Options_CDebuffGetId(BuffCat_List[j])
                if hb_lVars["BuffByOtherSpellID"] == dText then info.checked=true end
                UIDropDownMenu_AddButton(info, level);
            end
        end
    else
        local dText=nil
        for j=1, getn(BuffCat_List), 1 do
            info.text=BuffCat_List[j];
            info.func=function(self)
                            hb_lVars["BuffByOtherSpellID"]=HealBot_Options_CDebuffGetId(self.value)
                            UIDropDownMenu_SetText(HealBot_Options_BuffByOther,self.value)
                            HealBot_Options_NewAura_SetIcon("HealBot_Options_BuffByOtherIcon", hb_lVars["BuffByOtherSpellID"])
                            HealBot_Options_NewAura_SetName("HealBot_AddBuffByOther_CasterText", BuffCat_Info[self.value])
                        end
            info.checked=false;
            dText=HealBot_Options_CDebuffGetId(BuffCat_List[j])
            if hb_lVars["BuffByOtherSpellID"] == dText then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_ActionIconsAlertDebuffListFilter_DropDown(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertDebuffList_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AuraHistoryCat"]), 1 do
        info.text=HealBot_Options_Lists["AuraHistoryCat"][j];
        info.func=function(self)
                        hb_lVars["AIconDebuffByHistoryFilter"]=j
                        UIDropDownMenu_SetText(HealBot_Options_ActionIconsAlertDebuffListFilter,HealBot_Options_Lists["AuraHistoryCat"][j])
                        HealBot_Options_ActionIconsAlertDebuffList.initialize=HealBot_Options_ActionIconsAlertDebuffList_DropDown
                        HealBot_Options_ActionIconsDebuffByHistory_NewCat()
                    end
        info.checked=false;
        if hb_lVars["AIconDebuffByHistoryFilter"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_ActionIconsDebuffByHistory_NewCat()
    local DebuffCat_List=hbv_Auras_GetSortedNames("DEBUFFS", hb_lVars["AIconDebuffByHistoryFilter"])
    if #DebuffCat_List > 0 then
        UIDropDownMenu_SetText(HealBot_Options_ActionIconsAlertDebuffList, DebuffCat_List[1])
    else
        UIDropDownMenu_SetText(HealBot_Options_ActionIconsAlertDebuffList, HEALBOT_WORDS_NONE)
    end
end

function HealBot_Options_ActionIconsAlertDebuffList_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertDebuffList_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local CDebuffCat_List=hbv_Auras_GetSortedNames("DEBUFFS", hb_lVars["AIconDebuffByHistoryFilter"])
    if getn(CDebuffCat_List) > 25 then
        if level == 1 then
            info.text=HEALBOT_WORDS_NONE;
            info.func=function(self)
                            HealBot_Options_ActionIconsAlertDebuffname:SetText("")
                            HealBot_Options_ActionIconsAlertDebuffHelp_OnClick()
                        end
            info.checked=false;
            UIDropDownMenu_AddButton(info);
            for j=1, ceil(getn(CDebuffCat_List)/25), 1 do
                local n=j*25
                if n > getn(CDebuffCat_List) then n=getn(CDebuffCat_List) end
                info.text="    "..((j*25)-24).." - "..n;
                info.hasArrow=true
                info.notCheckable=true
                info.menuList=j, true, j
                UIDropDownMenu_AddButton(info)
            end
        else
            local n=menuList*25
            if n > getn(CDebuffCat_List) then n=getn(CDebuffCat_List) end
            for j=((menuList*25)-24), n, 1 do
                info.text=CDebuffCat_List[j];
                info.func=function(self)
                                local sId=HealBot_Options_CDebuffGetId(self:GetText())
                                local sName=HealBot_Options_SpellGetName(sId)
                                HealBot_Options_ActionIconsAlertDebuffname:SetText(sName)
                                HealBot_Options_ActionIconsAlertDebuffHelp_OnClick()
                            end
                info.checked=false;
                UIDropDownMenu_AddButton(info, level);
            end
        end
    else
        for j=1, getn(CDebuffCat_List), 1 do
            info.text=CDebuffCat_List[j];
            info.func=function(self)
                        local sId=HealBot_Options_CDebuffGetId(self:GetText())
                        local sName=HealBot_Options_SpellGetName(sId)
                        HealBot_Options_ActionIconsAlertDebuffname:SetText(sName)
                        HealBot_Options_ActionIconsAlertDebuffHelp_OnClick()
                    end
            info.checked=false;
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_CDebuffByHistoryFilter_DropDown(self)
      --HealBot_setCall("HealBot_Options_CDebuffTxt1_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Lists["AuraHistoryCat"]), 1 do
        info.text=HealBot_Options_Lists["AuraHistoryCat"][j];
        info.func=function(self)
                        hb_lVars["DebuffByHistoryFilter"]=j
                        UIDropDownMenu_SetText(HealBot_Options_CDebuffByHistoryFilter,HealBot_Options_Lists["AuraHistoryCat"][j])
                        HealBot_Options_CDebuffByHistory.initialize=HealBot_Options_CDebuffByHistory_DropDown
                        HealBot_Options_CDebuffByHistory_NewCat()
                    end
        info.checked=false;
        if hb_lVars["DebuffByHistoryFilter"] == j then info.checked=true end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_CDebuffByHistory_NewCat()
    local CDebuffCat_List=hbv_Auras_GetSortedNewDebuffs(hb_lVars["DebuffByHistoryFilter"])
    if #CDebuffCat_List > 0 then
        hb_lVars["CDebuffByHistorySpellID"]=HealBot_Options_CDebuffGetId(CDebuffCat_List[1])
        UIDropDownMenu_SetText(HealBot_Options_CDebuffByHistory, CDebuffCat_List[1])
        HealBot_Options_NewHistoryCDebuffBtn:Enable();
    else
        hb_lVars["CDebuffByHistorySpellID"]=0
        UIDropDownMenu_SetText(HealBot_Options_CDebuffByHistory, HEALBOT_WORDS_NONE)
        HealBot_Options_NewHistoryCDebuffBtn:Disable();
    end
    HealBot_Options_CDebuffByHistory_UpdateInfo(hb_lVars["CDebuffByHistorySpellID"])
end

function HealBot_Options_CDebuffByHistory_UpdateInfo(id)
    hb_lVars["CDebuffByHistorySpellID"]=id
    HealBot_Options_NewAura_SetIcon("HealBot_Options_CDebuffByHistoryIcon", hb_lVars["CDebuffByHistorySpellID"])
    HealBot_Options_NewAura_SetTime("HealBot_AddCDebuffByHistory_TimeText", "DEBUFFS", hb_lVars["CDebuffByHistorySpellID"], hb_lVars["DebuffByHistoryFilter"])
end

function HealBot_Options_CDebuffByHistory_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_CDebuffTxt1_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local CDebuffCat_List=hbv_Auras_GetSortedNewDebuffs(hb_lVars["DebuffByHistoryFilter"])
    if getn(CDebuffCat_List) > 25 then
        if level == 1 then
            for j=1, ceil(getn(CDebuffCat_List)/25), 1 do
                local n=j*25
                if n > getn(CDebuffCat_List) then n=getn(CDebuffCat_List) end
                info.text="    "..((j*25)-24).." - "..n;
                info.hasArrow=true
                info.notCheckable=true
                info.menuList=j, true, j
                UIDropDownMenu_AddButton(info)
            end
        else
            local n=menuList*25
            local dText=nil
            if n > getn(CDebuffCat_List) then n=getn(CDebuffCat_List) end
            for j=((menuList*25)-24), n, 1 do
                info.text=CDebuffCat_List[j];
                info.func=function(self)
                                HealBot_Options_CDebuffByHistory_UpdateInfo(HealBot_Options_CDebuffGetId(self.value))
                                UIDropDownMenu_SetText(HealBot_Options_CDebuffByHistory,self.value)
                            end
                info.checked=false;
                dText=HealBot_Options_CDebuffGetId(CDebuffCat_List[j])
                if hb_lVars["CDebuffByHistorySpellID"] == dText then info.checked=true end
                UIDropDownMenu_AddButton(info, level);
            end
        end
    else
        local dText=nil
        for j=1, getn(CDebuffCat_List), 1 do
            info.text=CDebuffCat_List[j];
            info.func=function(self)
                            HealBot_Options_CDebuffByHistory_UpdateInfo(HealBot_Options_CDebuffGetId(self.value))
                            UIDropDownMenu_SetText(HealBot_Options_CDebuffByHistory,self.value)
                        end
            info.checked=false;
            dText=HealBot_Options_CDebuffGetId(CDebuffCat_List[j])
            if hb_lVars["CDebuffByHistorySpellID"] == dText then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_CDebuffBySelf_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_CDebuffTxt1_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local CDebuffCat_List=HealBot_Aura_ListUnusedDebuffsBySelf()
    if getn(CDebuffCat_List) > 10 then
        if level == 1 then
            for j=1, ceil(getn(CDebuffCat_List)/10), 1 do
                local n=j*10
                if n > getn(CDebuffCat_List) then n=getn(CDebuffCat_List) end
                info.text="    "..((j*10)-9).." - "..n;
                info.hasArrow=true
                info.notCheckable=true
                info.menuList=j, true, j
                UIDropDownMenu_AddButton(info)
            end
        else
            local n=menuList*10
            local dText=nil
            if n > getn(CDebuffCat_List) then n=getn(CDebuffCat_List) end
            for j=((menuList*10)-9), n, 1 do
                info.text=CDebuffCat_List[j];
                info.func=function(self)
                                hb_lVars["CDebuffBySelfSpellID"]=HealBot_Options_CDebuffGetId(self.value)
                                UIDropDownMenu_SetText(HealBot_Options_CDebuffBySelf,self.value)
                                HealBot_Options_NewAura_SetIcon("HealBot_Options_CDebuffBySelfIcon", hb_lVars["CDebuffBySelfSpellID"])
                            end
                info.checked=false;
                dText=HealBot_Options_CDebuffGetId(CDebuffCat_List[j])
                if hb_lVars["CDebuffBySelfSpellID"] == dText then info.checked=true end
                UIDropDownMenu_AddButton(info, level);
            end
        end
    else
        local dText=nil
        for j=1, getn(CDebuffCat_List), 1 do
            info.text=CDebuffCat_List[j];
            info.func=function(self)
                            hb_lVars["CDebuffBySelfSpellID"]=HealBot_Options_CDebuffGetId(self.value)
                            UIDropDownMenu_SetText(HealBot_Options_CDebuffBySelf,self.value)
                            HealBot_Options_NewAura_SetIcon("HealBot_Options_CDebuffBySelfIcon", hb_lVars["CDebuffBySelfSpellID"])
                        end
            info.checked=false;
            dText=HealBot_Options_CDebuffGetId(CDebuffCat_List[j])
            if hb_lVars["CDebuffBySelfSpellID"] == dText then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_CDebuffByFriend_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_CDebuffTxt1_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local CDebuffCat_List, CDebuffCat_Info=HealBot_Aura_ListUnusedDebuffsByOther("1")
    if getn(CDebuffCat_List) > 25 then
        if level == 1 then
            for j=1, ceil(getn(CDebuffCat_List)/25), 1 do
                local n=j*25
                if n > getn(CDebuffCat_List) then n=getn(CDebuffCat_List) end
                info.text="    "..((j*25)-24).." - "..n;
                info.hasArrow=true
                info.notCheckable=true
                info.menuList=j, true, j
                UIDropDownMenu_AddButton(info)
            end
        else
            local n=menuList*25
            local dText=nil
            if n > getn(CDebuffCat_List) then n=getn(CDebuffCat_List) end
            for j=((menuList*25)-24), n, 1 do
                info.text=CDebuffCat_List[j];
                info.func=function(self)
                                hb_lVars["CDebuffByFriendSpellID"]=HealBot_Options_CDebuffGetId(self.value)
                                UIDropDownMenu_SetText(HealBot_Options_CDebuffByFriend,self.value)
                                HealBot_Options_NewAura_SetIcon("HealBot_Options_CDebuffByFriendIcon", hb_lVars["CDebuffByFriendSpellID"])
                                HealBot_Options_NewAura_SetName("HealBot_AddDebuffByFriend_CasterText", CDebuffCat_Info[self.value])
                            end
                info.checked=false;
                dText=HealBot_Options_CDebuffGetId(CDebuffCat_List[j])
                if hb_lVars["CDebuffByFriendSpellID"] == dText then info.checked=true end
                UIDropDownMenu_AddButton(info, level);
            end
        end
    else
        local dText=nil
        for j=1, getn(CDebuffCat_List), 1 do
            info.text=CDebuffCat_List[j];
            info.func=function(self)
                            hb_lVars["CDebuffByFriendSpellID"]=HealBot_Options_CDebuffGetId(self.value)
                            UIDropDownMenu_SetText(HealBot_Options_CDebuffByFriend,self.value)
                            HealBot_Options_NewAura_SetIcon("HealBot_Options_CDebuffByFriendIcon", hb_lVars["CDebuffByFriendSpellID"])
                            HealBot_Options_NewAura_SetName("HealBot_AddDebuffByFriend_CasterText", CDebuffCat_Info[self.value])
                        end
            info.checked=false;
            dText=HealBot_Options_CDebuffGetId(CDebuffCat_List[j])
            if hb_lVars["CDebuffByFriendSpellID"] == dText then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
end

function HealBot_Options_CDebuffByEnemy_DropDown(self, level, menuList)
      --HealBot_setCall("HealBot_Options_CDebuffTxt1_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local CDebuffCat_List, CDebuffCat_Info=HealBot_Aura_ListUnusedDebuffsByOther("2")
    if getn(CDebuffCat_List) > 25 then
        if level == 1 then
            for j=1, ceil(getn(CDebuffCat_List)/25), 1 do
                local n=j*25
                if n > getn(CDebuffCat_List) then n=getn(CDebuffCat_List) end
                info.text="    "..((j*25)-24).." - "..n;
                info.hasArrow=true
                info.notCheckable=true
                info.menuList=j, true, j
                UIDropDownMenu_AddButton(info)
            end
        else
            local n=menuList*25
            local dText=nil
            if n > getn(CDebuffCat_List) then n=getn(CDebuffCat_List) end
            for j=((menuList*25)-24), n, 1 do
                info.text=CDebuffCat_List[j];
                info.func=function(self)
                                hb_lVars["CDebuffByEnemySpellID"]=HealBot_Options_CDebuffGetId(self.value)
                                UIDropDownMenu_SetText(HealBot_Options_CDebuffByEnemy,self.value)
                                HealBot_Options_NewAura_SetIcon("HealBot_Options_CDebuffByEnemyIcon", hb_lVars["CDebuffByEnemySpellID"])
                                HealBot_Options_NewAura_SetName("HealBot_AddDebuffByEnemy_CasterText", CDebuffCat_Info[self.value])
                            end
                info.checked=false;
                dText=HealBot_Options_CDebuffGetId(CDebuffCat_List[j])
                if hb_lVars["CDebuffByEnemySpellID"] == dText then info.checked=true end
                UIDropDownMenu_AddButton(info, level);
            end
        end
    else
        local dText=nil
        for j=1, getn(CDebuffCat_List), 1 do
            info.text=CDebuffCat_List[j];
            info.func=function(self)
                            hb_lVars["CDebuffByEnemySpellID"]=HealBot_Options_CDebuffGetId(self.value)
                            UIDropDownMenu_SetText(HealBot_Options_CDebuffByEnemy,self.value)
                            HealBot_Options_NewAura_SetIcon("HealBot_Options_CDebuffByEnemyIcon", hb_lVars["CDebuffByEnemySpellID"])
                            HealBot_Options_NewAura_SetName("HealBot_AddDebuffByEnemy_CasterText", CDebuffCat_Info[self.value])
                        end
            info.checked=false;
            dText=HealBot_Options_CDebuffGetId(CDebuffCat_List[j])
            if hb_lVars["CDebuffByEnemySpellID"] == dText then info.checked=true end
            UIDropDownMenu_AddButton(info);
        end
    end
end

hb_lVars["numCustomDebuffs"]=0
function HealBot_Options_CDebuffCatNameUpdate()
      --HealBot_setCall("HealBot_Options_CDebuffCatNameUpdate")
    if hb_lVars["CDebuffCatID"] == 1 or hb_lVars["numCustomDebuffs"] == 0 then
        hb_lVars["customDebuffPriority"]=15
        local g=_G["HealBot_Options_CDCPriorityCustomText"]
        g:SetText(hb_lVars["customDebuffPriority"]);
        local x=HealBot_Globals.CustomDebuffsFilter[hb_lVars["CDebuffcustomSpellID"]] or 1
        g=_G["HealBot_Options_CDebuffFilterCustomText"]
        g:SetText(HealBot_Options_Lists["AuraFilters"][x]);
        HealBot_Options_DeleteCDebuffBtn:Disable();
        HealBot_Options_ResetCDebuffBtn:Disable();
        HealBot_Options_NewCDebuffBtn:Disable();
        HealBot_Options_CDCCastBy:Hide();
        HealBot_Options_CDCIDMethod:Hide();
        HealBot_Options_CDCCastByCustom:Show()
        HealBot_Options_CDCIDMethodCustom:Show()
        HealBot_Options_CDCPriorityCustom:Show()
        HealBot_Options_CDebuffFilterCustom:Show()
        HealBot_Options_CDCPriorityC:Hide()
        HealBot_Options_CDebuffFilterC:Hide()
        HealBot_Options_CDCIconGlow:Hide()
        HealBot_Options_CDCIconGlowCustom:Show()
        HealBot_Options_CDCIconSet:Hide()
        HealBot_Options_CDCIconSetCustom:Show()
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_CDebuffTag", false)
        if hb_lVars["CDebuffCatID"]>1 then
            HealBot_CustomColorpickb:Disable();
            HealBot_Options_CustomDebuffPresetColour:Disable();
            HealBot_Options_CDCCol:Hide();
            HealBot_Options_CDCColCustom:Show()
        else
            HealBot_CustomColorpickb:Enable();
            HealBot_Options_CustomDebuffPresetColour:Enable();
            HealBot_Options_CDCCol:Show();
            HealBot_Options_CDCColCustom:Hide()
        end
    else
        if HealBot_GlobalsDefaults.CustomDebuffs[hb_lVars["CDebuffcustomNameDefault"]] then
            hb_lVars["customDebuffPriority"]=HealBot_GlobalsDefaults.CustomDebuffs[hb_lVars["CDebuffcustomNameDefault"]]
        end
        HealBot_Options_CDCCastByCustom:Hide()
        HealBot_Options_CDCIDMethodCustom:Hide()
        HealBot_Options_CDCPriorityCustom:Hide()
        HealBot_Options_CDebuffFilterCustom:Hide()
        HealBot_Options_CDCCastBy:Show();
        HealBot_Options_CDCIDMethod:Show();
        HealBot_Options_CDCPriorityC:Show();
        HealBot_Options_CDebuffFilterC:Show();
        HealBot_Options_DeleteCDebuffBtn:Enable();
        HealBot_Options_ResetCDebuffBtn:Enable();
        HealBot_CustomColorpickb:Enable();
        HealBot_Options_CustomDebuffPresetColour:Enable();
        HealBot_Options_CDCCol:Show();
        HealBot_Options_CDCColCustom:Hide();
        HealBot_Options_CDCIconGlow:Show()
        HealBot_Options_CDCIconGlowCustom:Hide()
        HealBot_Options_CDCIconSetCustom:Hide()
        HealBot_Options_CDCIconSet:Show()
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_CDebuffTag", true)
    end
end

function HealBot_Options_CDCIDMethod_DropDown()
      --HealBot_setCall("HealBot_Options_CDCIDMethod_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    for j=1, getn(HealBot_Options_Class_HoTctlIDMethod_List), 1 do
        info.text=HealBot_Options_Class_HoTctlIDMethod_List[j]
        info.func=function(self)
                        local y=self:GetID()
                        if y == 1 then
                            HealBot_Globals.CustomDebuffIDMethod[hb_lVars["CDebuffcustomSpellID"]]=y
                        elseif hb_lVars["CDebuffcustomSpellID"] then
                            HealBot_Globals.CustomDebuffIDMethod[hb_lVars["CDebuffcustomSpellID"]]=nil
                        end
                        UIDropDownMenu_SetText(HealBot_Options_CDCIDMethod,HealBot_Options_Class_HoTctlIDMethod_List[j])
                        HealBot_Timers_Set("AURA","ConfigDebuffs")
                        HealBot_Timers_Set("AURA","DebuffPriority")
                        HealBot_Timers_Set("AURA","DebuffTagNames")
                    end
        info.checked=false;
        if (HealBot_Globals.CustomDebuffIDMethod[hb_lVars["CDebuffcustomSpellID"]] or 2) == j then info.checked=true; end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_CDCCastBy_DropDown()
      --HealBot_setCall("HealBot_Options_CDCCastBy_DropDown")
    local info=UIDropDownMenu_CreateInfo()
    local cby=nil
    if HealBot_Globals.CureCustomDefaultCastBy == 1 then
        cby=HEALBOT_CUSTOM_CASTBY_EVERYONE
    else
        cby=HEALBOT_CUSTOM_CASTBY_ENEMY
    end
    for j=1, getn(HealBot_CDebuffCasyBy_List), 1 do
        info.text=HealBot_CDebuffCasyBy_List[j];
        info.func=function(self)
                        hb_lVars["CDebuffcustomCastBy"]=self:GetText()
                        if hb_lVars["CDebuffcustomSpellID"] and self:GetID()>=1 and cby~=HealBot_CDebuffCasyBy_List[j] then
                            HealBot_Globals.FilterCustomDebuff[hb_lVars["CDebuffcustomSpellID"]]=self:GetID()
                        elseif hb_lVars["CDebuffcustomSpellID"] then
                            HealBot_Globals.FilterCustomDebuff[hb_lVars["CDebuffcustomSpellID"]]=nil
                        end
                        HealBot_Timers_Set("AURA","CustomDebuffFilterCastBy")
                        HealBot_Timers_Set("AURA","ResetDebuffCache")
                        UIDropDownMenu_SetText(HealBot_Options_CDCCastBy,hb_lVars["CDebuffcustomCastBy"])
                    end
        info.checked=false;
        if hb_lVars["CDebuffcustomSpellID"] then
            local x=HealBot_Globals.FilterCustomDebuff[hb_lVars["CDebuffcustomSpellID"]] or 0
            if x == 0 then
                if cby and cby == HealBot_CDebuffCasyBy_List[j] then x=j; end
            end
            if x == j then info.checked=true; end
        end
        UIDropDownMenu_AddButton(info);
    end
end

function HealBot_Options_NewCDebuff_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_NewCDebuff_OnTextChanged")
    local text=strtrim(self:GetText())
    if strlen(text)>0 and hb_lVars["CDebuffCatID"]>1 then
        HealBot_Options_NewCDebuffBtn:Enable();
    else
        HealBot_Options_NewCDebuffBtn:Disable();
    end
end

function HealBot_Options_NewHoTBuff_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_NewHoTBuff_OnTextChanged")
    local text=strtrim(self:GetText())
    if strlen(text)>0 then
        HealBot_Options_NewBuffHoTBtn:Enable();
    else
        HealBot_Options_NewBuffHoTBtn:Disable();
    end
end

function HealBot_Options_CDebuffTag_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_CDebuffTag_OnTextChanged")
    local text=strtrim(self:GetText())
    if strlen(text)>2 and hb_lVars["CDebuffcustomSpellID"] then
        HealBot_Globals.CDCTag[hb_lVars["CDebuffcustomSpellID"]]=text
    elseif hb_lVars["CDebuffcustomSpellID"] then
        HealBot_Globals.CDCTag[hb_lVars["CDebuffcustomSpellID"]]=nil
    end
    HealBot_Timers_Set("AURA","CustomDebuffListPrep")
    HealBot_Timers_Set("AURA","DebuffTagNames",true)
end

function HealBot_Options_HoTBuffTag_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_HoTBuffTag_OnTextChanged")
    local text=strtrim(self:GetText())
    local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"])
    if sId then
        if strlen(text)>2 then
            HealBot_Globals.CustomBuffTag[sId]=text
        else
            HealBot_Globals.CustomBuffTag[sId]=nil
        end
    end
    HealBot_Timers_Set("AURA","CustomBuffListPrep")
    HealBot_Timers_Set("AURA","BuffTagNames",true)
end

function HealBot_Options_BuffResetList()
      --HealBot_setCall("HealBot_Options_BuffResetList")
    local BuffCat_List=HealBot_Options_Class_HoTctlName_genList()
    hb_lVars["numCustomBuffs"]=#BuffCat_List
    HealBot_Options_BuffCatNameUpdate()
    HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
end

function HealBot_Options_NewCDebuffBtn_OnClick(NewCDebuffTxt)
      --HealBot_setCall("HealBot_Options_NewCDebuffBtn_OnClick")
    local name, _, _, _, _, _, spellId=HealBot_WoWAPI_SpellInfo(NewCDebuffTxt)
    local useId=NewCDebuffTxt
    if spellId then
        useId=spellId
    end
    if not name then name=NewCDebuffTxt end
    local unique=true;
    for k, _ in pairs(HealBot_Globals.CustomDebuffs) do
        if k == useId then unique=false; end
    end
    if unique then
        HealBot_Globals.CustomDebuffs[useId]=10;
        HealBot_Globals.CustomDebuffsShowBarCol[useId]=3;
    end
    HealBot_Globals.Custom_Debuff_Categories[useId]=hb_lVars["CDebuffCatID"]
    hb_lVars["CDebuffcustomSpellID"]=useId
    HealBot_Options_NewCDebuff:SetText("")
    HealBot_SetCDCBarColours()
  --  UIDropDownMenu_SetSelectedValue(HealBot_Options_CDebuffTxt1, useId);
    HealBot_Timers_Set("AURA","DebuffPriority")
    HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
    HealBot_Timers_Set("AURA","CustomDebuffListPrep")
end

function HealBot_Options_UpperFirstChar(str)
      --HealBot_setCall("HealBot_Options_UpperFirstChar")
    if type(str) == "string" then
        return string.upper(string.sub(str,1,1))..string.sub(str,2)
    else
        return str
    end
end

function HealBot_Options_NewCDebuffBtn_SetCat(debuff)
      --HealBot_setCall("HealBot_Options_NewCDebuffBtn_SetCat")
    debuff=HealBot_Options_UpperFirstChar(debuff)
    local name=HealBot_WoWAPI_SpellName(debuff) or debuff
    if name then
        name=string.sub(name,1,1)
        if string.find(name,"A") or string.find(name,"B") then
            hb_lVars["CDebuffCatID"]=2
        elseif string.find(name,"C") or string.find(name,"D") then
            hb_lVars["CDebuffCatID"]=3
        elseif string.find(name,"E") or string.find(name,"F") then
            hb_lVars["CDebuffCatID"]=4
        elseif string.find(name,"G") or string.find(name,"H") then
            hb_lVars["CDebuffCatID"]=5
        elseif string.find(name,"I") or string.find(name,"J") then
            hb_lVars["CDebuffCatID"]=6
        elseif string.find(name,"K") or string.find(name,"L") then
            hb_lVars["CDebuffCatID"]=7
        elseif string.find(name,"M") or string.find(name,"N") then
            hb_lVars["CDebuffCatID"]=8
        elseif string.find(name,"O") or string.find(name,"P") then
            hb_lVars["CDebuffCatID"]=9
        elseif string.find(name,"Q") or string.find(name,"R") then
            hb_lVars["CDebuffCatID"]=10
        elseif string.find(name,"S") or string.find(name,"T") then
            hb_lVars["CDebuffCatID"]=11
        elseif string.find(name,"U") or string.find(name,"V") then
            hb_lVars["CDebuffCatID"]=12
        elseif string.find(name,"W") or string.find(name,"Y") then
            hb_lVars["CDebuffCatID"]=13
        elseif string.find(name,"X") or string.find(name,"Z") then
            hb_lVars["CDebuffCatID"]=14
        end
        UIDropDownMenu_SetText(HealBot_Options_CDebuffCat, HealBot_Options_Lists["CDebuffCat"][hb_lVars["CDebuffCatID"]])
    end
    HealBot_Options_NewCDebuffBtn_OnClick(debuff)
end

function HealBot_Options_NewHoTBuffBtn_OnClick(NewHoTBuffTxt, class)
      --HealBot_setCall("HealBot_Options_NewHoTBuffBtn_OnClick")
    NewHoTBuffTxt=HealBot_Options_UpperFirstChar(NewHoTBuffTxt)
    local name, _, _, _, _, _, spellId=HealBot_WoWAPI_SpellInfo(NewHoTBuffTxt)
    local useId=NewHoTBuffTxt
    local cClass=class or hb_lVars["FilterHoTctlNameTrim"] or "ALL"
    if spellId then useId=spellId end
    if not name then name=NewHoTBuffTxt end
    local unique=true;
    for xClass,_  in pairs(HealBot_Globals.WatchHoT) do
        for bId,x  in pairs(HealBot_Globals.WatchHoT[xClass]) do
            if bId == useId then unique=false; end
        end
    end
    if unique then
        HealBot_Globals.WatchHoT[cClass][useId]=2
        HealBot_Timers_Set("AURA","AuraResetHoTList")
    end
    HealBot_Options_NewBuffHoT:SetText("")
    hb_lVars["HoTname"]=HealBot_Options_CDebuffTextID(useId)
    HealBot_Timers_Set("AURA","BuffResetList")
    HealBot_Timers_Set("AURA","ConfigClassHoT")
    if hb_lVars["FilterHoTctlName"] == HEALBOT_CLASSES_ALL then
        HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
    end
end

function HealBot_Options_CloseAddNewCDebuff()
    HealBot_Options_CustomCureFrame:Show()
    HealBot_Options_NewCustomCureFrame:Hide()
end

function HealBot_Options_AddNewCDebuff_OnClick()
    HealBot_Options_CustomCureFrame:Hide()
    HealBot_Options_NewCustomCureFrame:Show()
    hb_lVars["DebuffByHistoryFilter"]=1
    HealBot_Options_CDebuffByHistoryFilter.initialize=HealBot_Options_CDebuffByHistoryFilter_DropDown
    UIDropDownMenu_SetText(HealBot_Options_CDebuffByHistoryFilter,HealBot_Options_Lists["AuraHistoryCat"][hb_lVars["DebuffByHistoryFilter"]])
    HealBot_Options_CDebuffByHistory_NewCat()
    HealBot_Options_CDebuffByHistory.initialize=HealBot_Options_CDebuffByHistory_DropDown
    HealBot_Options_CDebuffBySelf.initialize=HealBot_Options_CDebuffBySelf_DropDown
    HealBot_Options_CDebuffByFriend.initialize=HealBot_Options_CDebuffByFriend_DropDown
    HealBot_Options_CDebuffByEnemy.initialize=HealBot_Options_CDebuffByEnemy_DropDown
    local CDebuffCat_List,CDebuffCat_Info
    CDebuffCat_List=HealBot_Aura_ListUnusedDebuffsBySelf()
    if #CDebuffCat_List > 0 then
        hb_lVars["CDebuffBySelfSpellID"]=HealBot_Options_CDebuffGetId(CDebuffCat_List[1])
        UIDropDownMenu_SetText(HealBot_Options_CDebuffBySelf, CDebuffCat_List[1])
        HealBot_Options_NewAura_SetIcon("HealBot_Options_CDebuffBySelfIcon", hb_lVars["CDebuffBySelfSpellID"])
        HealBot_Options_NewSelfCDebuffBtn:Enable();
    else
        UIDropDownMenu_SetText(HealBot_Options_CDebuffBySelf, HEALBOT_WORDS_NONE)
        HealBot_Options_NewSelfCDebuffBtn:Disable();
    end
    CDebuffCat_List,CDebuffCat_Info=HealBot_Aura_ListUnusedDebuffsByOther("1")
    if #CDebuffCat_List > 0 then
        hb_lVars["CDebuffByFriendSpellID"]=HealBot_Options_CDebuffGetId(CDebuffCat_List[1])
        UIDropDownMenu_SetText(HealBot_Options_CDebuffByFriend, CDebuffCat_List[1])
        HealBot_Options_NewAura_SetIcon("HealBot_Options_CDebuffByFriendIcon", hb_lVars["CDebuffByFriendSpellID"])
        HealBot_Options_NewAura_SetName("HealBot_AddDebuffByFriend_CasterText", CDebuffCat_Info[CDebuffCat_List[1]])
        HealBot_Options_NewFriendCDebuffBtn:Enable();
    else
        UIDropDownMenu_SetText(HealBot_Options_CDebuffByFriend, HEALBOT_WORDS_NONE)
        HealBot_Options_NewFriendCDebuffBtn:Disable();
    end
    CDebuffCat_List,CDebuffCat_Info=HealBot_Aura_ListUnusedDebuffsByOther("2")
    if #CDebuffCat_List > 0 then
        hb_lVars["CDebuffByEnemySpellID"]=HealBot_Options_CDebuffGetId(CDebuffCat_List[1])
        UIDropDownMenu_SetText(HealBot_Options_CDebuffByEnemy, CDebuffCat_List[1])
        HealBot_Options_NewAura_SetIcon("HealBot_Options_CDebuffByEnemyIcon", hb_lVars["CDebuffByEnemySpellID"])
        HealBot_Options_NewAura_SetName("HealBot_AddDebuffByEnemy_CasterText", CDebuffCat_Info[CDebuffCat_List[1]])
        HealBot_Options_NewEnemyCDebuffBtn:Enable();
    else
        UIDropDownMenu_SetText(HealBot_Options_CDebuffByEnemy, HEALBOT_WORDS_NONE)
        HealBot_Options_NewEnemyCDebuffBtn:Disable();
    end
end

function HealBot_Options_CloseAddNewBuff()
    HealBot_Options_BuffIconFrame:Show()
    HealBot_Options_NewCustomBuffsFrame:Hide()
end

function HealBot_Options_AddNewBuff_OnClick()
    HealBot_Options_BuffIconFrame:Hide()
    HealBot_Options_NewCustomBuffsFrame:Show()
    hb_lVars["BuffByHistoryFilter"]=1
    HealBot_Options_BuffByHistoryFilter.initialize=HealBot_Options_BuffByHistoryFilter_DropDown
    UIDropDownMenu_SetText(HealBot_Options_BuffByHistoryFilter,HealBot_Options_Lists["AuraHistoryCat"][hb_lVars["BuffByHistoryFilter"]])
    HealBot_Options_BuffByHistory_NewCat()
    HealBot_Options_BuffByHistory.initialize=HealBot_Options_BuffByHistory_DropDown
    HealBot_Options_BuffBySelf.initialize=HealBot_Options_BuffBySelf_DropDown
    HealBot_Options_BuffByClass.initialize=HealBot_Options_BuffByClass_DropDown
    HealBot_Options_BuffByOther.initialize=HealBot_Options_BuffByOther_DropDown
    local BuffCat_List,BuffCat_Info
    BuffCat_List=HealBot_Aura_ListUnusedBuffsBySelf()
    if #BuffCat_List > 0 then
        hb_lVars["BuffBySelfSpellID"]=HealBot_Options_CDebuffGetId(BuffCat_List[1])
        UIDropDownMenu_SetText(HealBot_Options_BuffBySelf, BuffCat_List[1])
        HealBot_Options_NewAura_SetIcon("HealBot_Options_BuffBySelfIcon", hb_lVars["BuffBySelfSpellID"])
        HealBot_Options_NewSelfBuffBtn:Enable();
    else
        UIDropDownMenu_SetText(HealBot_Options_BuffBySelf, HEALBOT_WORDS_NONE)
        HealBot_Options_NewSelfBuffBtn:Disable();
    end
    BuffCat_List,BuffCat_Info=HealBot_Aura_ListUnusedBuffsByOther(true)
    if #BuffCat_List > 0 then
        hb_lVars["BuffByClassSpellID"]=HealBot_Options_CDebuffGetId(BuffCat_List[1])
        UIDropDownMenu_SetText(HealBot_Options_BuffByClass, BuffCat_List[1])
        HealBot_Options_NewAura_SetIcon("HealBot_Options_BuffByClassIcon", hb_lVars["BuffByClassSpellID"])
        HealBot_Options_NewAura_SetName("HealBot_AddBuffByClass_CasterText", BuffCat_Info[BuffCat_List[1]])
        HealBot_Options_NewClassBuffBtn:Enable();
    else
        UIDropDownMenu_SetText(HealBot_Options_BuffByClass, HEALBOT_WORDS_NONE)
        HealBot_Options_NewClassBuffBtn:Disable();
    end
    BuffCat_List,BuffCat_Info=HealBot_Aura_ListUnusedBuffsByOther(false)
    if #BuffCat_List > 0 then
        hb_lVars["BuffByOtherSpellID"]=HealBot_Options_CDebuffGetId(BuffCat_List[1])
        UIDropDownMenu_SetText(HealBot_Options_BuffByOther, BuffCat_List[1])
        HealBot_Options_NewAura_SetIcon("HealBot_Options_BuffByOtherIcon", hb_lVars["BuffByOtherSpellID"])
        HealBot_Options_NewAura_SetName("HealBot_AddBuffByOther_CasterText", BuffCat_Info[BuffCat_List[1]])
        HealBot_Options_NewOtherBuffBtn:Enable();
    else
        UIDropDownMenu_SetText(HealBot_Options_BuffByOther, HEALBOT_WORDS_NONE)
        HealBot_Options_NewOtherBuffBtn:Disable();
    end
end

function HealBot_Options_ConfirmAddNewCDebuff(NewCDebuffTxt)
      --HealBot_setCall("HealBot_Options_ConfirmNewCDebuff")
    local name=HealBot_WoWAPI_SpellName(NewCDebuffTxt)
    if not name then name=NewCDebuffTxt end
    if name and name~="" then
        StaticPopupDialogs["HEALBOT_OPTIONS_NEWCDEBUFF"]={
            text=HEALBOT_OPTIONS_SAVESKIN..": "..(name or NewCDebuffTxt),
            button1=HEALBOT_WORDS_YES,
            button2=HEALBOT_WORDS_NO,
            OnAccept=function()
                HealBot_Options_NewCDebuffBtn_SetCat(NewCDebuffTxt); HealBot_Options_CloseAddNewCDebuff()
            end,
            timeout=0,
            whileDead=1,
            hideOnEscape=1
        };

        StaticPopup_Show ("HEALBOT_OPTIONS_NEWCDEBUFF", NewCDebuffTxt);
    else
        StaticPopupDialogs["HEALBOT_OPTIONS_ERROR"]={
            text=HEALBOT_WORDS_ERROR..": %s",
            button1=OKAY,
            OnAccept=function()
                HealBot_Options_CloseAddNewCDebuff()
            end,
            showAlert=1,
            timeout=0,
            whileDead=1,
            hideOnEscape=1
        };

        StaticPopup_Show ("HEALBOT_OPTIONS_ERROR", HEALBOT_SPELL_NOT_FOUND);
    end
end

function HealBot_Options_ConfirmNewCDebuff()
    local NewCDebuffTxt=strtrim(HealBot_Options_NewCDebuff:GetText())
    HealBot_Options_ConfirmAddNewCDebuff(NewCDebuffTxt)
end

function HealBot_Options_ConfirmNewHistoryCDebuff()
    HealBot_Options_ConfirmAddNewCDebuff(hb_lVars["CDebuffByHistorySpellID"])
end

function HealBot_Options_ConfirmNewSelfCDebuff()
    HealBot_Options_ConfirmAddNewCDebuff(hb_lVars["CDebuffBySelfSpellID"])
end

function HealBot_Options_ConfirmNewFriendCDebuff()
    HealBot_Options_ConfirmAddNewCDebuff(hb_lVars["CDebuffByFriendSpellID"])
end

function HealBot_Options_ConfirmNewEnemyCDebuff()
    HealBot_Options_ConfirmAddNewCDebuff(hb_lVars["CDebuffByEnemySpellID"])
end

function HealBot_Options_ConfirmAddNewHoTBuff(NewHoTBuffTxt)
      --HealBot_setCall("HealBot_Options_ConfirmNewHoTBuff")
    local name=HealBot_WoWAPI_SpellName(NewHoTBuffTxt)
    if not name then name=NewHoTBuffTxt end
    if name and name~="" then
        StaticPopupDialogs["HEALBOT_OPTIONS_NEWCDEBUFF"]={
            text=HEALBOT_OPTIONS_SAVESKIN..": "..name.."\n\n"..HEALBOT_SORTBY_CLASS..": "..hb_lVars["FilterHoTctlName"],
            button1=HEALBOT_WORDS_YES,
            button2=HEALBOT_WORDS_NO,
            OnAccept=function()
                HealBot_Options_NewHoTBuffBtn_OnClick(NewHoTBuffTxt); HealBot_Options_CloseAddNewBuff()
            end,
            timeout=0,
            whileDead=1,
            hideOnEscape=1
        };

        StaticPopup_Show ("HEALBOT_OPTIONS_NEWCDEBUFF", NewHoTBuffTxt);
    else
        StaticPopupDialogs["HEALBOT_OPTIONS_ERROR"]={
            text=HEALBOT_WORDS_ERROR..": %s",
            button1=OKAY,
            OnAccept=function()
                HealBot_Options_CloseAddNewBuff()
            end,
            showAlert=1,
            timeout=0,
            whileDead=1,
            hideOnEscape=1
        };

        StaticPopup_Show ("HEALBOT_OPTIONS_ERROR", HEALBOT_SPELL_NOT_FOUND);
    end
end

function HealBot_Options_ConfirmNewHoTBuff()
    local NewHoTBuffTxt=strtrim(HealBot_Options_NewBuffHoT:GetText())
    HealBot_Options_ConfirmAddNewHoTBuff(NewHoTBuffTxt)
end

function HealBot_Options_ConfirmNewHistoryBuff()
    HealBot_Options_ConfirmAddNewHoTBuff(hb_lVars["BuffByHistorySpellID"])
end

function HealBot_Options_ConfirmNewSelfBuff()
    HealBot_Options_ConfirmAddNewHoTBuff(hb_lVars["BuffBySelfSpellID"])
end

function HealBot_Options_ConfirmNewClassBuff()
    HealBot_Options_ConfirmAddNewHoTBuff(hb_lVars["BuffByClassSpellID"])
end

function HealBot_Options_ConfirmNewOtherBuff()
    HealBot_Options_ConfirmAddNewHoTBuff(hb_lVars["BuffByOtherSpellID"])
end

function HealBot_Options_DeleteCDebuff(dId, dName)
      --HealBot_setCall("HealBot_Options_DeleteCDebuff")
    HealBot_Globals.Custom_Debuff_Categories[dId]=nil;
    HealBot_Globals.CustomDebuffs[dId]=nil;
    HealBot_Globals.CDCBarColour[dId]=nil
    HealBot_Globals.CustomDebuffsShowBarCol[dId]=nil
    HealBot_Globals.FilterCustomDebuff[dId]=nil
    HealBot_Globals.IgnoreCustomDebuff[dId]=nil
    HealBot_Globals.CustomDebuffIDMethod[dId]=nil
    HealBot_Globals.CustomDebuffsIconSet[dId]=nil
    HealBot_Globals.CustomDebuffsIconGlow[dId]=nil
    HealBot_Globals.CDCTag[dId]=nil
    HealBot_Globals.CustomDebuffs[dName]=nil;
    HealBot_Globals.CDCBarColour[dName]=nil
    HealBot_Globals.CustomDebuffsShowBarCol[dName]=nil
    HealBot_Globals.FilterCustomDebuff[dName]=nil
    HealBot_Globals.IgnoreCustomDebuff[dName]=nil
    HealBot_Globals.CustomDebuffsIconSet[dName]=nil
    HealBot_Globals.CustomDebuffsIconGlow[dName]=nil
    local sName=HealBot_Options_SpellGetName(sId)
    if sName and sName~=dName then
        HealBot_Globals.CustomDebuffs[sName]=nil;
        HealBot_Globals.CDCBarColour[sName]=nil
        HealBot_Globals.CustomDebuffsShowBarCol[sName]=nil
        HealBot_Globals.FilterCustomDebuff[sName]=nil
        HealBot_Globals.IgnoreCustomDebuff[sName]=nil
        HealBot_Globals.CustomDebuffsIconSet[sName]=nil
        HealBot_Globals.CustomDebuffsIconGlow[sName]=nil
    end
    HealBot_Options_setDebuffPriority()
    HealBot_SetCDCBarColours();
    HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
    HealBot_Timers_Set("AURA","CustomDebuffListPrep")
end

function HealBot_Options_DeleteCDebuffBtn_OnClick()
      --HealBot_setCall("HealBot_Options_DeleteCDebuffBtn_OnClick")
    local sName=HealBot_Options_SpellGetName(hb_lVars["CDebuffcustomSpellID"]) or "nil"
    HealBot_Options_DeleteCDebuff(hb_lVars["CDebuffcustomSpellID"], sName)
end

function HealBot_Options_DeleteBuffHoT(classTr, sId, bName)
      --HealBot_setCall("HealBot_Options_DeleteBuffHoT")
    HealBot_Globals.WatchHoT[classTr][sId]=nil
    HealBot_Globals.IgnoreCustomBuff[sId]=nil
    HealBot_Globals.IgnoreCustomBuff[bName]=nil
    HealBot_Globals.CustomBuffIDMethod[sId]=nil
    HealBot_Globals.CustomBuffIDMethod[bName]=nil
    HealBot_Globals.CustomBuffs[sId]=nil
    HealBot_Globals.CustomBuffTag[sId]=nil
    HealBot_Globals.CustomBuffs[bName]=nil
    HealBot_Globals.CustomBuffBarColour[sId]=nil
    HealBot_Globals.CustomBuffBarColour[bName]=nil
    HealBot_Globals.CustomBuffsShowBarCol[sId]=nil
    HealBot_Globals.CustomBuffsShowBarCol[bName]=nil
    HealBot_Globals.CustomBuffsIconSet[sId]=nil
    HealBot_Globals.CustomBuffsIconSet[bName]=nil
    HealBot_Globals.CustomBuffsIconGlow[sId]=nil
    HealBot_Globals.CustomBuffsIconGlow[bName]=nil
    local sName=bName or HealBot_Options_SpellGetName(sId)
    if sName and sName~=bName then
        HealBot_Globals.IgnoreCustomBuff[sName]=nil
        HealBot_Globals.CustomBuffs[sName]=nil
        HealBot_Globals.CustomBuffBarColour[sName]=nil
        HealBot_Globals.CustomBuffsShowBarCol[sName]=nil
        HealBot_Globals.CustomBuffsIconSet[sName]=nil
        HealBot_Globals.CustomBuffsIconGlow[sName]=nil
    end
    HealBot_Timers_Set("AURA","BuffResetList")
    HealBot_Timers_Set("AURA","ConfigClassHoT")
    HealBot_Timers_Set("AURA","AuraResetHoTList")
end

function HealBot_Options_DeleteBuffHoTBtn_OnClick()
      --HealBot_setCall("HealBot_Options_DeleteBuffHoTBtn_OnClick")
    local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"]) or "nil"
    HealBot_Options_DeleteBuffHoT(hb_lVars["FilterHoTctlNameTrim"], sId, hb_lVars["HoTname"])
end

function HealBot_Options_EnableDisableCDBtn_OnClick(self)
      --HealBot_setCall("HealBot_Options_EnableDisableCDBtn_OnClick")
    local InstName=HealBot_Aura_retLuVars("mapName")
    if HealBot_Globals.IgnoreCustomDebuff[hb_lVars["CDebuffcustomSpellID"]] and
        (HealBot_Globals.IgnoreCustomDebuff[hb_lVars["CDebuffcustomSpellID"]][InstName] or HealBot_Globals.IgnoreCustomDebuff[hb_lVars["CDebuffcustomSpellID"]]["ALL"]) then
        if HealBot_Globals.IgnoreCustomDebuff[hb_lVars["CDebuffcustomSpellID"]][InstName] then
            HealBot_Globals.IgnoreCustomDebuff[hb_lVars["CDebuffcustomSpellID"]][InstName]=nil
            HealBot_Globals.IgnoreCustomDebuff[hb_lVars["CDebuffcustomSpellID"]]["ALL"]=true
        else
            HealBot_Globals.IgnoreCustomDebuff[hb_lVars["CDebuffcustomSpellID"]]["ALL"]=nil
        end
    else
        if not HealBot_Globals.IgnoreCustomDebuff[hb_lVars["CDebuffcustomSpellID"]] then
            HealBot_Globals.IgnoreCustomDebuff[hb_lVars["CDebuffcustomSpellID"]]={}
        end
        HealBot_Globals.IgnoreCustomDebuff[hb_lVars["CDebuffcustomSpellID"]][InstName]=true
    end
    HealBot_Options_SetEnableDisableCDBtn()
    HealBot_Timers_Set("AURA","ResetDebuffCache")
end

function HealBot_Options_DebuffIconUpdate()
      --HealBot_setCall("HealBot_Options_DebuffIconUpdate")
    HealBot_Aura_ResetDebuffCache()
    HealBot_Options_SetEnableDisableCDBtn()
    HealBot_Timers_Set("AURA","CustomDebuffFilterDisabled")
    HealBot_Timers_Set("AURA","CustomDebuffListPrep")
end

function HealBot_Options_DebuffIconScaleUpdate(button, scale)
      --HealBot_setCall("HealBot_Options_DebuffIconScaleUpdate", button)
    hbv_Skins_SetIconVar(scale, "DSCALE", button.frame, hb_lVars["DebuffIconSet"])
    if HealBot_Options:IsVisible() then
        HealBot_Options_SkinsFramesIconsDebuffsGeneralTabIconScale()
    end
    HealBot_Options_framesChanged(true, true)
end

function HealBot_Options_DebuffIconPrioUpdate(spellId, prio)
      --HealBot_setCall("HealBot_Options_DebuffIconPrioUpdate")
    HealBot_Globals.CustomDebuffs[spellId]=prio
    local sName=HealBot_WoWAPI_SpellName(spellId)
    if sName and HealBot_Globals.CustomDebuffs[sName] then
        HealBot_Globals.CustomDebuffs[sName]=prio
    end
    HealBot_Timers_Set("AURA","DebuffPriority")
    HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
    HealBot_Timers_Set("AURA","CustomDebuffListPrep")
end

function HealBot_Options_DebuffIconColUpdate(spellId, col)
      --HealBot_setCall("HealBot_Options_DebuffIconColUpdate")
    local sName=HealBot_WoWAPI_SpellName(spellId)
    if col ~= 4 then
        HealBot_Globals.CustomDebuffsShowBarCol[spellId]=col
        if sName then HealBot_Globals.CustomDebuffsShowBarCol[sName]=col end
    else
        HealBot_Globals.CustomDebuffsShowBarCol[spellId]=nil
        if sName then HealBot_Globals.CustomDebuffsShowBarCol[sName]=nil end
    end
    HealBot_setLuVars("UpdateAllAura", 5)
    HealBot_Aura_setLuVars("updateAll", true)
    HealBot_Update_ClearAllDebuffs()
    HealBot_Timers_Set("AURA","CheckDebuffs")
    HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
end

function HealBot_Options_DebuffIconGlowUpdate(spellId, glow)
      --HealBot_setCall("HealBot_Options_DebuffIconGlowUpdate")
    if glow>1 then
        HealBot_Globals.CustomDebuffsIconGlow[spellId]=glow
    else
        HealBot_Globals.CustomDebuffsIconGlow[spellId]=nil
    end
    HealBot_Timers_Set("AURA","ConfigDebuffs")
    HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
end

function HealBot_Options_DebuffIconSetUpdate(spellId, set)
      --HealBot_setCall("HealBot_Options_DebuffIconSetUpdate")
    if set>1 then
        HealBot_Globals.CustomDebuffsIconSet[spellId]=set
    else
        HealBot_Globals.CustomDebuffsIconSet[spellId]=nil
    end
    HealBot_Aura_ResetDebuffCache()
    HealBot_Timers_Set("AURA","ConfigDebuffs")
    HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
end

function HealBot_Options_DebuffClick(button, id, click)
      --HealBot_setCall("HealBot_Options_DebuffClick", button)
    local spellId=HealBot_Aura_ReturnDebuffSpellId(button.id, id)
    if spellId>0 then
        if click == "LeftButton" then
            click="Left"
        elseif click == "MiddleButton" then
            click="Middle"
        elseif click == "RightButton" then
            click="Right"
        end
        local cmd=HealBot_Action_IconSpellPattern(click)
        if not HealBot_Globals.CustomDebuffs[spellId] then HealBot_Options_NewCDebuffBtn_SetCat(spellId) end
        if cmd == HEALBOT_IGNOREAURAALL then
            if not HealBot_Globals.IgnoreCustomDebuff[spellId] then HealBot_Globals.IgnoreCustomDebuff[spellId]={} end
            HealBot_Globals.IgnoreCustomDebuff[spellId]["ALL"]=true
            HealBot_Options_DebuffIconUpdate()
        elseif cmd == HEALBOT_ICONRAISEPRIO1 then
            if HealBot_Globals.CustomDebuffs[spellId] and HealBot_Globals.CustomDebuffs[spellId]>1 then
                HealBot_Options_DebuffIconPrioUpdate(spellId, HealBot_Globals.CustomDebuffs[spellId]-1)
            end
        elseif cmd == HEALBOT_ICONRAISEPRIO3 then
            if HealBot_Globals.CustomDebuffs[spellId] and HealBot_Globals.CustomDebuffs[spellId]>3 then
                HealBot_Options_DebuffIconPrioUpdate(spellId, HealBot_Globals.CustomDebuffs[spellId]-3)
            end
        elseif cmd == HEALBOT_ICONLOWERPRIO1 then
            if HealBot_Globals.CustomDebuffs[spellId] and HealBot_Globals.CustomDebuffs[spellId]<20 then
                HealBot_Options_DebuffIconPrioUpdate(spellId, HealBot_Globals.CustomDebuffs[spellId]+1)
            end
        elseif cmd == HEALBOT_ICONLOWERPRIO3 then
            if HealBot_Globals.CustomDebuffs[spellId] and HealBot_Globals.CustomDebuffs[spellId]<18 then
                HealBot_Options_DebuffIconPrioUpdate(spellId, HealBot_Globals.CustomDebuffs[spellId]+3)
            end
        elseif cmd == HEALBOT_ICONBARCOLOURON then
            HealBot_Options_DebuffIconColUpdate(spellId, 4)
        elseif cmd == HEALBOT_ICONBARCOLOURCYCLE then
            if (HealBot_Globals.CustomDebuffsShowBarCol[spellId] or 4) then
                if (HealBot_Globals.CustomDebuffsShowBarCol[spellId] or 4)<8 then
                    HealBot_Options_DebuffIconColUpdate(spellId, (HealBot_Globals.CustomDebuffsShowBarCol[spellId] or 4)+1)
                else
                    HealBot_Options_DebuffIconColUpdate(spellId, 2)
                end
            end
        elseif cmd == HEALBOT_ICONBARCOLOUROFF then
            HealBot_Options_DebuffIconColUpdate(spellId, 1)
        elseif cmd == HEALBOT_ICONRAISESCALE then
            if hbv_Skins_GetIconVar("DSCALE", button.frame, hb_lVars["DebuffIconSet"])<0.96 then
                HealBot_Options_DebuffIconScaleUpdate(button, hbv_Skins_GetIconVar("DSCALE", button.frame, hb_lVars["DebuffIconSet"])+0.05)
            end
        elseif cmd == HEALBOT_ICONLOWERSCALE then
            if hbv_Skins_GetIconVar("DSCALE", button.frame, hb_lVars["DebuffIconSet"])>0.29 then
                HealBot_Options_DebuffIconScaleUpdate(button, hbv_Skins_GetIconVar("DSCALE", button.frame, hb_lVars["DebuffIconSet"])-0.05)
            end
        elseif cmd == HEALBOT_ICONNEXTSET then
            if HealBot_Globals.CustomDebuffsIconSet[spellId] then
                if HealBot_Globals.CustomDebuffsIconSet[spellId]<3 then
                    HealBot_Options_DebuffIconSetUpdate(spellId, HealBot_Globals.CustomDebuffsIconSet[spellId]+1)
                else
                    HealBot_Options_DebuffIconSetUpdate(spellId, 1)
                end
            else
                HealBot_Options_DebuffIconSetUpdate(spellId, 2)
            end
            HealBot_Timers_Set("AURA","ConfigDebuffs")
        elseif cmd == HEALBOT_ICONPREVSET then
            if HealBot_Globals.CustomDebuffsIconSet[spellId] then
                if HealBot_Globals.CustomDebuffsIconSet[spellId]>1 then
                    HealBot_Options_DebuffIconSetUpdate(spellId, HealBot_Globals.CustomDebuffsIconSet[spellId]-1)
                else
                    HealBot_Options_DebuffIconSetUpdate(spellId, 3)
                end
            else
                HealBot_Options_DebuffIconSetUpdate(spellId, 3)
            end
            HealBot_Timers_Set("AURA","ConfigDebuffs")
        else
            local sName=HealBot_WoWAPI_SpellName(spellId) or "x"
            local iGlow=HealBot_Globals.CustomDebuffsIconGlow[spellId] or HealBot_Globals.CustomDebuffsIconGlow[sName] or 1
            if cmd == HEALBOT_ICONGLOWON then
                HealBot_Options_DebuffIconGlowUpdate(spellId, 3)
            elseif cmd == HEALBOT_ICONGLOWCYCLE then
                if iGlow<5 then
                    HealBot_Options_DebuffIconGlowUpdate(spellId, iGlow+1)
                else
                    HealBot_Options_DebuffIconGlowUpdate(spellId, 2)
                end
            elseif cmd == HEALBOT_ICONGLOWOFF then
                HealBot_Options_DebuffIconGlowUpdate(spellId, 1)
            end
            HealBot_Timers_Set("AURA","ConfigDebuffs")
        end
        HealBot_Options_DebuffIconTooltip(button, id)
    end
end

function HealBot_Options_DebuffIconTooltip(button, id)
      --HealBot_setCall("HealBot_Options_DebuffIconTooltip", button)
    if HealBot_Globals.ShowTooltip and HealBot_Data["TIPUSE"] then
        HealBot_Tooltip_DebuffIconTooltip(button, id)
    end
end

function HealBot_Options_BuffIconUpdate()
      --HealBot_setCall("HealBot_Options_BuffIconUpdate")
    HealBot_Timers_Set("AURA","ConfigClassHoT")
    HealBot_Options_SetEnableDisableBuffBtn()
end

function HealBot_Options_BuffIconScaleUpdate(button, scale)
      --HealBot_setCall("HealBot_Options_BuffIconScaleUpdate", button)
    hbv_Skins_SetIconVar(scale, "BSCALE", button.frame, hb_lVars["BuffIconSet"])
    if HealBot_Options:IsVisible() then
        HealBot_Options_SkinsFramesIconsBuffsGeneralTabIconScale()
    end
    HealBot_Options_framesChanged(true, true)
end

function HealBot_Options_BuffIconPrioUpdate(spellId, prio)
      --HealBot_setCall("HealBot_Options_BuffIconPrioUpdate")
    local sName=HealBot_WoWAPI_SpellName(spellId)
    if prio<20 then
        HealBot_Globals.CustomBuffs[spellId]=prio
        if sName then HealBot_Globals.CustomBuffs[sName]=prio end
    else
        HealBot_Globals.CustomBuffs[spellId]=nil
        if sName then HealBot_Globals.CustomBuffs[sName]=nil end
    end
    HealBot_Timers_Set("AURA","ResetBuffCache")
    HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
end

function HealBot_Options_BuffIconColUpdate(spellId, col)
      --HealBot_setCall("HealBot_Options_BuffIconColUpdate")
    local sName=HealBot_WoWAPI_SpellName(spellId)
    if col == 1 then
        HealBot_Globals.CustomBuffsShowBarCol[spellId]=nil
        if sName then HealBot_Globals.CustomBuffsShowBarCol[sName]=nil end

    else
        HealBot_Globals.CustomBuffsShowBarCol[spellId]=col
        if sName then HealBot_Globals.CustomBuffsShowBarCol[sName]=col end
    end
    HealBot_setLuVars("UpdateAllAura", 5)
    HealBot_Aura_setLuVars("updateAll", true)
    HealBot_Timers_Set("AURA","CheckBuffs")
    HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
end

function HealBot_Options_BuffIconGlowUpdate(spellId, glow)
      --HealBot_setCall("HealBot_Options_BuffIconGlowUpdate")
    if glow>1 then
        HealBot_Globals.CustomBuffsIconGlow[spellId]=glow
    else
        HealBot_Globals.CustomBuffsIconGlow[spellId]=nil
    end
    HealBot_Timers_Set("AURA","ConfigClassHoT")
    HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
end

function HealBot_Options_BuffIconSetUpdate(spellId, set)
      --HealBot_setCall("HealBot_Options_BuffIconSetUpdate")
    if set>1 then
        HealBot_Globals.CustomBuffsIconSet[spellId]=set
    else
        HealBot_Globals.CustomBuffsIconSet[spellId]=nil
    end
    HealBot_Timers_Set("AURA","ConfigClassHoT")
    HealBot_Timers_Set("SKINS","ResetUpdateCurrentTab")
end

function HealBot_Options_BuffClick(button, id, click)
      --HealBot_setCall("HealBot_Options_BuffClick", button)
    local spellId=HealBot_Aura_ReturnBuffSpellId(button.id, id)
    if spellId>0 then
        if click == "LeftButton" then
            click="Left"
        elseif click == "MiddleButton" then
            click="Middle"
        elseif click == "RightButton" then
            click="Right"
        end
        local cmd=HealBot_Action_IconSpellPattern(click)
        if cmd == HEALBOT_IGNOREAURAALL then
            if not HealBot_Globals.IgnoreCustomBuff[spellId] then HealBot_Globals.IgnoreCustomBuff[spellId]={} end
            HealBot_Globals.IgnoreCustomBuff[spellId]["ALL"]=true
            HealBot_Options_BuffIconUpdate()
        elseif cmd == HEALBOT_ICONRAISEPRIO1 then
            if HealBot_Globals.CustomBuffs[spellId] and (HealBot_Globals.CustomBuffs[spellId] or 20)>1 then
                HealBot_Options_BuffIconPrioUpdate(spellId, HealBot_Globals.CustomBuffs[spellId]-1)
            end
        elseif cmd == HEALBOT_ICONRAISEPRIO3 then
            if HealBot_Globals.CustomBuffs[spellId] and (HealBot_Globals.CustomBuffs[spellId] or 20)>3 then
                HealBot_Options_BuffIconPrioUpdate(spellId, HealBot_Globals.CustomBuffs[spellId]-3)
            end
        elseif cmd == HEALBOT_ICONLOWERPRIO1 then
            if HealBot_Globals.CustomBuffs[spellId] and HealBot_Globals.CustomBuffs[spellId]<20 then
                HealBot_Options_BuffIconPrioUpdate(spellId, HealBot_Globals.CustomBuffs[spellId]+1)
            end
        elseif cmd == HEALBOT_ICONLOWERPRIO3 then
            if HealBot_Globals.CustomBuffs[spellId] and HealBot_Globals.CustomBuffs[spellId]<18 then
                HealBot_Options_BuffIconPrioUpdate(spellId, HealBot_Globals.CustomBuffs[spellId]+3)
            end
        elseif cmd == HEALBOT_ICONBARCOLOURON then
            HealBot_Options_BuffIconColUpdate(spellId, 3)
        elseif cmd == HEALBOT_ICONBARCOLOURCYCLE then
            if HealBot_Globals.CustomBuffsShowBarCol[spellId] then
                if HealBot_Globals.CustomBuffsShowBarCol[spellId]<8 then
                    HealBot_Options_BuffIconColUpdate(spellId, HealBot_Globals.CustomBuffsShowBarCol[spellId]+1)
                else
                    HealBot_Options_BuffIconColUpdate(spellId, 2)
                end
            else
                HealBot_Options_BuffIconColUpdate(spellId, 3)
            end
        elseif cmd == HEALBOT_ICONBARCOLOUROFF then
            HealBot_Options_BuffIconColUpdate(spellId, 1)
        elseif cmd == HEALBOT_ICONRAISESCALE then
            if hbv_Skins_GetIconVar("BSCALE", button.frame, hb_lVars["BuffIconSet"])<0.96 then
                HealBot_Options_BuffIconScaleUpdate(button, hbv_Skins_GetIconVar("BSCALE", button.frame, hb_lVars["BuffIconSet"])+0.05)
            end
        elseif cmd == HEALBOT_ICONLOWERSCALE then
            if hbv_Skins_GetIconVar("BSCALE", button.frame, hb_lVars["BuffIconSet"])>0.29 then
                HealBot_Options_BuffIconScaleUpdate(button, hbv_Skins_GetIconVar("BSCALE", button.frame, hb_lVars["BuffIconSet"])-0.05)
            end
        elseif cmd == HEALBOT_ICONNEXTSET then
            if HealBot_Globals.CustomBuffsIconSet[spellId] then
                if HealBot_Globals.CustomBuffsIconSet[spellId]<3 then
                    HealBot_Options_BuffIconSetUpdate(spellId, HealBot_Globals.CustomBuffsIconSet[spellId]+1)
                else
                    HealBot_Options_BuffIconSetUpdate(spellId, 1)
                end
            else
                HealBot_Options_BuffIconSetUpdate(spellId, 2)
            end
            HealBot_Timers_Set("AURA","ConfigClassHoT")
        elseif cmd == HEALBOT_ICONPREVSET then
            if HealBot_Globals.CustomBuffsIconSet[spellId] then
                if HealBot_Globals.CustomBuffsIconSet[spellId]>1 then
                    HealBot_Options_BuffIconSetUpdate(spellId, HealBot_Globals.CustomBuffsIconSet[spellId]-1)
                else
                    HealBot_Options_BuffIconSetUpdate(spellId, 3)
                end
            else
                HealBot_Options_BuffIconSetUpdate(spellId, 3)
            end
            HealBot_Timers_Set("AURA","ConfigClassHoT")
        else
            local sName=HealBot_WoWAPI_SpellName(spellId) or "x"
            local iGlow=HealBot_Globals.CustomBuffsIconGlow[spellId] or HealBot_Globals.CustomBuffsIconGlow[sName] or 1
            if cmd == HEALBOT_ICONGLOWON then
                HealBot_Options_BuffIconGlowUpdate(spellId, 3)
            elseif cmd == HEALBOT_ICONGLOWCYCLE then
                if iGlow<5 then
                    HealBot_Options_BuffIconGlowUpdate(spellId, iGlow+1)
                else
                    HealBot_Options_BuffIconGlowUpdate(spellId, 2)
                end
            elseif cmd == HEALBOT_ICONGLOWOFF then
                HealBot_Options_BuffIconGlowUpdate(spellId, 1)
            end
            HealBot_Timers_Set("AURA","ConfigClassHoT")
        end
        HealBot_Options_BuffIconTooltip(button, id)
    end
end

function HealBot_Options_BuffIconTooltip(button, id)
      --HealBot_setCall("HealBot_Options_BuffIconTooltip", button)
    if HealBot_Globals.ShowTooltip and HealBot_Data["TIPUSE"] then
        HealBot_Tooltip_BuffIconTooltip(button, id)
    end
end

function HealBot_Options_SetEnableDisableCDBtn()
      --HealBot_setCall("HealBot_Options_SetEnableDisableCDBtn")
    local InstName=HealBot_Aura_retLuVars("mapName")
    HealBot_Options_EnableDisableCDBtn:Enable()
    local dId=hb_lVars["CDebuffcustomSpellID"]
    if HealBot_Globals.IgnoreCustomDebuff[dId] and (HealBot_Globals.IgnoreCustomDebuff[dId][InstName] or HealBot_Globals.IgnoreCustomDebuff[dId]["ALL"]) then
        HealBot_Options_EnableDisableCDText:SetTextColor(0.88,0.1,0.1)
        if HealBot_Globals.IgnoreCustomDebuff[dId][InstName] then
            HealBot_Options_EnableDisableCDText:SetText(InstName..": "..HEALBOT_SKIN_DISTEXT)
            HealBot_Options_EnableDisableCDBtn:SetText(HEALBOT_WORD_ALLZONE)
        else
            HealBot_Options_EnableDisableCDText:SetText(HEALBOT_WORD_ALLZONE..": "..HEALBOT_SKIN_DISTEXT)
            HealBot_Options_EnableDisableCDBtn:SetText(HEALBOT_WORD_ENABLE)
        end
    elseif dId and hb_lVars["CDebuffCatID"]>1 then
        HealBot_Options_EnableDisableCDText:SetTextColor(0.1,1,0.1)
        HealBot_Options_EnableDisableCDText:SetText(InstName..": "..HEALBOT_SKIN_ENTEXT)
        HealBot_Options_EnableDisableCDBtn:SetText(HEALBOT_WORD_DISABLE)
    else
        HealBot_Options_EnableDisableCDText:SetTextColor(0.7,0.7,0)
        HealBot_Options_EnableDisableCDText:SetText(" ")
        HealBot_Options_EnableDisableCDBtn:SetText(HEALBOT_WORD_DISABLE)
        HealBot_Options_EnableDisableCDBtn:Disable()
    end
    HealBot_Options_CDebuffCatNameUpdate()
end

function HealBot_Options_EnableDisableBuffBtn_OnClick(self)
      --HealBot_setCall("HealBot_Options_EnableDisableBuffBtn_OnClick")
    local InstName=HealBot_Aura_retLuVars("mapName")
    local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"])
    if HealBot_Globals.IgnoreCustomBuff[sId] and (HealBot_Globals.IgnoreCustomBuff[sId][InstName] or HealBot_Globals.IgnoreCustomBuff[sId]["ALL"]) then
        if HealBot_Globals.IgnoreCustomBuff[sId][InstName] then
            HealBot_Globals.IgnoreCustomBuff[sId][InstName]=nil
            HealBot_Globals.IgnoreCustomBuff[sId]["ALL"]=true
        else
            HealBot_Globals.IgnoreCustomBuff[sId]=nil
        end
    else
        if not HealBot_Globals.IgnoreCustomBuff[sId] then
            HealBot_Globals.IgnoreCustomBuff[sId]={}
        end
        HealBot_Globals.IgnoreCustomBuff[sId][InstName]=true
    end
    local sName=HealBot_Options_SpellGetName(sId)
    if sName then
        HealBot_Globals.IgnoreCustomBuff[sName]=HealBot_Options_copyTable(HealBot_Globals.IgnoreCustomBuff[sId])
    end
    HealBot_Timers_Set("AURA","ResetBuffCache")
    HealBot_Options_SetEnableDisableBuffBtn()
end

function HealBot_Options_SetEnableDisableBuffBtn()
      --HealBot_setCall("HealBot_Options_SetEnableDisableBuffBtn")
    local InstName=HealBot_Aura_retLuVars("mapName")
    HealBot_Options_EnableDisableBuffBtn:Enable()
    local bName=HealBot_Options_CDebuffTextID(hb_lVars["HoTname"])
    local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"])
    if HealBot_Globals.IgnoreCustomBuff[sId] and (HealBot_Globals.IgnoreCustomBuff[sId][InstName] or HealBot_Globals.IgnoreCustomBuff[sId]["ALL"]) then
        HealBot_Options_EnableDisableBuffText:SetTextColor(0.88,0.1,0.1)
        if HealBot_Globals.IgnoreCustomBuff[sId][InstName] then
            HealBot_Options_EnableDisableBuffText:SetText(InstName..": "..HEALBOT_SKIN_DISTEXT)
            HealBot_Options_EnableDisableBuffBtn:SetText(HEALBOT_WORD_ALLZONE)
        else
            HealBot_Options_EnableDisableBuffText:SetText(HEALBOT_WORD_ALLZONE..": "..HEALBOT_SKIN_DISTEXT)
            HealBot_Options_EnableDisableBuffBtn:SetText(HEALBOT_WORD_ENABLE)
        end
    elseif bName then
        if HealBot_Globals.IgnoreCustomBuff[sId] then
            HealBot_Options_EnableDisableBuffText:SetTextColor(0.1,1,0.1)
            HealBot_Options_EnableDisableBuffText:SetText(InstName..": "..HEALBOT_SKIN_ENTEXT)
            HealBot_Options_EnableDisableBuffBtn:SetText(HEALBOT_WORD_DISABLE)
        else
            HealBot_Options_EnableDisableBuffText:SetTextColor(0.1,1,0.1)
            HealBot_Options_EnableDisableBuffText:SetText(HEALBOT_WORD_ALLZONE..": "..HEALBOT_SKIN_ENTEXT)
            HealBot_Options_EnableDisableBuffBtn:SetText(HEALBOT_WORD_DISABLE)
        end
    else
        HealBot_Options_EnableDisableBuffText:SetTextColor(0.88,0.1,0)
        HealBot_Options_EnableDisableBuffText:SetText("")
        HealBot_Options_EnableDisableBuffBtn:SetText(HEALBOT_WORD_ENABLE)
        HealBot_Options_EnableDisableBuffBtn:Disable()
    end
    HealBot_Options_BuffCatNameUpdate()
end

function HealBot_Options_CDCAll_OnClick(self, debuffType)
      --HealBot_setCall("HealBot_Options_CDCAll_OnClick")
    if HealBot_Config_Cures.HealBot_Custom_Debuffs_All[debuffType]~=self:GetChecked() then
        HealBot_Config_Cures.HealBot_Custom_Debuffs_All[debuffType]=self:GetChecked()
        HealBot_Timers_Set("AURA","ResetDebuffCache")
    end
end

function HealBot_Options_CDCAllBoss_OnClick(self, debuffType)
      --HealBot_setCall("HealBot_Options_CDCAllBoss_OnClick")
    if HealBot_Config_Cures.AlwaysShowBoss~=self:GetChecked() then
        HealBot_Config_Cures.AlwaysShowBoss=self:GetChecked()
        HealBot_Timers_Set("AURA","ResetDebuffCache")
    end
end

function HealBot_Options_CDCAllTimed_OnClick(self, debuffType)
      --HealBot_setCall("HealBot_Options_CDCAllTimed_OnClick")
    if HealBot_Config_Cures.AlwaysShowTimed~=self:GetChecked() then
        HealBot_Config_Cures.AlwaysShowTimed=self:GetChecked()
        HealBot_Timers_Set("AURA","ResetDebuffCache")
    end
end

function HealBot_Options_ResetCDebuff()
      --HealBot_setCall("HealBot_Options_ResetCDebuff")
    local sName=HealBot_Options_SpellGetName(hb_lVars["CDebuffcustomSpellID"])
    HealBot_Options_DeleteCDebuffBtn_OnClick()
    HealBot_Options_NewCDebuffBtn_SetCat(sName)
    HealBot_Timers_InitExtraOptions()
    HealBot_SetCDCBarColours();
    HealBot_Timers_Set("AURA","CustomDebuffListPrep")
end

hb_lVars["customdebufftextpage"]=1
local hbCustomDebuffList={}
local hbCustomDebuffOrder={}
local hbCustomDebuffIDs={}
function HealBot_Options_sortCustomDebuffList(dID, dName, prio)
      --HealBot_setCall("HealBot_Options_sortCustomDebuffList")
    if not hbCustomDebuffList[dID] then hbCustomDebuffList[dID]={} end
    hbCustomDebuffList[dID]["Prio"]=prio
    hbCustomDebuffList[dID]["Name"]=HealBot_WoWAPI_SpellName(dID) or dName
    if HealBot_Globals.CDCTag[dID] and string.len(HealBot_Globals.CDCTag[dID])>2 then
        hbCustomDebuffList[dID]["Tag"]=HealBot_Globals.CDCTag[dID]
    else
        hbCustomDebuffList[dID]["Tag"]=""
    end
    if HealBot_Config_Cures.ListSortOrder == 1 then  -- Prio
        if prio<10 then
            hbCustomDebuffOrder[dID]="0"..prio..dName
        else
            hbCustomDebuffOrder[dID]=prio..dName
        end
    elseif HealBot_Config_Cures.ListSortOrder == 2 then  -- Name
        hbCustomDebuffOrder[dID]=dName
    else  -- Tag
        if prio<10 then
            hbCustomDebuffOrder[dID]=hbCustomDebuffList[dID]["Tag"].."0"..prio..dName
        else
            hbCustomDebuffOrder[dID]=hbCustomDebuffList[dID]["Tag"]..prio..dName
        end
    end
    table.insert(hbCustomDebuffIDs, dID)
end

function HealBot_Options_prepGeneralDebuffList(dID, dName, prio)
      --HealBot_setCall("HealBot_Options_prepGeneralDebuffList")
    if HealBot_Config_Cures.ListSortFilter == 1 or
      (HealBot_Config_Cures.ListSortFilter == 2 and prio<5) or
      (HealBot_Config_Cures.ListSortFilter == 3 and prio>4 and prio<9) or
      (HealBot_Config_Cures.ListSortFilter == 4 and prio>8 and prio<13) or
      (HealBot_Config_Cures.ListSortFilter == 5 and prio>12 and prio<17) or
      (HealBot_Config_Cures.ListSortFilter == 6 and prio>16) then
        HealBot_Options_sortCustomDebuffList(dID, dName, prio)
    end
end

function HealBot_Options_prepCustomDebuffList()
      --HealBot_setCall("HealBot_Options_prepCustomDebuffList")
    local dName, dTag="", ""
    for x,_ in pairs(hbCustomDebuffIDs) do
        hbCustomDebuffIDs[x]=nil;
    end
    for dID, x in pairs(HealBot_Globals.CustomDebuffs) do
        dName=HealBot_Options_CDebuffTextID(dID)
        if tonumber(dName) == nil then
            if dName == HEALBOT_CUSTOM_CAT_CUSTOM_AUTOMATIC then dID="Auto" end
            if HealBot_Config_Cures.ListSortFilter == 1 then
                HealBot_Options_sortCustomDebuffList(dID, dName, x)
            elseif HealBot_Config_Cures.ListSortFilter == 2 then
                if x<5 then
                    HealBot_Options_sortCustomDebuffList(dID, dName, x)
                end
            elseif HealBot_Config_Cures.ListSortFilter == 3 then
                if x>4 and x<9 then
                    HealBot_Options_sortCustomDebuffList(dID, dName, x)
                end
            elseif HealBot_Config_Cures.ListSortFilter == 4 then
                if x>8 and x<13 then
                    HealBot_Options_sortCustomDebuffList(dID, dName, x)
                end
            elseif HealBot_Config_Cures.ListSortFilter == 5 then
                if x>12 and x<17 then
                    HealBot_Options_sortCustomDebuffList(dID, dName, x)
                end
            elseif HealBot_Config_Cures.ListSortFilter == 6 then
                if x>16 then
                    HealBot_Options_sortCustomDebuffList(dID, dName, x)
                end
            elseif HealBot_Globals.CDCTag[dID] and strtrim(HealBot_Config_Cures.ListSortFilterTag) == strtrim(HealBot_Globals.CDCTag[dID]) then
                HealBot_Options_sortCustomDebuffList(dID, dName, x)
            end
        else
            HealBot_Options_DeleteCDebuff(dID, dName)
        end
    end
    HealBot_Options_prepGeneralDebuffList(HEALBOT_DISEASE_en, HEALBOT_DISEASE, HealBot_Config_Cures.HealBotDebuffPriority[HEALBOT_DISEASE_en])
    HealBot_Options_prepGeneralDebuffList(HEALBOT_MAGIC_en, HEALBOT_MAGIC, HealBot_Config_Cures.HealBotDebuffPriority[HEALBOT_MAGIC_en])
    HealBot_Options_prepGeneralDebuffList(HEALBOT_CURSE_en, HEALBOT_CURSE, HealBot_Config_Cures.HealBotDebuffPriority[HEALBOT_CURSE_en])
    HealBot_Options_prepGeneralDebuffList(HEALBOT_POISON_en, HEALBOT_POISON, HealBot_Config_Cures.HealBotDebuffPriority[HEALBOT_POISON_en])
    HealBot_Options_prepGeneralDebuffList(HEALBOT_BLEED_en, HEALBOT_BLEED, HealBot_Config_Cures.HealBotDebuffPriority[HEALBOT_BLEED_en])

    table.sort(hbCustomDebuffIDs,function (a,b)
        if not hbCustomDebuffOrder[a] or not hbCustomDebuffOrder[b] then
            return false
        else
            if hbCustomDebuffOrder[a]<hbCustomDebuffOrder[b] then return true end
            if hbCustomDebuffOrder[a]>hbCustomDebuffOrder[b] then return false end
            if type(a) == type(b) then
                return a<b
            else
                return false
            end
        end
    end)
    HealBot_Options_setCustomDebuffList()
end

function HealBot_Options_setCustomDebuffList()
      --HealBot_setCall("HealBot_Options_setCustomDebuffList")
    local startEntry=((hb_lVars["customdebufftextpage"]-1)*15)+1
    local endEntry=hb_lVars["customdebufftextpage"]*15
    local x=1
    for j=startEntry,endEntry do
        x=(j-((hb_lVars["customdebufftextpage"]-1)*15))
        if hbCustomDebuffIDs[j] then
            hbCustomDebuff_Text[x]["Prio"]:SetText(hbCustomDebuffList[hbCustomDebuffIDs[j]]["Prio"])
            if tonumber(hbCustomDebuffIDs[j]) then
                hbCustomDebuff_Text[x]["ID"]:SetText(hbCustomDebuffIDs[j])
            else
                hbCustomDebuff_Text[x]["ID"]:SetText("-")
            end
            hbCustomDebuff_Text[x]["Name"]:SetText(hbCustomDebuffList[hbCustomDebuffIDs[j]]["Name"])
            hbCustomDebuff_Text[x]["Tag"]:SetText(hbCustomDebuffList[hbCustomDebuffIDs[j]]["Tag"])
            local z=hbCustomDebuffIDs[j]
            local r,g,b=0,0,0
            if HealBot_Globals.CDCBarColour[z] then
                r=HealBot_Globals.CDCBarColour[z].R or 0.45
                g=HealBot_Globals.CDCBarColour[z].G or 0
                b=HealBot_Globals.CDCBarColour[z].B or 0.26
            elseif HealBot_Config_Cures.CDCBarColour[z] then
                r=HealBot_Config_Cures.CDCBarColour[z].R or 0.7
                g=HealBot_Config_Cures.CDCBarColour[z].G or 0.2
                b=HealBot_Config_Cures.CDCBarColour[z].B or 0.5
            else
                r=HealBot_Globals.CDCBarColour[customDebuffPriority].R or 0.45
                g=HealBot_Globals.CDCBarColour[customDebuffPriority].G or 0
                b=HealBot_Globals.CDCBarColour[customDebuffPriority].B or 0.26
            end
            if r<0.2 and g<0.2 and b<0.2 then
                r=r+0.4
                g=g+0.4
                b=b+0.4
            elseif r<0.3 and g<0.3 and b<0.3 then
                r=r+0.3
                g=g+0.3
                b=b+0.3
            elseif r<0.4 and g<0.4 and b<0.4 then
                r=r+0.2
                g=g+0.2
                b=b+0.2
            elseif r<0.5 and g<0.5 and b<0.5 then
                r=r+0.1
                g=g+0.1
                b=b+0.1
            end
            hbCustomDebuff_Text[x]["Prio"]:SetTextColor(r,g,b,1)
            hbCustomDebuff_Text[x]["ID"]:SetTextColor(r,g,b,1)
            hbCustomDebuff_Text[x]["Name"]:SetTextColor(r,g,b,1)
            hbCustomDebuff_Text[x]["Tag"]:SetTextColor(r,g,b,1)
        else
            hbCustomDebuff_Text[x]["Prio"]:SetText(" ")
            hbCustomDebuff_Text[x]["ID"]:SetText(" ")
            hbCustomDebuff_Text[x]["Name"]:SetText(" ")
            hbCustomDebuff_Text[x]["Tag"]:SetText(" ")
        end
    end
    if hbCustomDebuffIDs[endEntry+1] then
        HealBot_Options_PageNextCDebuffBtn:Enable()
    else
        HealBot_Options_PageNextCDebuffBtn:Disable()
    end
    if hb_lVars["customdebufftextpage"] == 1 then
        HealBot_Options_PagePrevCDebuffBtn:Disable()
    end

    g=_G["HealBot_Options_PageCDebuff"]
    g:SetText(HEALBOT_OPTIONS_PAGE.." "..hb_lVars["customdebufftextpage"])
end

function HealBot_Options_PageNextCDebuff()
      --HealBot_setCall("HealBot_Options_PageNextCDebuff")
    hb_lVars["customdebufftextpage"]=hb_lVars["customdebufftextpage"]+1
    HealBot_Options_PagePrevCDebuffBtn:Enable()
    HealBot_Timers_Set("AURA","CustomDebuffList")
end

function HealBot_Options_PagePrevCDebuff()
      --HealBot_setCall("HealBot_Options_PagePrevCDebuff")
    if hb_lVars["customdebufftextpage"]>1 then
        hb_lVars["customdebufftextpage"]=hb_lVars["customdebufftextpage"]-1
    end
    HealBot_Timers_Set("AURA","CustomDebuffList")
end
----------------------------------------------------------------------------------

function HealBot_Options_getDropDownId_bySpec(ddId)
      --HealBot_setCall("HealBot_Options_getDropDownId_bySpec")
    return HealBot_Config.CurrentSpec..ddId
end

local hbComboButtons={
                        [1]={["BTN"]="Left",      ["TXT"]=HEALBOT_OPTIONS_BUTTONLEFT},
                        [2]={["BTN"]="Middle",    ["TXT"]=HEALBOT_OPTIONS_BUTTONMIDDLE},
                        [3]={["BTN"]="Right",     ["TXT"]=HEALBOT_OPTIONS_BUTTONRIGHT},
                        [4]={["BTN"]="Button4",   ["TXT"]=HEALBOT_OPTIONS_BUTTON4},
                        [5]={["BTN"]="Button5",   ["TXT"]=HEALBOT_OPTIONS_BUTTON5},
                        [6]={["BTN"]="Button6",   ["TXT"]=HEALBOT_OPTIONS_BUTTON6},
                        [7]={["BTN"]="Button7",   ["TXT"]=HEALBOT_OPTIONS_BUTTON7},
                        [8]={["BTN"]="Button8",   ["TXT"]=HEALBOT_OPTIONS_BUTTON8},
                        [9]={["BTN"]="Button9",   ["TXT"]=HEALBOT_OPTIONS_BUTTON9},
                       [10]={["BTN"]="Button10",  ["TXT"]=HEALBOT_OPTIONS_BUTTON10},
                       [11]={["BTN"]="Button11",  ["TXT"]=HEALBOT_OPTIONS_BUTTON11},
                       [12]={["BTN"]="Button12",  ["TXT"]=HEALBOT_OPTIONS_BUTTON12},
                       [13]={["BTN"]="Button13",  ["TXT"]=HEALBOT_OPTIONS_BUTTON13},
                       [14]={["BTN"]="Button14",  ["TXT"]=HEALBOT_OPTIONS_BUTTON14},
                       [15]={["BTN"]="Button15",  ["TXT"]=HEALBOT_OPTIONS_BUTTON15},
                       [16]={["BTN"]="Button16",  ["TXT"]=HEALBOT_OPTIONS_BUTTON15},
                       [17]={["BTN"]="Button17",  ["TXT"]=HEALBOT_OPTIONS_BUTTON15},
                       [18]={["BTN"]="Button18",  ["TXT"]=HEALBOT_OPTIONS_BUTTON15},
                       [19]={["BTN"]="Button19",  ["TXT"]=HEALBOT_OPTIONS_BUTTON15},
                       [20]={["BTN"]="Button20",  ["TXT"]=HEALBOT_OPTIONS_BUTTON15},
                     }
function HealBot_Options_ComboClass_Button(bNo)
      --HealBot_setCall("HealBot_Options_ComboClass_Button")
    return hbComboButtons[bNo]["BTN"], hbComboButtons[bNo]["TXT"]
end

local hbComboModifiers={
                        [1]="",
                        [2]="Shift",
                        [3]="Ctrl",
                        [4]="Alt",
                        [5]="Ctrl-Shift",
                        [6]="Alt-Shift",
                        [7]="Alt-Ctrl",
                        [8]="Alt-Ctrl-Shift",
                        }
function HealBot_Options_ComboButton_ModifierKey(mod)
      --HealBot_setCall("HealBot_Options_ComboButton_ModifierKey")
    return hbComboModifiers[mod]
end

function HealBot_Options_Debuff_Reset()
      --HealBot_setCall("HealBot_Options_Debuff_Reset")
    HealBot_Options_setDebuffTypes()
    HealBot_DebuffWatchTarget[HEALBOT_DISEASE_en]={HEALBOT_DISEASE_en={}};
    HealBot_DebuffWatchTarget[HEALBOT_POISON_en]={HEALBOT_POISON_en={}};
    HealBot_DebuffWatchTarget[HEALBOT_MAGIC_en]={HEALBOT_MAGIC_en={}};
    HealBot_DebuffWatchTarget[HEALBOT_CURSE_en]={HEALBOT_CURSE_en={}};
    HealBot_DebuffWatchTarget[HEALBOT_BLEED_en]={HEALBOT_BLEED_en={}};
    HealBot_DebuffWatchTarget[HEALBOT_CUSTOM_en]={HEALBOT_CUSTOM_en={}}; -- added by Diacono
    for x,_ in pairs(HealBot_DebuffSpell) do
        HealBot_DebuffSpell[x]=nil;
    end
    for x,_ in pairs(HealBot_DebuffType) do
        HealBot_DebuffType[x]=nil;
    end
    local DebuffTextClass=HealBot_Config_Cures.HealBotDebuffText
    local DebuffDropDownClass=HealBot_Config_Cures.HealBotDebuffDropDown

    for k=1,5 do
        if DebuffDropDownClass[HealBot_Options_getDropDownId_bySpec(k)] and DebuffDropDownClass[HealBot_Options_getDropDownId_bySpec(k)]>1 then
            local dropdownID=DebuffDropDownClass[HealBot_Options_getDropDownId_bySpec(k)]
            local sName=DebuffTextClass[HealBot_Options_getDropDownId_bySpec(k)] or "x"

            if HealBot_Debuff_Types[sName] then
                table.foreach(HealBot_Debuff_Types[sName], function (i,dName)
                    if not HealBot_DebuffSpell[dName] then
                        HealBot_DebuffSpell[dName]=sName;
                        if sName == HEALBOT_BLEED or sName == HEALBOT_POISON or sName == HEALBOT_CURSE or sName == HEALBOT_MAGIC or sName == HEALBOT_DISEASE then
                            HealBot_DebuffType[dName]=true
                        end
                    end
                    local HealBot_DebuffWatchTargetSpell=HealBot_DebuffWatchTarget[dName];
                    if dropdownID == 2 then
                        HealBot_DebuffWatchTargetSpell["Self"]=true;
                    elseif dropdownID == 3 then
                        HealBot_DebuffWatchTargetSpell["Party"]=true;
                    elseif dropdownID == 4 then
                        HealBot_DebuffWatchTargetSpell["Raid"]=true;
                    elseif dropdownID == 5 then
                        if HealBot_Globals.EmergIncMelee[HEALBOT_DRUID] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DRUID)]=true;
                        end
                        if HealBot_Globals.EmergIncMelee[HEALBOT_HUNTER] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_HUNTER)]=true;
                        end
                        if HealBot_Globals.EmergIncMelee[HEALBOT_MAGE] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_MAGE)]=true;
                        end
                        if HealBot_Globals.EmergIncMelee[HEALBOT_PALADIN] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_PALADIN)]=true;
                        end
                        if HealBot_Globals.EmergIncMelee[HEALBOT_PRIEST] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_PRIEST)]=true;
                        end
                        if HealBot_Globals.EmergIncMelee[HEALBOT_ROGUE] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_ROGUE)]=true;
                        end
                        if HealBot_Globals.EmergIncMelee[HEALBOT_SHAMAN] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_SHAMAN)]=true;
                        end
                        if HealBot_Globals.EmergIncMelee[HEALBOT_WARLOCK] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_WARLOCK)]=true;
                        end
                        if HealBot_Globals.EmergIncMelee[HEALBOT_WARRIOR] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_WARRIOR)]=true;
                        end
                        if HealBot_Globals.EmergIncMelee[HEALBOT_DEATHKNIGHT] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DEATHKNIGHT)]=true;
                        end
                        if HealBot_Globals.EmergIncMelee[HEALBOT_DEMONHUNTER] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DEMONHUNTER)]=true;
                        end
                        if HealBot_Globals.EmergIncMelee[HEALBOT_MONK] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_MONK)]=true;
                        end
                        if HealBot_Globals.EmergIncMelee[HEALBOT_EVOKER] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_EVOKER)]=true;
                        end
                    elseif dropdownID == 6 then
                        if HealBot_Globals.EmergIncRange[HEALBOT_DRUID] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DRUID)]=true;
                        end
                        if HealBot_Globals.EmergIncRange[HEALBOT_HUNTER] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_HUNTER)]=true;
                        end
                        if HealBot_Globals.EmergIncRange[HEALBOT_MAGE] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_MAGE)]=true;
                        end
                        if HealBot_Globals.EmergIncRange[HEALBOT_PALADIN] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_PALADIN)]=true;
                        end
                        if HealBot_Globals.EmergIncRange[HEALBOT_PRIEST] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_PRIEST)]=true;
                        end
                        if HealBot_Globals.EmergIncRange[HEALBOT_ROGUE] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_ROGUE)]=true;
                        end
                        if HealBot_Globals.EmergIncRange[HEALBOT_SHAMAN] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_SHAMAN)]=true;
                        end
                        if HealBot_Globals.EmergIncRange[HEALBOT_WARLOCK] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_WARLOCK)]=true;
                        end
                        if HealBot_Globals.EmergIncRange[HEALBOT_WARRIOR] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_WARRIOR)]=true;
                        end
                        if HealBot_Globals.EmergIncRange[HEALBOT_DEATHKNIGHT] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DEATHKNIGHT)]=true;
                        end
                        if HealBot_Globals.EmergIncRange[HEALBOT_DEMONHUNTER] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DEMONHUNTER)]=true;
                        end
                        if HealBot_Globals.EmergIncRange[HEALBOT_MONK] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_MONK)]=true;
                        end
                        if HealBot_Globals.EmergIncRange[HEALBOT_EVOKER] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_EVOKER)]=true;
                        end
                    elseif dropdownID == 7 then
                        if HealBot_Globals.EmergIncHealers[HEALBOT_DRUID] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DRUID)]=true;
                        end
                        if HealBot_Globals.EmergIncHealers[HEALBOT_HUNTER] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_HUNTER)]=true;
                        end
                        if HealBot_Globals.EmergIncHealers[HEALBOT_MAGE] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_MAGE)]=true;
                        end
                        if HealBot_Globals.EmergIncHealers[HEALBOT_PALADIN] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_PALADIN)]=true;
                        end
                        if HealBot_Globals.EmergIncHealers[HEALBOT_PRIEST] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_PRIEST)]=true;
                        end
                        if HealBot_Globals.EmergIncHealers[HEALBOT_ROGUE] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_ROGUE)]=true;
                        end
                        if HealBot_Globals.EmergIncHealers[HEALBOT_SHAMAN] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_SHAMAN)]=true;
                        end
                        if HealBot_Globals.EmergIncHealers[HEALBOT_WARLOCK] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_WARLOCK)]=true;
                        end
                        if HealBot_Globals.EmergIncHealers[HEALBOT_WARRIOR] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_WARRIOR)]=true;
                        end
                        if HealBot_Globals.EmergIncHealers[HEALBOT_DEATHKNIGHT] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DEATHKNIGHT)]=true;
                        end
                        if HealBot_Globals.EmergIncHealers[HEALBOT_DEMONHUNTER] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DEMONHUNTER)]=true;
                        end
                        if HealBot_Globals.EmergIncHealers[HEALBOT_MONK] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_MONK)]=true;
                        end
                        if HealBot_Globals.EmergIncHealers[HEALBOT_EVOKER] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_EVOKER)]=true;
                        end
                    elseif dropdownID == 8 then
                        if HealBot_Globals.EmergIncCustom[HEALBOT_DRUID] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DRUID)]=true;
                        end
                        if HealBot_Globals.EmergIncCustom[HEALBOT_HUNTER] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_HUNTER)]=true;
                        end
                        if HealBot_Globals.EmergIncCustom[HEALBOT_MAGE] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_MAGE)]=true;
                        end
                        if HealBot_Globals.EmergIncCustom[HEALBOT_PALADIN] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_PALADIN)]=true;
                        end
                        if HealBot_Globals.EmergIncCustom[HEALBOT_PRIEST] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_PRIEST)]=true;
                        end
                        if HealBot_Globals.EmergIncCustom[HEALBOT_ROGUE] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_ROGUE)]=true;
                        end
                        if HealBot_Globals.EmergIncCustom[HEALBOT_SHAMAN] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_SHAMAN)]=true;
                        end
                        if HealBot_Globals.EmergIncCustom[HEALBOT_WARLOCK] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_WARLOCK)]=true;
                        end
                        if HealBot_Globals.EmergIncCustom[HEALBOT_WARRIOR] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_WARRIOR)]=true;
                        end
                        if HealBot_Globals.EmergIncCustom[HEALBOT_DEATHKNIGHT] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DEATHKNIGHT)]=true;
                        end
                        if HealBot_Globals.EmergIncCustom[HEALBOT_DEMONHUNTER] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DEMONHUNTER)]=true;
                        end
                        if HealBot_Globals.EmergIncCustom[HEALBOT_MONK] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_MONK)]=true;
                        end
                        if HealBot_Globals.EmergIncCustom[HEALBOT_EVOKER] then
                            HealBot_DebuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_EVOKER)]=true;
                        end
                    elseif dropdownID == 9 then
                        HealBot_DebuffWatchTargetSpell["PvP"]=true
                    elseif dropdownID == 10 then
                        HealBot_DebuffWatchTargetSpell["PvE"]=true
                    elseif dropdownID == 11 then
                        HealBot_DebuffWatchTargetSpell["MainTanks"]=true
                    elseif dropdownID == 12 then
                        HealBot_DebuffWatchTargetSpell["MyTargets"]=true
                    elseif dropdownID == 13 then
                        HealBot_DebuffWatchTargetSpell["Focus"]=true
                    elseif dropdownID == 14 then
                        HealBot_DebuffWatchTargetSpell["Name"]=true
                    elseif dropdownID == 15 then
                        HealBot_DebuffWatchTargetSpell["SingleTank"]=true
                    elseif dropdownID == 16 then
                        HealBot_DebuffWatchTargetSpell["Solo"]=true;
                    end
                end)
            end
        end
    end
    HealBot_Timers_Set("AURA","DebuffPriority")
end

function HealBot_Options_ExtraBuff_Reset()
      --HealBot_setCall("HealBot_Options_ExtraBuff_Reset")
    local buffbarcolrClass=HealBot_Config_Buffs.HealBotBuffColR or 1
    local buffbarcolgClass=HealBot_Config_Buffs.HealBotBuffColG or 1
    local buffbarcolbClass=HealBot_Config_Buffs.HealBotBuffColB or 1
    if HealBot_Config_Buffs.CheckWellFed then
        local wellFedItem=HealBot_Config_Buffs.WellFedItem
        local hbCustomItemID=HealBot_WoWAPI_ItemInfoInstant(wellFedItem) or 0
        if hbCustomItemID>0 and HealBot_IsItemInBag(hbCustomItemID) then
            HealBot_buffbarcolr[wellFedItem]=buffbarcolrClass[11] or 1
            HealBot_buffbarcolg[wellFedItem]=buffbarcolgClass[11] or 1
            HealBot_buffbarcolb[wellFedItem]=buffbarcolbClass[11] or 1
            HealBot_BuffWatchTarget[wellFedItem]={};
            HealBot_BuffWatchTarget[wellFedItem]["Self"]=true
        else
            wellFedItem=HealBot_Config_Buffs.BackupWellFedItem
            hbCustomItemID=HealBot_WoWAPI_ItemInfoInstant(wellFedItem) or 0
            if hbCustomItemID>0 and HealBot_IsItemInBag(hbCustomItemID) then
                HealBot_buffbarcolr[wellFedItem]=buffbarcolrClass[11] or 1
                HealBot_buffbarcolg[wellFedItem]=buffbarcolgClass[11] or 1
                HealBot_buffbarcolb[wellFedItem]=buffbarcolbClass[11] or 1
                HealBot_BuffWatchTarget[wellFedItem]={};
                HealBot_BuffWatchTarget[wellFedItem]["Self"]=true
            end
        end
    end
    if HealBot_Config_Buffs.CheckManaDrink then
        local manaDrinkItem=HealBot_Config_Buffs.ManaDrinkItem
        local hbCustomItemID=HealBot_WoWAPI_ItemInfoInstant(manaDrinkItem) or 0
        if hbCustomItemID>0 and HealBot_IsItemInBag(hbCustomItemID) then
            HealBot_buffbarcolr[manaDrinkItem]=buffbarcolrClass[15] or 1
            HealBot_buffbarcolg[manaDrinkItem]=buffbarcolgClass[15] or 1
            HealBot_buffbarcolb[manaDrinkItem]=buffbarcolbClass[15] or 1
            HealBot_BuffWatchTarget[manaDrinkItem]={};
            HealBot_BuffWatchTarget[manaDrinkItem]["Self"]=true
        else
            manaDrinkItem=HealBot_Config_Buffs.BackupManaDrinkItem
            local hbCustomItemID=HealBot_WoWAPI_ItemInfoInstant(manaDrinkItem) or 0
            if hbCustomItemID>0 and HealBot_IsItemInBag(hbCustomItemID) then
                HealBot_buffbarcolr[manaDrinkItem]=buffbarcolrClass[16] or 1
                HealBot_buffbarcolg[manaDrinkItem]=buffbarcolgClass[16] or 1
                HealBot_buffbarcolb[manaDrinkItem]=buffbarcolbClass[16] or 1
                HealBot_BuffWatchTarget[manaDrinkItem]={};
                HealBot_BuffWatchTarget[manaDrinkItem]["Self"]=true
            end
        end
    end
    for x=1,4 do
        if HealBot_Config_Buffs.CustomBuffCheck[x] and string.len(HealBot_Config_Buffs.CustomBuffName[x])>0 then
            local extraItem=HealBot_Config_Buffs.CustomItemName[x]
            local _,_,_,_,_,_,hbCustomSpellID=HealBot_WoWAPI_SpellInfo(extraItem)
            local hbCustomItemID=HealBot_WoWAPI_ItemInfoInstant(extraItem) or 0
            if hbCustomSpellID or (hbCustomItemID>0 and HealBot_IsItemInBag(hbCustomItemID)) then
                HealBot_buffbarcolr[extraItem]=buffbarcolrClass[11+x] or 1
                HealBot_buffbarcolg[extraItem]=buffbarcolgClass[11+x] or 1
                HealBot_buffbarcolb[extraItem]=buffbarcolbClass[11+x] or 1
                HealBot_BuffWatchTarget[extraItem]={};
                HealBot_BuffWatchTarget[extraItem]["Self"]=true
            end
        end
    end
end

local spells={}
function HealBot_Options_Buff_Reset()
      --HealBot_setCall("HealBot_Options_Buff_Reset")
    HealBot_Options_InitBuffClassList()
    BuffTextClass=HealBot_Config_Buffs.HealBotBuffText
    local BuffDropDownClass=HealBot_Config_Buffs.HealBotBuffDropDown
    local buffbarcolrClass=HealBot_Config_Buffs.HealBotBuffColR or 1
    local buffbarcolgClass=HealBot_Config_Buffs.HealBotBuffColG or 1
    local buffbarcolbClass=HealBot_Config_Buffs.HealBotBuffColB or 1
    for x,_ in pairs(spells) do
        spells[x]=nil;
    end
    HealBot_Aura_ClearBuffWatch()
    HealBot_Aura_ClearCheckBuffs()
    HealBot_Aura_InitItemsData()
    for x,_ in pairs(HealBot_BuffWatchTarget) do
        HealBot_BuffWatchTarget[x]=nil;
    end
    for x,_ in pairs(HealBot_buffbarcolr) do
        HealBot_buffbarcolr[x]=nil;
    end
    for x,_ in pairs(HealBot_buffbarcolg) do
        HealBot_buffbarcolg[x]=nil;
    end
    for x,_ in pairs(HealBot_buffbarcolb) do
        HealBot_buffbarcolb[x]=nil;
    end
    if HealBot_Data["TIPUSE"] then HealBot_Tooltip_Clear_CheckBuffs() end

    for k=1,8 do
        if BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(k)] and BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(k)]>1 then
            local dropdownID=BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(k)]
            local sName=BuffTextClass[HealBot_Options_getDropDownId_bySpec(k)]
            if HealBot_Spells_KnownByName(sName) or HealBot_IsKnownItem(sName) then

                if not spells[sName] then
                    spells[sName]=true;
                    HealBot_Aura_SetBuffWatch(sName)
                    HealBot_Aura_SetCheckBuffs(sName)
                    HealBot_BuffWatchTarget[sName]={};
                end

                local HealBot_BuffWatchTargetSpell=HealBot_BuffWatchTarget[sName];
                if HealBot_Data["TIPUSE"] then HealBot_Tooltip_CheckBuffs(sName) end

                if dropdownID == 2 then
                    HealBot_BuffWatchTargetSpell["Self"]=true;
                elseif dropdownID == 3 then
                    HealBot_BuffWatchTargetSpell["Party"]=true;
                elseif dropdownID == 4 then
                    HealBot_BuffWatchTargetSpell["Raid"]=true;
                elseif dropdownID == 5 then
                    if HealBot_Globals.EmergIncMelee[HEALBOT_DRUID] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DRUID)]=true;
                    end
                    if HealBot_Globals.EmergIncMelee[HEALBOT_HUNTER] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_HUNTER)]=true;
                    end
                    if HealBot_Globals.EmergIncMelee[HEALBOT_MAGE] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_MAGE)]=true;
                    end
                    if HealBot_Globals.EmergIncMelee[HEALBOT_PALADIN] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_PALADIN)]=true;
                    end
                    if HealBot_Globals.EmergIncMelee[HEALBOT_PRIEST] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_PRIEST)]=true;
                    end
                    if HealBot_Globals.EmergIncMelee[HEALBOT_ROGUE] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_ROGUE)]=true;
                    end
                    if HealBot_Globals.EmergIncMelee[HEALBOT_SHAMAN] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_SHAMAN)]=true;
                    end
                    if HealBot_Globals.EmergIncMelee[HEALBOT_WARLOCK] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_WARLOCK)]=true;
                    end
                    if HealBot_Globals.EmergIncMelee[HEALBOT_WARRIOR] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_WARRIOR)]=true;
                    end
                    if HealBot_Globals.EmergIncMelee[HEALBOT_DEATHKNIGHT] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DEATHKNIGHT)]=true;
                    end
                    if HealBot_Globals.EmergIncMelee[HEALBOT_DEMONHUNTER] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DEMONHUNTER)]=true;
                    end
                    if HealBot_Globals.EmergIncMelee[HEALBOT_MONK] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_MONK)]=true;
                    end
                    if HealBot_Globals.EmergIncMelee[HEALBOT_EVOKER] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_EVOKER)]=true;
                    end
                elseif dropdownID == 6 then
                    if HealBot_Globals.EmergIncRange[HEALBOT_DRUID] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DRUID)]=true;
                    end
                    if HealBot_Globals.EmergIncRange[HEALBOT_HUNTER] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_HUNTER)]=true;
                    end
                    if HealBot_Globals.EmergIncRange[HEALBOT_MAGE] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_MAGE)]=true;
                    end
                    if HealBot_Globals.EmergIncRange[HEALBOT_PALADIN] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_PALADIN)]=true;
                    end
                    if HealBot_Globals.EmergIncRange[HEALBOT_PRIEST] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_PRIEST)]=true;
                    end
                    if HealBot_Globals.EmergIncRange[HEALBOT_ROGUE] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_ROGUE)]=true;
                    end
                    if HealBot_Globals.EmergIncRange[HEALBOT_SHAMAN] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_SHAMAN)]=true;
                    end
                    if HealBot_Globals.EmergIncRange[HEALBOT_WARLOCK] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_WARLOCK)]=true;
                    end
                    if HealBot_Globals.EmergIncRange[HEALBOT_WARRIOR] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_WARRIOR)]=true;
                    end
                    if HealBot_Globals.EmergIncRange[HEALBOT_DEATHKNIGHT] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DEATHKNIGHT)]=true;
                    end
                    if HealBot_Globals.EmergIncRange[HEALBOT_DEMONHUNTER] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DEMONHUNTER)]=true;
                    end
                    if HealBot_Globals.EmergIncRange[HEALBOT_MONK] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_MONK)]=true;
                    end
                    if HealBot_Globals.EmergIncRange[HEALBOT_EVOKER] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_EVOKER)]=true;
                    end
                elseif dropdownID == 7 then
                    if HealBot_Globals.EmergIncHealers[HEALBOT_DRUID] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DRUID)]=true;
                    end
                    if HealBot_Globals.EmergIncHealers[HEALBOT_HUNTER] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_HUNTER)]=true;
                    end
                    if HealBot_Globals.EmergIncHealers[HEALBOT_MAGE] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_MAGE)]=true;
                    end
                    if HealBot_Globals.EmergIncHealers[HEALBOT_PALADIN] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_PALADIN)]=true;
                    end
                    if HealBot_Globals.EmergIncHealers[HEALBOT_PRIEST] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_PRIEST)]=true;
                    end
                    if HealBot_Globals.EmergIncHealers[HEALBOT_ROGUE] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_ROGUE)]=true;
                    end
                    if HealBot_Globals.EmergIncHealers[HEALBOT_SHAMAN] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_SHAMAN)]=true;
                    end
                    if HealBot_Globals.EmergIncHealers[HEALBOT_WARLOCK] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_WARLOCK)]=true;
                    end
                    if HealBot_Globals.EmergIncHealers[HEALBOT_WARRIOR] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_WARRIOR)]=true;
                    end
                    if HealBot_Globals.EmergIncHealers[HEALBOT_DEATHKNIGHT] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DEATHKNIGHT)]=true;
                    end
                    if HealBot_Globals.EmergIncHealers[HEALBOT_DEMONHUNTER] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DEMONHUNTER)]=true;
                    end
                    if HealBot_Globals.EmergIncHealers[HEALBOT_MONK] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_MONK)]=true;
                    end
                    if HealBot_Globals.EmergIncHealers[HEALBOT_EVOKER] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_EVOKER)]=true;
                    end
                elseif dropdownID == 8 then
                    if HealBot_Globals.EmergIncCustom[HEALBOT_DRUID] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DRUID)]=true;
                    end
                    if HealBot_Globals.EmergIncCustom[HEALBOT_HUNTER] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_HUNTER)]=true;
                    end
                    if HealBot_Globals.EmergIncCustom[HEALBOT_MAGE] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_MAGE)]=true;
                    end
                    if HealBot_Globals.EmergIncCustom[HEALBOT_PALADIN] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_PALADIN)]=true;
                    end
                    if HealBot_Globals.EmergIncCustom[HEALBOT_PRIEST] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_PRIEST)]=true;
                    end
                    if HealBot_Globals.EmergIncCustom[HEALBOT_ROGUE] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_ROGUE)]=true;
                    end
                    if HealBot_Globals.EmergIncCustom[HEALBOT_SHAMAN] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_SHAMAN)]=true;
                    end
                    if HealBot_Globals.EmergIncCustom[HEALBOT_WARLOCK] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_WARLOCK)]=true;
                    end
                    if HealBot_Globals.EmergIncCustom[HEALBOT_WARRIOR] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_WARRIOR)]=true;
                    end
                    if HealBot_Globals.EmergIncCustom[HEALBOT_DEATHKNIGHT] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DEATHKNIGHT)]=true;
                    end
                    if HealBot_Globals.EmergIncCustom[HEALBOT_DEMONHUNTER] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_DEMONHUNTER)]=true;
                    end
                    if HealBot_Globals.EmergIncCustom[HEALBOT_MONK] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_MONK)]=true;
                    end
                    if HealBot_Globals.EmergIncCustom[HEALBOT_EVOKER] then
                        HealBot_BuffWatchTargetSpell[hbv_GetClass("En", HEALBOT_EVOKER)]=true;
                    end
                elseif dropdownID == 9 then
                    HealBot_BuffWatchTargetSpell["PvP"]=true
                elseif dropdownID == 10 then
                    HealBot_BuffWatchTargetSpell["PvE"]=true
                elseif dropdownID == 11 then
                    HealBot_BuffWatchTargetSpell["MainTanks"]=true
                elseif dropdownID == 12 then
                    HealBot_BuffWatchTargetSpell["MyTargets"]=true
                elseif dropdownID == 13 then
                    HealBot_BuffWatchTargetSpell["Focus"]=true
                elseif dropdownID == 14 then
                    HealBot_BuffWatchTargetSpell["Name"]=true
                elseif dropdownID == 15 then
                    HealBot_BuffWatchTargetSpell["SingleTank"]=true
                elseif dropdownID == 16 then
                    HealBot_BuffWatchTargetSpell["Solo"]=true;
                end
                HealBot_buffbarcolr[sName]=buffbarcolrClass[k];
                HealBot_buffbarcolg[sName]=buffbarcolgClass[k];
                HealBot_buffbarcolb[sName]=buffbarcolbClass[k];
            end
        end
    end
    for k=9,10 do
        if BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(k)] and BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(k)]>1 and getn(HealBot_Buff_WeaponEnchant_List[k-8])>=BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(k)] then
            HealBot_buffbarcolr[HealBot_Buff_WeaponEnchant_List[k-8][BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(k)]]]=buffbarcolrClass[k];
            HealBot_buffbarcolg[HealBot_Buff_WeaponEnchant_List[k-8][BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(k)]]]=buffbarcolgClass[k];
            HealBot_buffbarcolb[HealBot_Buff_WeaponEnchant_List[k-8][BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(k)]]]=buffbarcolbClass[k];
        end
    end
    if not HealBot_retLuVars("BagsScanned") then
        HealBot_Timers_Set("AURA","BuffReset",true,true) -- All recall require a delay
    else
        HealBot_Timers_Set("AURA","ExtraBuffReset",true)
    end
    HealBot_Timers_Set("AURA","ResetBuffCache",true)
end

function HealBot_Options_RetDebuffRGB(button)
      --HealBot_setCall("HealBot_Options_RetDebuffRGB", button)
    if button.aura.debuff.type~=HEALBOT_CUSTOM_en and HealBot_Config_Cures.CDCBarColour[button.aura.debuff.type] then
        return HealBot_Config_Cures.CDCBarColour[button.aura.debuff.type].R or 1,
               HealBot_Config_Cures.CDCBarColour[button.aura.debuff.type].G or 0.25,
               HealBot_Config_Cures.CDCBarColour[button.aura.debuff.type].B or 0.25
    elseif HealBot_Globals.CDCBarColour[button.aura.debuff.id] then
        return HealBot_Globals.CDCBarColour[button.aura.debuff.id].R or 1,
               HealBot_Globals.CDCBarColour[button.aura.debuff.id].G or 0.25,
               HealBot_Globals.CDCBarColour[button.aura.debuff.id].B or 0.25
    elseif HealBot_Globals.CDCBarColour[button.aura.debuff.name] then
        return HealBot_Globals.CDCBarColour[button.aura.debuff.name].R or 1,
               HealBot_Globals.CDCBarColour[button.aura.debuff.name].G or 0.25,
               HealBot_Globals.CDCBarColour[button.aura.debuff.name].B or 0.25
    else
        return HealBot_Globals.CDCBarColour[customDebuffPriority].R or 1,
               HealBot_Globals.CDCBarColour[customDebuffPriority].G or 0.25,
               HealBot_Globals.CDCBarColour[customDebuffPriority].B or 0.25
    end
end

function HealBot_Options_RetBuffRGB(button)
      --HealBot_setCall("HealBot_Options_RetBuffRGB", button)
    if button.aura.buff.missingbuff and HealBot_buffbarcolr[button.aura.buff.missingbuff] then
        return HealBot_buffbarcolr[button.aura.buff.missingbuff] or 1,
               HealBot_buffbarcolg[button.aura.buff.missingbuff] or 1,
               HealBot_buffbarcolb[button.aura.buff.missingbuff] or 1
    elseif HealBot_Globals.CustomBuffBarColour[button.aura.buff.id] then
        return HealBot_Globals.CustomBuffBarColour[button.aura.buff.id]["R"] or 0.25,
               HealBot_Globals.CustomBuffBarColour[button.aura.buff.id]["G"] or 0.58,
               HealBot_Globals.CustomBuffBarColour[button.aura.buff.id]["B"] or 0.8
    elseif HealBot_Globals.CustomBuffBarColour[button.aura.buff.name] then
        return HealBot_Globals.CustomBuffBarColour[button.aura.buff.name]["R"] or 0.25,
               HealBot_Globals.CustomBuffBarColour[button.aura.buff.name]["G"] or 0.58,
               HealBot_Globals.CustomBuffBarColour[button.aura.buff.name]["B"] or 0.8
    elseif button.aura.buff.missingbuff then
        return 1,1,1
    elseif HealBot_Globals.CustomBuffBarColour[HEALBOT_CUSTOM_CAT_CUSTOM_AUTOBUFFS] then
        return HealBot_Globals.CustomBuffBarColour[HEALBOT_CUSTOM_CAT_CUSTOM_AUTOBUFFS]["R"] or 0.25,
               HealBot_Globals.CustomBuffBarColour[HEALBOT_CUSTOM_CAT_CUSTOM_AUTOBUFFS]["G"] or 0.58,
               HealBot_Globals.CustomBuffBarColour[HEALBOT_CUSTOM_CAT_CUSTOM_AUTOBUFFS]["B"] or 0.8
    else
        return HealBot_Globals.CustomBuffBarColour[customBuffPriority]["R"] or 0.25,
               HealBot_Globals.CustomBuffBarColour[customBuffPriority]["G"] or 0.58,
               HealBot_Globals.CustomBuffBarColour[customBuffPriority]["B"] or 0.8
    end
end

function HealBot_Options_RetBuffRGBName(spellName)
      --HealBot_setCall("HealBot_Options_RetBuffRGBName")
    return HealBot_buffbarcolr[spellName],HealBot_buffbarcolg[spellName],HealBot_buffbarcolb[spellName];
end

function HealBot_Options_PresetColours_AliasSave(self,id)
      --HealBot_setCall("HealBot_Options_PresetColours_AliasSave")
    HealBot_Globals.PresetColoursAlias[id]=self:GetText()
end

function HealBot_Options_ResetColour(cType, cName, override)
      --HealBot_setCall("HealBot_Options_ResetColour")
    if cType == "CLASS" then
        if cName == "ALL" then
            hbv_Skins_SetClassColInit(Healbot_Config_Skins.Current_Skin, "DEAT", override)
            hbv_Skins_SetClassColInit(Healbot_Config_Skins.Current_Skin, "DEMO", override)
            hbv_Skins_SetClassColInit(Healbot_Config_Skins.Current_Skin, "DRUI", override)
            hbv_Skins_SetClassColInit(Healbot_Config_Skins.Current_Skin, "EVOK", override)
            hbv_Skins_SetClassColInit(Healbot_Config_Skins.Current_Skin, "HUNT", override)
            hbv_Skins_SetClassColInit(Healbot_Config_Skins.Current_Skin, "MAGE", override)
            hbv_Skins_SetClassColInit(Healbot_Config_Skins.Current_Skin, "MONK", override)
            hbv_Skins_SetClassColInit(Healbot_Config_Skins.Current_Skin, "PALA", override)
            hbv_Skins_SetClassColInit(Healbot_Config_Skins.Current_Skin, "PRIE", override)
            hbv_Skins_SetClassColInit(Healbot_Config_Skins.Current_Skin, "ROGU", override)
            hbv_Skins_SetClassColInit(Healbot_Config_Skins.Current_Skin, "SHAM", override)
            hbv_Skins_SetClassColInit(Healbot_Config_Skins.Current_Skin, "WARL", override)
            hbv_Skins_SetClassColInit(Healbot_Config_Skins.Current_Skin, "WARR", override)
        else
            hbv_Skins_SetClassColInit(Healbot_Config_Skins.Current_Skin, cName, override)
        end
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif cType == "ROLE" then
        if cName == "ALL" then
            hbv_Skins_SetRoleInit(Healbot_Config_Skins.Current_Skin, "TANK", override)
            hbv_Skins_SetRoleInit(Healbot_Config_Skins.Current_Skin, "HEALER", override)
            hbv_Skins_SetRoleInit(Healbot_Config_Skins.Current_Skin, "DAMAGER", override)
        else
            hbv_Skins_SetRoleInit(Healbot_Config_Skins.Current_Skin, cName, override)
        end
        HealBot_Timers_Set("LAST","RoleColourUpdate")
    else
        if cName == "ALL" then
            hbv_Skins_SetPowerColInit(Healbot_Config_Skins.Current_Skin, "ENERGY", override)
            hbv_Skins_SetPowerColInit(Healbot_Config_Skins.Current_Skin, "FOCUS", override)
            hbv_Skins_SetPowerColInit(Healbot_Config_Skins.Current_Skin, "FURY", override)
            hbv_Skins_SetPowerColInit(Healbot_Config_Skins.Current_Skin, "INSANITY", override)
            hbv_Skins_SetPowerColInit(Healbot_Config_Skins.Current_Skin, "LUNAR_POWER", override)
            hbv_Skins_SetPowerColInit(Healbot_Config_Skins.Current_Skin, "MAELSTROM", override)
            hbv_Skins_SetPowerColInit(Healbot_Config_Skins.Current_Skin, "MANA", override)
            hbv_Skins_SetPowerColInit(Healbot_Config_Skins.Current_Skin, "RAGE", override)
            hbv_Skins_SetPowerColInit(Healbot_Config_Skins.Current_Skin, "RUNIC_POWER", override)
        else
            hbv_Skins_SetPowerColInit(Healbot_Config_Skins.Current_Skin, cName, override)
        end
        HealBot_Timers_Set("LAST","PowerColourUpdate")
    end
end

function HealBot_Options_OverrideResetColourClick(self, cType, cName)
      --HealBot_setCall("HealBot_Options_OverrideResetColourClick")
    HealBot_Options_ResetColour(cType, cName, true)
    if cType == "CLASS" then
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif cType == "ROLE" then
        HealBot_Timers_Set("LAST","RoleColourUpdate")
    else
        HealBot_Timers_Set("LAST","PowerColourUpdate")
    end
end

function HealBot_Options_ResetColourClick(self, cType, cName)
      --HealBot_setCall("HealBot_Options_ResetColourClick")
    HealBot_Options_ResetColour(cType, cName, false)
    if cType == "CLASS" then
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif cType == "ROLE" then
        HealBot_Timers_Set("LAST","RoleColourUpdate")
    else
        HealBot_Timers_Set("LAST","PowerColourUpdate")
    end
end

function HealBot_Options_TEST()
    return 1,1,1
end

function HealBot_Options_ClassColourUpdate()
      --HealBot_setCall("HealBot_Options_ClassColourUpdate")
    local a=1
    if HealBot_Globals.OverrideColours["USECLASS"] == 1 then a=0.2 end
    local r,g,b=hbv_Skins_GetClassCol("DEAT", 2); HealBot_OverrideColClassDeathKnightpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("DEMO", 2); HealBot_OverrideColClassDemonHunterpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("DRUI", 2); HealBot_OverrideColClassDruidpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("EVOK", 2); HealBot_OverrideColClassEvokerpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("HUNT", 2); HealBot_OverrideColClassHunterpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("MAGE", 2); HealBot_OverrideColClassMagepick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("MONK", 2); HealBot_OverrideColClassMonkpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("PALA", 2); HealBot_OverrideColClassPaladinpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("PRIE", 2); HealBot_OverrideColClassPriestpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("ROGU", 2); HealBot_OverrideColClassRoguepick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("SHAM", 2); HealBot_OverrideColClassShamanpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("WARL", 2); HealBot_OverrideColClassWarlockpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("WARR", 2); HealBot_OverrideColClassWarriorpick:SetStatusBarColor(r,g,b,a)
    a=1
    if HealBot_Globals.OverrideColours["USECLASS"] == 2 then a=0.2 end
    r,g,b=hbv_Skins_GetClassCol("DEAT", 1); HealBot_ColClassDeathKnightpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("DEMO", 1); HealBot_ColClassDemonHunterpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("DRUI", 1); HealBot_ColClassDruidpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("EVOK", 1); HealBot_ColClassEvokerpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("HUNT", 1); HealBot_ColClassHunterpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("MAGE", 1); HealBot_ColClassMagepick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("MONK", 1); HealBot_ColClassMonkpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("PALA", 1); HealBot_ColClassPaladinpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("PRIE", 1); HealBot_ColClassPriestpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("ROGU", 1); HealBot_ColClassRoguepick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("SHAM", 1); HealBot_ColClassShamanpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("WARL", 1); HealBot_ColClassWarlockpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetClassCol("WARR", 1); HealBot_ColClassWarriorpick:SetStatusBarColor(r,g,b,a)
    HealBot_Action_SetCustomClassCols(HealBot_Globals.OverrideColours["USECLASS"])
    HealBot_Timers_Set("LAST","ClearClassGuidData")
    HealBot_Timers_Set("SKINS","UpdateTextButtons")
end

function HealBot_Options_CheckAuxInUse()
      --HealBot_setCall("HealBot_Options_CheckAuxInUse")
    local aux=false
    for f=1,10 do
        if HealBot_Action_FrameIsVisible(f) then
            for x=1,9 do
                if hbv_Aux_GetBarVar("USE", f, x)>1 then
                    aux=true
                    break
                end
            end
        end
    end
	if aux then HealBot_Timers_Set("AUX","ResetBars",true) end
end

function HealBot_Options_RoleColourUpdate()
      --HealBot_setCall("HealBot_Options_RoleColourUpdate")
    HealBot_Timers_Set("AUX","CheckInUse",true)
    HealBot_Timers_Set("LAST","ResetUnitStatus")
    local a=1
    if HealBot_Globals.OverrideColours["USEROLE"] == 1 then a=0.2 end
    local r,g,b=hbv_Skins_GetRoleCol("TANK", 2); HealBot_OverrideColRoleTankpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetRoleCol("HEALER", 2); HealBot_OverrideColRoleHealpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetRoleCol("DAMAGER", 2); HealBot_OverrideColRoleDPSpick:SetStatusBarColor(r,g,b,a)
    a=1
    if HealBot_Globals.OverrideColours["USEROLE"] == 2 then a=0.2 end
    r,g,b=hbv_Skins_GetRoleCol("TANK", 1); HealBot_ColRoleTankpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetRoleCol("HEALER", 1); HealBot_ColRoleHealpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetRoleCol("DAMAGER", 1); HealBot_ColRoleDPSpick:SetStatusBarColor(r,g,b,a)
    HealBot_Action_SetCustomRoleCols()
    HealBot_Timers_Set("SKINS","UpdateTextButtons")
end

function HealBot_Options_AdaptiveColourUpdate()
      --HealBot_setCall("HealBot_Options_AdaptiveColourUpdate")
    local a=1
    if HealBot_Globals.OverrideColours["USEADAPTIVE"] == 1 then a=0.2 end
    healbotOverride_ColoursAdaptiveRecentHealspick:SetStatusBarColor(HealBot_Globals.OverrideAdaptiveCol["RecentHeals"].R,
                                                                     HealBot_Globals.OverrideAdaptiveCol["RecentHeals"].G,
                                                                     HealBot_Globals.OverrideAdaptiveCol["RecentHeals"].B,a)
    healbotOverride_ColoursAdaptiveThreatpick:SetStatusBarColor(     HealBot_Globals.OverrideAdaptiveCol["Threat"].R,
                                                                     HealBot_Globals.OverrideAdaptiveCol["Threat"].G,
                                                                     HealBot_Globals.OverrideAdaptiveCol["Threat"].B,a)
    healbotOverride_ColoursAdaptiveAggropick:SetStatusBarColor(      HealBot_Globals.OverrideAdaptiveCol["Aggro"].R,
                                                                     HealBot_Globals.OverrideAdaptiveCol["Aggro"].G,
                                                                     HealBot_Globals.OverrideAdaptiveCol["Aggro"].B,a)
    healbotOverride_ColoursAdaptiveHighlightpick:SetStatusBarColor(  HealBot_Globals.OverrideAdaptiveCol["Highlight"].R,
                                                                     HealBot_Globals.OverrideAdaptiveCol["Highlight"].G,
                                                                     HealBot_Globals.OverrideAdaptiveCol["Highlight"].B,a)
    healbotOverride_ColoursAdaptiveTargetpick:SetStatusBarColor(     HealBot_Globals.OverrideAdaptiveCol["Target"].R,
                                                                     HealBot_Globals.OverrideAdaptiveCol["Target"].G,
                                                                     HealBot_Globals.OverrideAdaptiveCol["Target"].B,a)
    healbotOverride_ColoursAdaptiveOORpick:SetStatusBarColor(        HealBot_Globals.OverrideAdaptiveCol["OOR"].R,
                                                                     HealBot_Globals.OverrideAdaptiveCol["OOR"].G,
                                                                     HealBot_Globals.OverrideAdaptiveCol["OOR"].B,a)
    healbotOverride_ColoursAdaptiveOverhealspick:SetStatusBarColor(  HealBot_Globals.OverrideAdaptiveCol["Overheals"].R,
                                                                     HealBot_Globals.OverrideAdaptiveCol["Overheals"].G,
                                                                     HealBot_Globals.OverrideAdaptiveCol["Overheals"].B,a)
    healbotOverride_ColoursAdaptiveAbsorbspick:SetStatusBarColor(    HealBot_Globals.OverrideAdaptiveCol["Absorbs"].R,
                                                                     HealBot_Globals.OverrideAdaptiveCol["Absorbs"].G,
                                                                     HealBot_Globals.OverrideAdaptiveCol["Absorbs"].B,a)
    a=1
    if HealBot_Globals.OverrideColours["USEADAPTIVE"] == 2 then a=0.2 end
    HealBot_Options_ColoursAdaptiveRecentHealspick:SetStatusBarColor(hbv_Skins_GetColVar("AdaptiveCol", "RecentHeals", "R"),
                                                                     hbv_Skins_GetColVar("AdaptiveCol", "RecentHeals", "G"),
                                                                     hbv_Skins_GetColVar("AdaptiveCol", "RecentHeals", "B"),a)
    HealBot_Options_ColoursAdaptiveThreatpick:SetStatusBarColor(     hbv_Skins_GetColVar("AdaptiveCol", "Threat", "R"),
                                                                     hbv_Skins_GetColVar("AdaptiveCol", "Threat", "G"),
                                                                     hbv_Skins_GetColVar("AdaptiveCol", "Threat", "B"),a)
    HealBot_Options_ColoursAdaptiveAggropick:SetStatusBarColor(      hbv_Skins_GetColVar("AdaptiveCol", "Aggro", "R"),
                                                                     hbv_Skins_GetColVar("AdaptiveCol", "Aggro", "G"),
                                                                     hbv_Skins_GetColVar("AdaptiveCol", "Aggro", "B"),a)
    HealBot_Options_ColoursAdaptiveHighlightpick:SetStatusBarColor(  hbv_Skins_GetColVar("AdaptiveCol", "Highlight", "R"),
                                                                     hbv_Skins_GetColVar("AdaptiveCol", "Highlight", "G"),
                                                                     hbv_Skins_GetColVar("AdaptiveCol", "Highlight", "B"),a)
    HealBot_Options_ColoursAdaptiveTargetpick:SetStatusBarColor(     hbv_Skins_GetColVar("AdaptiveCol", "Target", "R"),
                                                                     hbv_Skins_GetColVar("AdaptiveCol", "Target", "G"),
                                                                     hbv_Skins_GetColVar("AdaptiveCol", "Target", "B"),a)
    HealBot_Options_ColoursAdaptiveOORpick:SetStatusBarColor(        hbv_Skins_GetColVar("AdaptiveCol", "OOR", "R"),
                                                                     hbv_Skins_GetColVar("AdaptiveCol", "OOR", "G"),
                                                                     hbv_Skins_GetColVar("AdaptiveCol", "OOR", "B"),a)
    HealBot_Options_ColoursAdaptiveOverhealspick:SetStatusBarColor(  hbv_Skins_GetColVar("AdaptiveCol", "Overheals", "R"),
                                                                     hbv_Skins_GetColVar("AdaptiveCol", "Overheals", "G"),
                                                                     hbv_Skins_GetColVar("AdaptiveCol", "Overheals", "B"),a)
    HealBot_Options_ColoursAdaptiveAbsorbspick:SetStatusBarColor(    hbv_Skins_GetColVar("AdaptiveCol", "Absorbs", "R"),
                                                                     hbv_Skins_GetColVar("AdaptiveCol", "Absorbs", "G"),
                                                                     hbv_Skins_GetColVar("AdaptiveCol", "Absorbs", "B"),a)
    HealBot_Timers_Set("SKINS","SetAdaptive")
end

function HealBot_Options_PowerColourUpdate()
      --HealBot_setCall("HealBot_Options_PowerColourUpdate")
    local a=1
    if HealBot_Globals.OverrideColours["USEPOWER"] == 1 then a=0.2 end
    local r,g,b=hbv_Skins_GetPowerCol("LUNAR_POWER", 2); HealBot_OverrideColPowerAstralpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetPowerCol("ENERGY", 2); HealBot_OverrideColPowerEnergypick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetPowerCol("FOCUS", 2); HealBot_OverrideColPowerFocuspick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetPowerCol("FURY", 2); HealBot_OverrideColPowerFurypick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetPowerCol("MANA", 2); HealBot_OverrideColPowerManapick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetPowerCol("RAGE", 2); HealBot_OverrideColPowerRagepick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetPowerCol("RUNIC_POWER", 2); HealBot_OverrideColPowerRunicpick:SetStatusBarColor(r,g,b,a)
    a=1
    if HealBot_Globals.OverrideColours["USEPOWER"] == 2 then a=0.2 end
    r,g,b=hbv_Skins_GetPowerCol("LUNAR_POWER", 1); HealBot_ColPowerAstralpick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetPowerCol("ENERGY", 1); HealBot_ColPowerEnergypick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetPowerCol("FOCUS", 1); HealBot_ColPowerFocuspick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetPowerCol("FURY", 1); HealBot_ColPowerFurypick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetPowerCol("MANA", 1); HealBot_ColPowerManapick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetPowerCol("RAGE", 1); HealBot_ColPowerRagepick:SetStatusBarColor(r,g,b,a)
    r,g,b=hbv_Skins_GetPowerCol("RUNIC_POWER", 1); HealBot_ColPowerRunicpick:SetStatusBarColor(r,g,b,a)
    HealBot_Action_SetCustomPowerCols()
    HealBot_Timers_Set("AUX","CheckInUse",true)
end

function HealBot_Options_PresetColourClick(self)
      --HealBot_setCall("HealBot_Options_PresetColourClick")
    hb_lVars["PresetColourCaller"]=self:GetName()
    if hb_lVars["PresetColourCaller"] == "HealBot_Options_BuffHoTPresetColour" then
        HealBot_Options_Panel5:Hide()
        HealBot_Options_PresetColours:Show()
    elseif strsub(hb_lVars["PresetColourCaller"],1,20) == "HealBot_Options_Buff" then
        local id=tonumber(strsub(hb_lVars["PresetColourCaller"] ,33));
        hb_lVars["PresetColourCaller"]="Buff"..id
        HealBot_Options_Panel5:Hide()
        HealBot_Options_PresetColours:Show()
    elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_CustomDebuffPresetColour" then
        HealBot_Options_Panel4:Hide()
        HealBot_Options_PresetColours:Show()
    elseif strsub(hb_lVars["PresetColourCaller"],1,22) == "HealBot_Options_Debuff" then
        HealBot_Options_Panel4:Hide()
        HealBot_Options_PresetColours:Show()
    elseif strsub(hb_lVars["PresetColourCaller"],1,20) == "HealBot_Options_Skin" then
        HealBot_Options_Panel3:Hide()
        HealBot_Options_PresetColours:Show()
    elseif strsub(hb_lVars["PresetColourCaller"],1,24) == "HealBot_Options_Override" then
        HealBot_Options_Panel10:Hide()
        HealBot_Options_PresetColours:Show()
    end
end

function HealBot_Colorpick_OnClick(CDCType)
      --HealBot_setCall("HealBot_Colorpick_OnClick")
    if CDCType == HEALBOT_CUSTOM_en then
        HealBot_ColourObjWaiting=customDebuffPriority
        local sName=nil
        if hb_lVars["CDebuffcustomSpellID"] and hb_lVars["CDebuffcustomSpellID"]~=HEALBOT_CUSTOM_CAT_CUSTOM_AUTOMATIC then
            sName=HealBot_Options_SpellGetName(hb_lVars["CDebuffcustomSpellID"])
        end
        if hb_lVars["CDebuffcustomSpellID"] and sName then
            HealBot_ColourObjWaiting=hb_lVars["CDebuffcustomSpellID"]
            HealBot_ColourObjWaitingExtra=sName
            if not HealBot_Globals.CDCBarColour[hb_lVars["CDebuffcustomSpellID"]] then
                HealBot_UseColourPick(HealBot_Globals.CDCBarColour[customDebuffPriority].R,HealBot_Globals.CDCBarColour[customDebuffPriority].G,HealBot_Globals.CDCBarColour[customDebuffPriority].B, nil)
            else
                HealBot_UseColourPick(HealBot_Globals.CDCBarColour[hb_lVars["CDebuffcustomSpellID"]].R,
                                      HealBot_Globals.CDCBarColour[hb_lVars["CDebuffcustomSpellID"]].G,
                                      HealBot_Globals.CDCBarColour[hb_lVars["CDebuffcustomSpellID"]].B, nil)
            end
        else
            HealBot_ColourObjWaitingExtra=nil
            HealBot_UseColourPick(HealBot_Globals.CDCBarColour[customDebuffPriority].R,HealBot_Globals.CDCBarColour[customDebuffPriority].G,HealBot_Globals.CDCBarColour[customDebuffPriority].B, nil)
        end
    elseif CDCType == "CustomBuff" then
        HealBot_ColourObjWaiting=customBuffPriority
        local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"])
        local sName=nil
        if sId then sName=HealBot_Options_SpellGetName(sId) end
        if sId and sName then
            HealBot_ColourObjWaiting=sId
            HealBot_ColourObjWaitingExtra=sName
            if not HealBot_Globals.CustomBuffBarColour[sId] then
                HealBot_UseColourPick(HealBot_Globals.CustomBuffBarColour[customBuffPriority].R,HealBot_Globals.CustomBuffBarColour[customBuffPriority].G,HealBot_Globals.CustomBuffBarColour[customBuffPriority].B, nil)
            else
                HealBot_UseColourPick(HealBot_Globals.CustomBuffBarColour[sId].R,
                                      HealBot_Globals.CustomBuffBarColour[sId].G,
                                      HealBot_Globals.CustomBuffBarColour[sId].B, nil)
            end
        else
            HealBot_ColourObjWaitingExtra=nil
            HealBot_UseColourPick(HealBot_Globals.CustomBuffBarColour[customBuffPriority].R,HealBot_Globals.CustomBuffBarColour[customBuffPriority].G,HealBot_Globals.CustomBuffBarColour[customBuffPriority].B, nil)
        end
    else
        HealBot_ColourObjWaiting=CDCType;
        HealBot_UseColourPick(HealBot_Config_Cures.CDCBarColour[CDCType].R,HealBot_Config_Cures.CDCBarColour[CDCType].G,HealBot_Config_Cures.CDCBarColour[CDCType].B, nil)
    end
end

function HealBot_PresetColorpick_OnClick(id)
      --HealBot_setCall("HealBot_PresetColorpick_OnClick")
    hb_lVars["PresetColoursID"]=id
    HealBot_ColourObjWaiting="Preset"
    HealBot_UseColourPick(HealBot_Globals.PresetColours[id].R,HealBot_Globals.PresetColours[id].G,HealBot_Globals.PresetColours[id].B, HealBot_Globals.PresetColours[id].A)
end

local function HealBot_Returned_Colours(R, G, B, A, preset)
      --HealBot_setCall("HealBot_Returned_Colours")
  --R, G, B=ColorPickerFrame:GetColorRGB(); -- added by Diacono
  --A=OpacitySliderFrame:GetValue();
    if A and not preset then
        if HEALBOT_GAME_VERSION<10 then A=1-A; end
        A=HealBot_Util_Round(A,2)
    end
    R,G,B=HealBot_Util_ReturnedRGB(R, G, B)
    local setskincols=true;
    local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"])
    if HealBot_ColourObjWaiting == "Back" then
        hbv_Skins_SetFrameVar(R, "Frame", "BACKR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "Frame", "BACKG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "Frame", "BACKB", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(A, "Frame", "BACKA", hb_lVars["Frame"])
    elseif HealBot_ColourObjWaiting == "Bor" then
        hbv_Skins_SetFrameVar(R, "Frame", "BORDERR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "Frame", "BORDERG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "Frame", "BORDERB", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(A, "Frame", "BORDERA", hb_lVars["Frame"])
    elseif HealBot_ColourObjWaiting == "AliasT" then
        hbv_Skins_SetFrameVar(R, "FrameAlias", "R", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "FrameAlias", "G", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "FrameAlias", "B", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(A, "FrameAlias", "A", hb_lVars["Frame"])
    elseif HealBot_ColourObjWaiting == "Alias" then
        hbv_Skins_SetFrameVar(R, "FrameAliasBar", "R", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "FrameAliasBar", "G", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "FrameAliasBar", "B", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(A, "FrameAliasBar", "A", hb_lVars["Frame"])
    elseif HealBot_ColourObjWaiting == "HeadB" then
        hbv_Skins_SetFrameVar(R, "HeadBar", "R", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "HeadBar", "G", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "HeadBar", "B", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(A, "HeadBar", "A", hb_lVars["Frame"])
        HealBot_Options_framesChanged(true)
    elseif HealBot_ColourObjWaiting == "HeadT" then
        hbv_Skins_SetFrameVar(R, "HeadText", "R", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "HeadText", "G", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "HeadText", "B", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(A, "HeadText", "A", hb_lVars["Frame"])
        HealBot_Options_framesChanged(true)
    elseif HealBot_ColourObjWaiting == "ActionIconsAlertGlow" then
        hbv_ActionIcons_SetColData(R, G, B, A, "AlertGlowCol", hb_lVars["Frame"], hb_lVars["ActionIconsID"]);
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
        HealBot_Options_ActionIconsAlertGlowColpick:SetStatusBarColor(R, G, B, A)
    elseif HealBot_ColourObjWaiting == "ActionIconsCDText" then
        hbv_ActionIcons_SetColVars(R, G, B, A, "FONTCOL", hb_lVars["Frame"])
        HealBot_Options_ActionIconsCDTextColpick:SetStatusBarColor(R, G, B, A)
        HealBot_Timers_Set("SKINS","ActionIconsSetFontChange")
    elseif HealBot_ColourObjWaiting == "ActionIconsCountText" then
        hbv_ActionIcons_SetColVars(R, G, B, A, "FONTCOUNTCOL", hb_lVars["Frame"])
        HealBot_Options_ActionIconsCountTextColpick:SetStatusBarColor(R, G, B, A)
        HealBot_Timers_Set("SKINS","ActionIconsSetFontChange")
    elseif HealBot_ColourObjWaiting == "CustomBar" then
        hbv_Skins_SetFrameVar(R, "BarCol", "HR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarCol", "HG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarCol", "HB", hb_lVars["Frame"])
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "RoleTank" then
        hbv_Skins_SetRoleCol(R, "TANK", "r", false)
        hbv_Skins_SetRoleCol(G, "TANK", "g", false)
        hbv_Skins_SetRoleCol(B, "TANK", "b", false)
        HealBot_Timers_Set("LAST","RoleColourUpdate")
    elseif HealBot_ColourObjWaiting == "RoleHeal" then
        hbv_Skins_SetRoleCol(R, "HEALER", "r", false)
        hbv_Skins_SetRoleCol(G, "HEALER", "g", false)
        hbv_Skins_SetRoleCol(B, "HEALER", "b", false)
        HealBot_Timers_Set("LAST","RoleColourUpdate")
    elseif HealBot_ColourObjWaiting == "RoleDPS" then
        hbv_Skins_SetRoleCol(R, "DAMAGER", "r", false)
        hbv_Skins_SetRoleCol(G, "DAMAGER", "g", false)
        hbv_Skins_SetRoleCol(B, "DAMAGER", "b", false)
        HealBot_Timers_Set("LAST","RoleColourUpdate")
    elseif HealBot_ColourObjWaiting == "PowerAstral" then
        hbv_Skins_SetPowerCol(R, "LUNAR_POWER", "r", false)
        hbv_Skins_SetPowerCol(G, "LUNAR_POWER", "g", false)
        hbv_Skins_SetPowerCol(B, "LUNAR_POWER", "b", false)
        HealBot_Timers_Set("LAST","PowerColourUpdate")
    elseif HealBot_ColourObjWaiting == "PowerEnergy" then
        hbv_Skins_SetPowerCol(R, "ENERGY", "r", false)
        hbv_Skins_SetPowerCol(G, "ENERGY", "g", false)
        hbv_Skins_SetPowerCol(B, "ENERGY", "b", false)
        HealBot_Timers_Set("LAST","PowerColourUpdate")
    elseif HealBot_ColourObjWaiting == "PowerFocus" then
        hbv_Skins_SetPowerCol(R, "FOCUS", "r", false)
        hbv_Skins_SetPowerCol(G, "FOCUS", "g", false)
        hbv_Skins_SetPowerCol(B, "FOCUS", "b", false)
        HealBot_Timers_Set("LAST","PowerColourUpdate")
    elseif HealBot_ColourObjWaiting == "PowerFury" then
        hbv_Skins_SetPowerCol(R, "FURY", "r", false)
        hbv_Skins_SetPowerCol(G, "FURY", "g", false)
        hbv_Skins_SetPowerCol(B, "FURY", "b", false)
        HealBot_Timers_Set("LAST","PowerColourUpdate")
    elseif HealBot_ColourObjWaiting == "PowerMana" then
        hbv_Skins_SetPowerCol(R, "MANA", "r", false)
        hbv_Skins_SetPowerCol(G, "MANA", "g", false)
        hbv_Skins_SetPowerCol(B, "MANA", "b", false)
        HealBot_Timers_Set("LAST","PowerColourUpdate")
    elseif HealBot_ColourObjWaiting == "PowerRage" then
        hbv_Skins_SetPowerCol(R, "RAGE", "r", false)
        hbv_Skins_SetPowerCol(G, "RAGE", "g", false)
        hbv_Skins_SetPowerCol(B, "RAGE", "b", false)
        HealBot_Timers_Set("LAST","PowerColourUpdate")
    elseif HealBot_ColourObjWaiting == "PowerRunic" then
        hbv_Skins_SetPowerCol(R, "RUNIC_POWER", "r", false)
        hbv_Skins_SetPowerCol(G, "RUNIC_POWER", "g", false)
        hbv_Skins_SetPowerCol(B, "RUNIC_POWER", "b", false)
        HealBot_Timers_Set("LAST","PowerColourUpdate")
    elseif HealBot_ColourObjWaiting == "ClassDeathKnight" then
        hbv_Skins_SetClassCol(R, "DEAT", "r", false)
        hbv_Skins_SetClassCol(G, "DEAT", "g", false)
        hbv_Skins_SetClassCol(B, "DEAT", "b", false)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "ClassDemonHunter" then
        hbv_Skins_SetClassCol(R, "DEMO", "r", false)
        hbv_Skins_SetClassCol(G, "DEMO", "g", false)
        hbv_Skins_SetClassCol(B, "DEMO", "b", false)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "ClassDruid" then
        hbv_Skins_SetClassCol(R, "DRUI", "r", false)
        hbv_Skins_SetClassCol(G, "DRUI", "g", false)
        hbv_Skins_SetClassCol(B, "DRUI", "b", false)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "ClassEvoker" then
        hbv_Skins_SetClassCol(R, "EVOK", "r", false)
        hbv_Skins_SetClassCol(G, "EVOK", "g", false)
        hbv_Skins_SetClassCol(B, "EVOK", "b", false)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "ClassHunter" then
        hbv_Skins_SetClassCol(R, "HUNT", "r", false)
        hbv_Skins_SetClassCol(G, "HUNT", "g", false)
        hbv_Skins_SetClassCol(B, "HUNT", "b", false)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "ClassMage" then
        hbv_Skins_SetClassCol(R, "MAGE", "r", false)
        hbv_Skins_SetClassCol(G, "MAGE", "g", false)
        hbv_Skins_SetClassCol(B, "MAGE", "b", false)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "ClassMonk" then
        hbv_Skins_SetClassCol(R, "MONK", "r", false)
        hbv_Skins_SetClassCol(G, "MONK", "g", false)
        hbv_Skins_SetClassCol(B, "MONK", "b", false)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "ClassPaladin" then
        hbv_Skins_SetClassCol(R, "PALA", "r", false)
        hbv_Skins_SetClassCol(G, "PALA", "g", false)
        hbv_Skins_SetClassCol(B, "PALA", "b", false)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "ClassPriest" then
        hbv_Skins_SetClassCol(R, "PRIE", "r", false)
        hbv_Skins_SetClassCol(G, "PRIE", "g", false)
        hbv_Skins_SetClassCol(B, "PRIE", "b", false)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "ClassRogue" then
        hbv_Skins_SetClassCol(R, "ROGU", "r", false)
        hbv_Skins_SetClassCol(G, "ROGU", "g", false)
        hbv_Skins_SetClassCol(B, "ROGU", "b", false)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "ClassShaman" then
        hbv_Skins_SetClassCol(R, "SHAM", "r", false)
        hbv_Skins_SetClassCol(G, "SHAM", "g", false)
        hbv_Skins_SetClassCol(B, "SHAM", "b", false)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "ClassWarlock" then
        hbv_Skins_SetClassCol(R, "WARL", "r", false)
        hbv_Skins_SetClassCol(G, "WARL", "g", false)
        hbv_Skins_SetClassCol(B, "WARL", "b", false)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "ClassWarrior" then
        hbv_Skins_SetClassCol(R, "WARR", "r", false)
        hbv_Skins_SetClassCol(G, "WARR", "g", false)
        hbv_Skins_SetClassCol(B, "WARR", "b", false)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideRoleTank" then
        hbv_Skins_SetRoleCol(R, "TANK", "r", true)
        hbv_Skins_SetRoleCol(G, "TANK", "g", true)
        hbv_Skins_SetRoleCol(B, "TANK", "b", true)
        HealBot_Timers_Set("LAST","RoleColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideRoleHeal" then
        hbv_Skins_SetRoleCol(R, "HEALER", "r", true)
        hbv_Skins_SetRoleCol(G, "HEALER", "g", true)
        hbv_Skins_SetRoleCol(B, "HEALER", "b", true)
        HealBot_Timers_Set("LAST","RoleColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideRoleDPS" then
        hbv_Skins_SetRoleCol(R, "DAMAGER", "r", true)
        hbv_Skins_SetRoleCol(G, "DAMAGER", "g", true)
        hbv_Skins_SetRoleCol(B, "DAMAGER", "b", true)
        HealBot_Timers_Set("LAST","RoleColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverridePowerAstral" then
        hbv_Skins_SetPowerCol(R, "LUNAR_POWER", "r", true)
        hbv_Skins_SetPowerCol(G, "LUNAR_POWER", "g", true)
        hbv_Skins_SetPowerCol(B, "LUNAR_POWER", "b", true)
        HealBot_Timers_Set("LAST","PowerColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverridePowerEnergy" then
        hbv_Skins_SetPowerCol(R, "ENERGY", "r", true)
        hbv_Skins_SetPowerCol(G, "ENERGY", "g", true)
        hbv_Skins_SetPowerCol(B, "ENERGY", "b", true)
        HealBot_Timers_Set("LAST","PowerColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverridePowerFocus" then
        hbv_Skins_SetPowerCol(R, "FOCUS", "r", true)
        hbv_Skins_SetPowerCol(G, "FOCUS", "g", true)
        hbv_Skins_SetPowerCol(B, "FOCUS", "b", true)
        HealBot_Timers_Set("LAST","PowerColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverridePowerFury" then
        hbv_Skins_SetPowerCol(R, "FURY", "r", true)
        hbv_Skins_SetPowerCol(G, "FURY", "g", true)
        hbv_Skins_SetPowerCol(B, "FURY", "b", true)
        HealBot_Timers_Set("LAST","PowerColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverridePowerMana" then
        hbv_Skins_SetPowerCol(R, "MANA", "r", true)
        hbv_Skins_SetPowerCol(G, "MANA", "g", true)
        hbv_Skins_SetPowerCol(B, "MANA", "b", true)
        HealBot_Timers_Set("LAST","PowerColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverridePowerRage" then
        hbv_Skins_SetPowerCol(R, "RAGE", "r", true)
        hbv_Skins_SetPowerCol(G, "RAGE", "g", true)
        hbv_Skins_SetPowerCol(B, "RAGE", "b", true)
        HealBot_Timers_Set("LAST","PowerColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverridePowerRunic" then
        hbv_Skins_SetPowerCol(R, "RUNIC_POWER", "r", true)
        hbv_Skins_SetPowerCol(G, "RUNIC_POWER", "g", true)
        hbv_Skins_SetPowerCol(B, "RUNIC_POWER", "b", true)
        HealBot_Timers_Set("LAST","PowerColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideClassDeathKnight" then
        hbv_Skins_SetClassCol(R, "DEAT", "r", true)
        hbv_Skins_SetClassCol(G, "DEAT", "g", true)
        hbv_Skins_SetClassCol(B, "DEAT", "b", true)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideClassDemonHunter" then
        hbv_Skins_SetClassCol(R, "DEMO", "r", true)
        hbv_Skins_SetClassCol(G, "DEMO", "g", true)
        hbv_Skins_SetClassCol(B, "DEMO", "b", true)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideClassDruid" then
        hbv_Skins_SetClassCol(R, "DRUI", "r", true)
        hbv_Skins_SetClassCol(G, "DRUI", "g", true)
        hbv_Skins_SetClassCol(B, "DRUI", "b", true)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideClassEvoker" then
        hbv_Skins_SetClassCol(R, "EVOK", "r", true)
        hbv_Skins_SetClassCol(G, "EVOK", "g", true)
        hbv_Skins_SetClassCol(B, "EVOK", "b", true)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideClassHunter" then
        hbv_Skins_SetClassCol(R, "HUNT", "r", true)
        hbv_Skins_SetClassCol(G, "HUNT", "g", true)
        hbv_Skins_SetClassCol(B, "HUNT", "b", true)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideClassMage" then
        hbv_Skins_SetClassCol(R, "MAGE", "r", true)
        hbv_Skins_SetClassCol(G, "MAGE", "g", true)
        hbv_Skins_SetClassCol(B, "MAGE", "b", true)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideClassMonk" then
        hbv_Skins_SetClassCol(R, "MONK", "r", true)
        hbv_Skins_SetClassCol(G, "MONK", "g", true)
        hbv_Skins_SetClassCol(B, "MONK", "b", true)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideClassPaladin" then
        hbv_Skins_SetClassCol(R, "PALA", "r", true)
        hbv_Skins_SetClassCol(G, "PALA", "g", true)
        hbv_Skins_SetClassCol(B, "PALA", "b", true)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideClassPriest" then
        hbv_Skins_SetClassCol(R, "PRIE", "r", true)
        hbv_Skins_SetClassCol(G, "PRIE", "g", true)
        hbv_Skins_SetClassCol(B, "PRIE", "b", true)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideClassRogue" then
        hbv_Skins_SetClassCol(R, "ROGU", "r", true)
        hbv_Skins_SetClassCol(G, "ROGU", "g", true)
        hbv_Skins_SetClassCol(B, "ROGU", "b", true)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideClassShaman" then
        hbv_Skins_SetClassCol(R, "SHAM", "r", true)
        hbv_Skins_SetClassCol(G, "SHAM", "g", true)
        hbv_Skins_SetClassCol(B, "SHAM", "b", true)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideClassWarlock" then
        hbv_Skins_SetClassCol(R, "WARL", "r", true)
        hbv_Skins_SetClassCol(G, "WARL", "g", true)
        hbv_Skins_SetClassCol(B, "WARL", "b", true)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideClassWarrior" then
        hbv_Skins_SetClassCol(R, "WARR", "r", true)
        hbv_Skins_SetClassCol(G, "WARR", "g", true)
        hbv_Skins_SetClassCol(B, "WARR", "b", true)
        HealBot_Timers_Set("LAST","ClassColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideAdaptiveRecentHeals" then
        HealBot_Globals.OverrideAdaptiveCol["RecentHeals"].R,
        HealBot_Globals.OverrideAdaptiveCol["RecentHeals"].G,
        HealBot_Globals.OverrideAdaptiveCol["RecentHeals"].B=R, G, B;
        HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideAdaptiveThreat" then
        HealBot_Globals.OverrideAdaptiveCol["Threat"].R,
        HealBot_Globals.OverrideAdaptiveCol["Threat"].G,
        HealBot_Globals.OverrideAdaptiveCol["Threat"].B=R, G, B;
        HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideAdaptiveAggro" then
        HealBot_Globals.OverrideAdaptiveCol["Aggro"].R,
        HealBot_Globals.OverrideAdaptiveCol["Aggro"].G,
        HealBot_Globals.OverrideAdaptiveCol["Aggro"].B=R, G, B;
        HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideAdaptiveHighlight" then
        HealBot_Globals.OverrideAdaptiveCol["Highlight"].R,
        HealBot_Globals.OverrideAdaptiveCol["Highlight"].G,
        HealBot_Globals.OverrideAdaptiveCol["Highlight"].B=R, G, B;
        HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideAdaptiveTarget" then
        HealBot_Globals.OverrideAdaptiveCol["Target"].R,
        HealBot_Globals.OverrideAdaptiveCol["Target"].G,
        HealBot_Globals.OverrideAdaptiveCol["Target"].B=R, G, B;
        HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideAdaptiveOOR" then
        HealBot_Globals.OverrideAdaptiveCol["OOR"].R,
        HealBot_Globals.OverrideAdaptiveCol["OOR"].G,
        HealBot_Globals.OverrideAdaptiveCol["OOR"].B=R, G, B;
        HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideAdaptiveOverheals" then
        HealBot_Globals.OverrideAdaptiveCol["Overheals"].R,
        HealBot_Globals.OverrideAdaptiveCol["Overheals"].G,
        HealBot_Globals.OverrideAdaptiveCol["Overheals"].B=R, G, B;
        HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
    elseif HealBot_ColourObjWaiting == "OverrideAdaptiveAbsorbs" then
        HealBot_Globals.OverrideAdaptiveCol["Absorbs"].R,
        HealBot_Globals.OverrideAdaptiveCol["Absorbs"].G,
        HealBot_Globals.OverrideAdaptiveCol["Absorbs"].B=R, G, B;
        HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
    elseif HealBot_ColourObjWaiting == "SkinAdaptiveRecentHeals" then
        hbv_Skins_SetColVar(R, "AdaptiveCol", "RecentHeals", "R")
        hbv_Skins_SetColVar(G, "AdaptiveCol", "RecentHeals", "G")
        hbv_Skins_SetColVar(B, "AdaptiveCol", "RecentHeals", "B")
        HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
    elseif HealBot_ColourObjWaiting == "SkinAdaptiveThreat" then
        hbv_Skins_SetColVar(R, "AdaptiveCol", "Threat", "R")
        hbv_Skins_SetColVar(G, "AdaptiveCol", "Threat", "G")
        hbv_Skins_SetColVar(B, "AdaptiveCol", "Threat", "B")
        HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
    elseif HealBot_ColourObjWaiting == "SkinAdaptiveAggro" then
        hbv_Skins_SetColVar(R, "AdaptiveCol", "Aggro", "R")
        hbv_Skins_SetColVar(G, "AdaptiveCol", "Aggro", "G")
        hbv_Skins_SetColVar(B, "AdaptiveCol", "Aggro", "B")
        HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
    elseif HealBot_ColourObjWaiting == "SkinAdaptiveHighlight" then
        hbv_Skins_SetColVar(R, "AdaptiveCol", "Highlight", "R")
        hbv_Skins_SetColVar(G, "AdaptiveCol", "Highlight", "G")
        hbv_Skins_SetColVar(B, "AdaptiveCol", "Highlight", "B")
        HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
    elseif HealBot_ColourObjWaiting == "SkinAdaptiveTarget" then
        hbv_Skins_SetColVar(R, "AdaptiveCol", "Target", "R")
        hbv_Skins_SetColVar(G, "AdaptiveCol", "Target", "G")
        hbv_Skins_SetColVar(B, "AdaptiveCol", "Target", "B")
        HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
    elseif HealBot_ColourObjWaiting == "SkinAdaptiveOOR" then
        hbv_Skins_SetColVar(R, "AdaptiveCol", "OOR", "R")
        hbv_Skins_SetColVar(G, "AdaptiveCol", "OOR", "G")
        hbv_Skins_SetColVar(B, "AdaptiveCol", "OOR", "B")
        HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
    elseif HealBot_ColourObjWaiting == "SkinAdaptiveOverheals" then
        hbv_Skins_SetColVar(R, "AdaptiveCol", "Overheals", "R")
        hbv_Skins_SetColVar(G, "AdaptiveCol", "Overheals", "G")
        hbv_Skins_SetColVar(B, "AdaptiveCol", "Overheals", "B")
        HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
    elseif HealBot_ColourObjWaiting == "SkinAdaptiveAbsorbs" then
        hbv_Skins_SetColVar(R, "AdaptiveCol", "Absorbs", "R")
        hbv_Skins_SetColVar(G, "AdaptiveCol", "Absorbs", "G")
        hbv_Skins_SetColVar(B, "AdaptiveCol", "Absorbs", "B")
        HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
    elseif HealBot_ColourObjWaiting == "CustomInjuredBar" then
        hbv_Skins_SetFrameVar(R, "BarCol", "HIR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarCol", "HIG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarCol", "HIB", hb_lVars["Frame"])
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomCriticalBar" then
        hbv_Skins_SetFrameVar(R, "BarCol", "HCR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarCol", "HCG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarCol", "HCB", hb_lVars["Frame"])
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomEnemyBar" then
        hbv_Skins_SetFrameVar(R, "BarCol", "HRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarCol", "HGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarCol", "HBE", hb_lVars["Frame"])
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomInjuredEnemyBar" then
        hbv_Skins_SetFrameVar(R, "BarCol", "HIRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarCol", "HIGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarCol", "HIBE", hb_lVars["Frame"])
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomCriticalEnemyBar" then
        hbv_Skins_SetFrameVar(R, "BarCol", "HCRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarCol", "HCGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarCol", "HCBE", hb_lVars["Frame"])
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomAuxBar" then
        hbv_Data_AuxSetBarVar(R, "R", hb_lVars["Frame"], hb_lVars["AuxBar"])
        hbv_Data_AuxSetBarVar(G, "G", hb_lVars["Frame"], hb_lVars["AuxBar"])
        hbv_Data_AuxSetBarVar(B, "B", hb_lVars["Frame"], hb_lVars["AuxBar"])
        HealBot_Aux_UpdateAllAuxByType(hb_lVars["Frame"], hb_lVars["AuxBar"])
    elseif HealBot_ColourObjWaiting == "CustomNameText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "NCR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "NCG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "NCB", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_TextCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomNameInjuredText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "NICR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "NICG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "NICB", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_TextCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomNameCriticalText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "NCCR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "NCCG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "NCCB", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_TextCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomNameEnemyText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "NCRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "NCGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "NCBE", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_TextCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomNameInjuredEnemyText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "NICRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "NICGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "NICBE", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_TextCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomNameCriticalEnemyText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "NCCRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "NCCGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "NCCBE", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_TextCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomStateText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "SCR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "SCG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "SCB", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_TextCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomStateInjuredText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "SICR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "SICG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "SICB", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_TextCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomStateCriticalText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "SCCR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "SCCG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "SCCB", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_TextCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomStateEnemyText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "SCRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "SCGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "SCBE", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_TextCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomStateInjuredEnemyText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "SICRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "SICGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "SICBE", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_TextCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomStateCriticalEnemyText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "SCCRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "SCCGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "SCCBE", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_TextCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "DeadStateText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "SDCR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "SDCG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "SDCB", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    elseif HealBot_ColourObjWaiting == "DeadNameText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "NDCR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "NDCG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "NDCB", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    elseif HealBot_ColourObjWaiting == "ResStateText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "SRCR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "SRCG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "SRCB", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    elseif HealBot_ColourObjWaiting == "ResNameText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "NRCR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "NRCG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "NRCB", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    elseif HealBot_ColourObjWaiting == "SummonStateText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "SSCR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "SSCG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "SSCB", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    elseif HealBot_ColourObjWaiting == "SummonNameText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "NSCR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "NSCG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "NSCB", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
    elseif HealBot_ColourObjWaiting == "CustomEmergCrit" then
        hbv_Skins_SetFrameVar(R, "Emerg", "CR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "Emerg", "CG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "Emerg", "CB", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","UpdateEmergBars")
    elseif HealBot_ColourObjWaiting == "CustomEmergInj" then
        hbv_Skins_SetFrameVar(R, "Emerg", "IR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "Emerg", "IG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "Emerg", "IB", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","UpdateEmergBars")
    elseif HealBot_ColourObjWaiting == "CustomEmergHealthy" then
        hbv_Skins_SetFrameVar(R, "Emerg", "HR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "Emerg", "HG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "Emerg", "HB", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","UpdateEmergBars")
    elseif HealBot_ColourObjWaiting == "CustomOverHealText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "OCR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "OCG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "OCB", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","SetBarsTextColour")
    elseif HealBot_ColourObjWaiting == "CustomInHealText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "ICR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "ICG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "ICB", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","SetBarsTextColour")
    elseif HealBot_ColourObjWaiting == "CustomExtraHealthText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "HECR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "HECG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "HECB", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","TextExtraCustomCols")
        HealBot_Timers_Set("SKINS","TextUpdateHealth")
    elseif HealBot_ColourObjWaiting == "CustomAggroText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "ACR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "ACG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "ACB", hb_lVars["Frame"])
        HealBot_Timers_Set("SKINS","SkinBarTextColours")
    elseif HealBot_ColourObjWaiting == "CustomAuxText" then
        hbv_Aux_SetBarTextVar(R, "COLR", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])
        hbv_Aux_SetBarTextVar(G, "COLG", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])
        hbv_Aux_SetBarTextVar(B, "COLB", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])
        HealBot_Timers_Set("AUX","ResetTextButtons")
    elseif HealBot_ColourObjWaiting == "CustomHealthText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "HCR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "HCG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "HCB", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_Timers_Set("SKINS","TextExtraCustomCols")
        HealBot_TextCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomHealthInjuredText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "HICR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "HICG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "HICB", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_TextCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomHealthCriticalText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "HCCR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "HCCG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "HCCB", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_TextCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomHealthEnemyText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "HCRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "HCGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "HCBE", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_Timers_Set("SKINS","TextExtraCustomCols")
        HealBot_TextCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomHealthInjuredEnemyText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "HICRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "HICGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "HICBE", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_TextCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomHealthCriticalEnemyText" then
        hbv_Skins_SetFrameVar(R, "BarTextCol", "HCCRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarTextCol", "HCCGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarTextCol", "HCCBE", hb_lVars["Frame"])
        if not hb_lVars["TestBarsOn"] then HealBot_Timers_Set("SKINS","SkinBarTextColours") end
        HealBot_TextCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomBackBar" then
        hbv_Skins_SetFrameVar(R, "BarCol", "BR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarCol", "BG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarCol", "BB", hb_lVars["Frame"])
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomBackInjuredBar" then
        hbv_Skins_SetFrameVar(R, "BarCol", "BIR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarCol", "BIG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarCol", "BIB", hb_lVars["Frame"])
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomBackCriticalBar" then
        hbv_Skins_SetFrameVar(R, "BarCol", "BCR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarCol", "BCG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarCol", "BCB", hb_lVars["Frame"])
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomBackEnemyBar" then
        hbv_Skins_SetFrameVar(R, "BarCol", "BRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarCol", "BGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarCol", "BBE", hb_lVars["Frame"])
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomBackInjuredEnemyBar" then
        hbv_Skins_SetFrameVar(R, "BarCol", "BIRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarCol", "BIGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarCol", "BIBE", hb_lVars["Frame"])
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomBackCriticalEnemyBar" then
        hbv_Skins_SetFrameVar(R, "BarCol", "BCRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarCol", "BCGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarCol", "BCBE", hb_lVars["Frame"])
        HealBot_Timers_Set("LAST","ResetUnitStatus")
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomIHBar" then
        hbv_Skins_SetFrameVar(R, "BarIACol", "IR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarIACol", "IG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarIACol", "IB", hb_lVars["Frame"])
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomIHInjuredBar" then
        hbv_Skins_SetFrameVar(R, "BarIACol", "IIR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarIACol", "IIG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarIACol", "IIB", hb_lVars["Frame"])
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomIHCriticalBar" then
        hbv_Skins_SetFrameVar(R, "BarIACol", "ICR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarIACol", "ICG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarIACol", "ICB", hb_lVars["Frame"])
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomIHEnemyBar" then
        hbv_Skins_SetFrameVar(R, "BarIACol", "IRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarIACol", "IGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarIACol", "IBE", hb_lVars["Frame"])
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomIHInjuredEnemyBar" then
        hbv_Skins_SetFrameVar(R, "BarIACol", "IIRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarIACol", "IIGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarIACol", "IIBE", hb_lVars["Frame"])
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomIHCriticalEnemyBar" then
        hbv_Skins_SetFrameVar(R, "BarIACol", "ICRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarIACol", "ICGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarIACol", "ICBE", hb_lVars["Frame"])
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomAbsorbBar" then
        hbv_Skins_SetFrameVar(R, "BarIACol", "AR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarIACol", "AG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarIACol", "AB", hb_lVars["Frame"])
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomAbsorbInjuredBar" then
        hbv_Skins_SetFrameVar(R, "BarIACol", "AIR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarIACol", "AIG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarIACol", "AIB", hb_lVars["Frame"])
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomAbsorbCriticalBar" then
        hbv_Skins_SetFrameVar(R, "BarIACol", "ACR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarIACol", "ACG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarIACol", "ACB", hb_lVars["Frame"])
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomAbsorbEnemyBar" then
        hbv_Skins_SetFrameVar(R, "BarIACol", "ARE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarIACol", "AGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarIACol", "ABE", hb_lVars["Frame"])
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomAbsorbInjuredEnemyBar" then
        hbv_Skins_SetFrameVar(R, "BarIACol", "AIRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarIACol", "AIGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarIACol", "AIBE", hb_lVars["Frame"])
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomAbsorbCriticalEnemyBar" then
        hbv_Skins_SetFrameVar(R, "BarIACol", "ACRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarIACol", "ACGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarIACol", "ACBE", hb_lVars["Frame"])
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomBorderBar" then
        hbv_Skins_SetFrameVar(R, "BarCol", "BORR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarCol", "BORG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarCol", "BORB", hb_lVars["Frame"])
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomBorderInjuredBar" then
        hbv_Skins_SetFrameVar(R, "BarCol", "BORIR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarCol", "BORIG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarCol", "BORIB", hb_lVars["Frame"])
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomBorderCriticalBar" then
        hbv_Skins_SetFrameVar(R, "BarCol", "BORCR", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarCol", "BORCG", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarCol", "BORCB", hb_lVars["Frame"])
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomBorderEnemyBar" then
        hbv_Skins_SetFrameVar(R, "BarCol", "BORRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarCol", "BORGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarCol", "BORBE", hb_lVars["Frame"])
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomBorderInjuredEnemyBar" then
        hbv_Skins_SetFrameVar(R, "BarCol", "BORIRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarCol", "BORIGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarCol", "BORIBE", hb_lVars["Frame"])
        HealBot_BarCustomColours_SetStatusBars()
    elseif HealBot_ColourObjWaiting == "CustomBorderCriticalEnemyBar" then
        hbv_Skins_SetFrameVar(R, "BarCol", "BORCRE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(G, "BarCol", "BORCGE", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(B, "BarCol", "BORCBE", hb_lVars["Frame"])
        HealBot_BarCustomColours_SetStatusBars()
    elseif strsub(HealBot_ColourObjWaiting ,1,4) == "Buff" then
        local id=tonumber(strsub(HealBot_ColourObjWaiting ,5));
        local buffbarcolrClass=HealBot_Config_Buffs.HealBotBuffColR or 1
        local buffbarcolgClass=HealBot_Config_Buffs.HealBotBuffColG or 1
        local buffbarcolbClass=HealBot_Config_Buffs.HealBotBuffColB or 1
        buffbarcolrClass[id],
        buffbarcolgClass[id],
        buffbarcolbClass[id]=R, G, B;
        HealBot_Timers_Set("AURA","BuffBarColours")
        setskincols=false;
    elseif HealBot_ColourObjWaiting == customDebuffPriority or HealBot_ColourObjWaiting == hb_lVars["CDebuffcustomSpellID"] then
        if HealBot_ColourObjWaiting == hb_lVars["CDebuffcustomSpellID"] then
            if (R ~= 0.45 or G ~= 0 or B ~= 0.26) then
                if not HealBot_Globals.CDCBarColour[HealBot_ColourObjWaiting] then
                    HealBot_Globals.CDCBarColour[HealBot_ColourObjWaiting]={}
                end
                HealBot_Globals.CDCBarColour[HealBot_ColourObjWaiting].R,
                HealBot_Globals.CDCBarColour[HealBot_ColourObjWaiting].G,
                HealBot_Globals.CDCBarColour[HealBot_ColourObjWaiting].B=R, G, B;
                if HealBot_ColourObjWaiting == hb_lVars["CDebuffcustomSpellID"] and HealBot_ColourObjWaitingExtra then
                    if not HealBot_Globals.CDCBarColour[HealBot_ColourObjWaitingExtra] then
                        HealBot_Globals.CDCBarColour[HealBot_ColourObjWaitingExtra]={}
                    end
                    HealBot_Globals.CDCBarColour[HealBot_ColourObjWaitingExtra].R,
                    HealBot_Globals.CDCBarColour[HealBot_ColourObjWaitingExtra].G,
                    HealBot_Globals.CDCBarColour[HealBot_ColourObjWaitingExtra].B=R, G, B;
                end
            else
                HealBot_Globals.CDCBarColour[HealBot_ColourObjWaiting]=nil
                if HealBot_Globals.CDCBarColour[HealBot_ColourObjWaitingExtra] then
                    HealBot_Globals.CDCBarColour[HealBot_ColourObjWaitingExtra]=nil
                end
            end
        else
            HealBot_Globals.CDCBarColour[customDebuffPriority].R,
            HealBot_Globals.CDCBarColour[customDebuffPriority].G,
            HealBot_Globals.CDCBarColour[customDebuffPriority].B=R, G, B;
        end
        HealBot_SetCDCBarColours();
        setskincols=false;
    elseif HealBot_ColourObjWaiting == customBuffPriority or HealBot_ColourObjWaiting == sId then
        if HealBot_ColourObjWaiting == customBuffPriority then
            HealBot_Globals.CustomBuffBarColour[customBuffPriority].R,
            HealBot_Globals.CustomBuffBarColour[customBuffPriority].G,
            HealBot_Globals.CustomBuffBarColour[customBuffPriority].B=R, G, B;
        elseif R ~= 0.25 or G ~= 0.58 or B ~= 0.8 then
            if not HealBot_Globals.CustomBuffBarColour[sId] then
                HealBot_Globals.CustomBuffBarColour[sId]={}
            end
            HealBot_Globals.CustomBuffBarColour[sId].R,
            HealBot_Globals.CustomBuffBarColour[sId].G,
            HealBot_Globals.CustomBuffBarColour[sId].B=R, G, B;
            if HealBot_ColourObjWaiting == sId and HealBot_ColourObjWaitingExtra then
                if not HealBot_Globals.CustomBuffBarColour[HealBot_ColourObjWaitingExtra] then
                    HealBot_Globals.CustomBuffBarColour[HealBot_ColourObjWaitingExtra]={}
                end
                HealBot_Globals.CustomBuffBarColour[HealBot_ColourObjWaitingExtra].R,
                HealBot_Globals.CustomBuffBarColour[HealBot_ColourObjWaitingExtra].G,
                HealBot_Globals.CustomBuffBarColour[HealBot_ColourObjWaitingExtra].B=R, G, B;
            end
        end
        HealBot_SetCustomBuffBarColours();
        HealBot_Timers_Set("AURA","CustomBuffList")
        HealBot_Timers_Set("AURA","UpdateAllBuffIcons")
        setskincols=false;
    elseif HealBot_Config_Cures.CDCBarColour[HealBot_ColourObjWaiting] then
        HealBot_Config_Cures.CDCBarColour[HealBot_ColourObjWaiting].R,
        HealBot_Config_Cures.CDCBarColour[HealBot_ColourObjWaiting].G,
        HealBot_Config_Cures.CDCBarColour[HealBot_ColourObjWaiting].B=R, G, B;
        HealBot_SetCDCBarColours();
        setskincols=false;
    elseif HealBot_ColourObjWaiting == "Preset" then
        HealBot_Globals.PresetColours[hb_lVars["PresetColoursID"]].R,
        HealBot_Globals.PresetColours[hb_lVars["PresetColoursID"]].G,
        HealBot_Globals.PresetColours[hb_lVars["PresetColoursID"]].B,
        HealBot_Globals.PresetColours[hb_lVars["PresetColoursID"]].A=R, G, B, A;
        g=_G["HealBot_PresetColourpick"..hb_lVars["PresetColoursID"]]
        g:SetStatusBarColor(HealBot_Globals.PresetColours[hb_lVars["PresetColoursID"]].R,
                            HealBot_Globals.PresetColours[hb_lVars["PresetColoursID"]].G,
                            HealBot_Globals.PresetColours[hb_lVars["PresetColoursID"]].B,
                            HealBot_Globals.PresetColours[hb_lVars["PresetColoursID"]].A)
    end
    if setskincols then
        HealBot_Timers_Set("SKINS","SkinsFormat",true)
        HealBot_Timers_Set("SKINS","SkinColours",true)
    end
end

function HealBot_Options_CustomColourInjured_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_CustomColourInjured_OnValueChanged")
    if hb_lVars["BarCustomColoursCaller"] == "Health" then
        if hbv_Skins_GetFrameVar("BarCol", "HIT", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
            hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarCol", "HIT", hb_lVars["Frame"])
            if hbv_Skins_GetFrameVar("BarCol", "HIT", hb_lVars["Frame"])<hbv_Skins_GetFrameVar("BarCol", "HCT", hb_lVars["Frame"]) then
                hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HIT", hb_lVars["Frame"]), "BarCol", "HCT", hb_lVars["Frame"])
                HealBot_BarCustomColours_SetStatusBars()
            end
            HealBot_Timers_Set("LAST","ResetUnitStatus")
        end
    elseif hb_lVars["BarCustomColoursCaller"] == "Back" then
        if hbv_Skins_GetFrameVar("BarCol", "BIT", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
            hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarCol", "BIT", hb_lVars["Frame"])
            if hbv_Skins_GetFrameVar("BarCol", "BIT", hb_lVars["Frame"])<hbv_Skins_GetFrameVar("BarCol", "BCT", hb_lVars["Frame"]) then
                hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BIT", hb_lVars["Frame"]), "BarCol", "BCT", hb_lVars["Frame"])
                HealBot_BarCustomColours_SetStatusBars()
            end
            HealBot_Timers_Set("LAST","ResetUnitStatus")
        end
    elseif hb_lVars["BarCustomColoursCaller"] == "InHeal" then
        if hbv_Skins_GetFrameVar("BarIACol", "IIT", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
            hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarIACol", "IIT", hb_lVars["Frame"])
            if hbv_Skins_GetFrameVar("BarIACol", "IIT", hb_lVars["Frame"])<hbv_Skins_GetFrameVar("BarIACol", "ICT", hb_lVars["Frame"]) then
                hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "IIT", hb_lVars["Frame"]), "BarIACol", "ICT", hb_lVars["Frame"])
                HealBot_BarCustomColours_SetStatusBars()
            end
            HealBot_Timers_Set("LAST","ResetUnitStatus")
        end
    elseif hb_lVars["BarCustomColoursCaller"] == "Absorb" then
        if hbv_Skins_GetFrameVar("BarIACol", "AIT", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
            hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarIACol", "AIT", hb_lVars["Frame"])
            if hbv_Skins_GetFrameVar("BarIACol", "AIT", hb_lVars["Frame"])<hbv_Skins_GetFrameVar("BarIACol", "ACT", hb_lVars["Frame"]) then
                hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "AIT", hb_lVars["Frame"]), "BarIACol", "ACT", hb_lVars["Frame"])
                HealBot_BarCustomColours_SetStatusBars()
            end
            HealBot_Timers_Set("LAST","ResetUnitStatus")
        end
    elseif hb_lVars["BarCustomColoursCaller"] == "Border" then
        if hbv_Skins_GetFrameVar("BarCol", "BORIT", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
            hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarCol", "BORIT", hb_lVars["Frame"])
            if hbv_Skins_GetFrameVar("BarCol", "BORIT", hb_lVars["Frame"])<hbv_Skins_GetFrameVar("BarCol", "BORCT", hb_lVars["Frame"]) then
                hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORIT", hb_lVars["Frame"]), "BarCol", "BORCT", hb_lVars["Frame"])
                HealBot_BarCustomColours_SetStatusBars()
            end
            HealBot_Timers_Set("LAST","ResetUnitStatus")
        end
    end
end

function HealBot_Options_CustomColourCritical_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_CustomColourCritical_OnValueChanged")
    if hb_lVars["BarCustomColoursCaller"] == "Health" then
        if hbv_Skins_GetFrameVar("BarCol", "HCT", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
            hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarCol", "HCT", hb_lVars["Frame"])
            if hbv_Skins_GetFrameVar("BarCol", "HCT", hb_lVars["Frame"])>hbv_Skins_GetFrameVar("BarCol", "HIT", hb_lVars["Frame"]) then
                hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "HCT", hb_lVars["Frame"]), "BarCol", "HIT", hb_lVars["Frame"])
                HealBot_BarCustomColours_SetStatusBars()
            end
            HealBot_Timers_Set("LAST","ResetUnitStatus")
        end
    elseif hb_lVars["BarCustomColoursCaller"] == "Back" then
        if hbv_Skins_GetFrameVar("BarCol", "BCT", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
            hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarCol", "BCT", hb_lVars["Frame"])
            if hbv_Skins_GetFrameVar("BarCol", "BCT", hb_lVars["Frame"])>hbv_Skins_GetFrameVar("BarCol", "BIT", hb_lVars["Frame"]) then
                hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BCT", hb_lVars["Frame"]), "BarCol", "BIT", hb_lVars["Frame"])
                HealBot_BarCustomColours_SetStatusBars()
            end
            HealBot_Timers_Set("LAST","ResetUnitStatus")
        end
    elseif hb_lVars["BarCustomColoursCaller"] == "InHeal" then
        if hbv_Skins_GetFrameVar("BarIACol", "ICT", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
            hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarIACol", "ICT", hb_lVars["Frame"])
            if hbv_Skins_GetFrameVar("BarIACol", "ICT", hb_lVars["Frame"])>hbv_Skins_GetFrameVar("BarIACol", "IIT", hb_lVars["Frame"]) then
                hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "ICT", hb_lVars["Frame"]), "BarIACol", "IIT", hb_lVars["Frame"])
                HealBot_BarCustomColours_SetStatusBars()
            end
            HealBot_Timers_Set("LAST","ResetUnitStatus")
        end
    elseif hb_lVars["BarCustomColoursCaller"] == "Absorb" then
        if hbv_Skins_GetFrameVar("BarIACol", "ACT", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
            hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarIACol", "ACT", hb_lVars["Frame"])
            if hbv_Skins_GetFrameVar("BarIACol", "ACT", hb_lVars["Frame"])>hbv_Skins_GetFrameVar("BarIACol", "AIT", hb_lVars["Frame"]) then
                hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarIACol", "ACT", hb_lVars["Frame"]), "BarIACol", "AIT", hb_lVars["Frame"])
                HealBot_BarCustomColours_SetStatusBars()
            end
            HealBot_Timers_Set("LAST","ResetUnitStatus")
        end
    elseif hb_lVars["BarCustomColoursCaller"] == "Border" then
        if hbv_Skins_GetFrameVar("BarCol", "BORCT", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
            hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarCol", "BORCT", hb_lVars["Frame"])
            if hbv_Skins_GetFrameVar("BarCol", "BORCT", hb_lVars["Frame"])>hbv_Skins_GetFrameVar("BarCol", "BORIT", hb_lVars["Frame"]) then
                hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarCol", "BORCT", hb_lVars["Frame"]), "BarCol", "BORIT", hb_lVars["Frame"])
                HealBot_BarCustomColours_SetStatusBars()
            end
            HealBot_Timers_Set("LAST","ResetUnitStatus")
        end
    end
end

function HealBot_Options_TextCustomColourInjured_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_TextCustomColourInjured_OnValueChanged")
    if hb_lVars["TextCustomColoursCaller"] == "Name" then
        if hbv_Skins_GetFrameVar("BarTextCol", "NIT", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
            hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "NIT", hb_lVars["Frame"])
            if hbv_Skins_GetFrameVar("BarTextCol", "NIT", hb_lVars["Frame"])<hbv_Skins_GetFrameVar("BarTextCol", "NCT", hb_lVars["Frame"]) then
                hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "NIT", hb_lVars["Frame"]), "BarTextCol", "NCT", hb_lVars["Frame"])
                HealBot_TextCustomColours_SetStatusBars()
            end
            HealBot_Timers_Set("LAST","ResetUnitStatus")
        end
    elseif hb_lVars["TextCustomColoursCaller"] == "Health" then
        if hbv_Skins_GetFrameVar("BarTextCol", "HIT", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
            hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "HIT", hb_lVars["Frame"])
            if hbv_Skins_GetFrameVar("BarTextCol", "HIT", hb_lVars["Frame"])<hbv_Skins_GetFrameVar("BarTextCol", "HCT", hb_lVars["Frame"]) then
                hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HIT", hb_lVars["Frame"]), "BarTextCol", "HCT", hb_lVars["Frame"])
                HealBot_TextCustomColours_SetStatusBars()
            end
            HealBot_Timers_Set("LAST","ResetUnitStatus")
        end
    elseif hb_lVars["TextCustomColoursCaller"] == "State" then
        if hbv_Skins_GetFrameVar("BarTextCol", "SIT", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
            hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "SIT", hb_lVars["Frame"])
            if hbv_Skins_GetFrameVar("BarTextCol", "SIT", hb_lVars["Frame"])<hbv_Skins_GetFrameVar("BarTextCol", "SCT", hb_lVars["Frame"]) then
                hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SIT", hb_lVars["Frame"]), "BarTextCol", "SCT", hb_lVars["Frame"])
                HealBot_TextCustomColours_SetStatusBars()
            end
            HealBot_Timers_Set("LAST","ResetUnitStatus")
        end
    elseif hb_lVars["TextCustomColoursCaller"] == "Aggro" then
        if hbv_Skins_GetFrameVar("BarTextCol", "AIT", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
            hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "AIT", hb_lVars["Frame"])
            if hbv_Skins_GetFrameVar("BarTextCol", "AIT", hb_lVars["Frame"])<hbv_Skins_GetFrameVar("BarTextCol", "ACT", hb_lVars["Frame"]) then
                hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "AIT", hb_lVars["Frame"]), "BarTextCol", "ACT", hb_lVars["Frame"])
                HealBot_TextCustomColours_SetStatusBars()
            end
            HealBot_Timers_Set("LAST","ResetUnitStatus")
        end
    end
end

function HealBot_Options_TextCustomColourCritical_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_TextCustomColourCritical_OnValueChanged")
    if hb_lVars["TextCustomColoursCaller"] == "Name" then
        if hbv_Skins_GetFrameVar("BarTextCol", "NCT", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
            hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "NCT", hb_lVars["Frame"])
            if hbv_Skins_GetFrameVar("BarTextCol", "NCT", hb_lVars["Frame"])>hbv_Skins_GetFrameVar("BarTextCol", "NIT", hb_lVars["Frame"]) then
                hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "NCT", hb_lVars["Frame"]), "BarTextCol", "NIT", hb_lVars["Frame"])
                HealBot_TextCustomColours_SetStatusBars()
            end
            HealBot_Timers_Set("LAST","ResetUnitStatus")
        end
    elseif hb_lVars["TextCustomColoursCaller"] == "Health" then
        if hbv_Skins_GetFrameVar("BarTextCol", "HCT", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
            hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "HCT", hb_lVars["Frame"])
            if hbv_Skins_GetFrameVar("BarTextCol", "HCT", hb_lVars["Frame"])>hbv_Skins_GetFrameVar("BarTextCol", "HIT", hb_lVars["Frame"]) then
                hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "HCT", hb_lVars["Frame"]), "BarTextCol", "HIT", hb_lVars["Frame"])
                HealBot_TextCustomColours_SetStatusBars()
            end
            HealBot_Timers_Set("LAST","ResetUnitStatus")
        end
    elseif hb_lVars["TextCustomColoursCaller"] == "State" then
        if hbv_Skins_GetFrameVar("BarTextCol", "SCT", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
            hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "SCT", hb_lVars["Frame"])
            if hbv_Skins_GetFrameVar("BarTextCol", "SCT", hb_lVars["Frame"])>hbv_Skins_GetFrameVar("BarTextCol", "SIT", hb_lVars["Frame"]) then
                hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "SCT", hb_lVars["Frame"]), "BarTextCol", "SIT", hb_lVars["Frame"])
                HealBot_TextCustomColours_SetStatusBars()
            end
            HealBot_Timers_Set("LAST","ResetUnitStatus")
        end
    elseif hb_lVars["TextCustomColoursCaller"] == "Aggro" then
        if hbv_Skins_GetFrameVar("BarTextCol", "ACT", hb_lVars["Frame"])~=HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2) then
            hbv_Skins_SetFrameVar(HealBot_Util_Round(HealBot_Options_Pct_OnValueChanged(self),2), "BarTextCol", "ACT", hb_lVars["Frame"])
            if hbv_Skins_GetFrameVar("BarTextCol", "ACT", hb_lVars["Frame"])>hbv_Skins_GetFrameVar("BarTextCol", "AIT", hb_lVars["Frame"]) then
                hbv_Skins_SetFrameVar(hbv_Skins_GetFrameVar("BarTextCol", "ACT", hb_lVars["Frame"]), "BarTextCol", "AIT", hb_lVars["Frame"])
                HealBot_TextCustomColours_SetStatusBars()
            end
            HealBot_Timers_Set("LAST","ResetUnitStatus")
        end
    end
end

function HealBot_BarCustomColours_SetStatusBars()
      --HealBot_setCall("HealBot_BarCustomColours_SetStatusBars")
    local r,g,b,re,ge,be
    if hb_lVars["BarCustomColoursCaller"] == "Health" then
        r,g,b=hbv_Skins_GetFrameVar("BarCol", "HR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarCol", "HG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarCol", "HB", hb_lVars["Frame"])
        re,ge,be=hbv_Skins_GetFrameVar("BarCol", "HRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarCol", "HGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarCol", "HBE", hb_lVars["Frame"])

        HealBot_Options_CustomColourInjured:SetValue(hbv_Skins_GetFrameVar("BarCol", "HIT", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_CustomColourInjured)
        HealBot_Options_CustomColourCritical:SetValue(hbv_Skins_GetFrameVar("BarCol", "HCT", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_CustomColourCritical)

        HealBot_SkinsFramesBarsColoursCustom_Text:SetText(HEALBOT_OPTIONS_CUSTOMCOLHEALTH)
    elseif hb_lVars["BarCustomColoursCaller"] == "Back" then
        r,g,b=hbv_Skins_GetFrameVar("BarCol", "BR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarCol", "BG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarCol", "BB", hb_lVars["Frame"])
        re,ge,be=hbv_Skins_GetFrameVar("BarCol", "BRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarCol", "BGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarCol", "BBE", hb_lVars["Frame"])

        HealBot_Options_CustomColourInjured:SetValue(hbv_Skins_GetFrameVar("BarCol", "BIT", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_CustomColourInjured)
        HealBot_Options_CustomColourCritical:SetValue(hbv_Skins_GetFrameVar("BarCol", "BCT", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_CustomColourCritical)

        HealBot_SkinsFramesBarsColoursCustom_Text:SetText(HEALBOT_OPTIONS_CUSTOMCOLBACK)
    elseif hb_lVars["BarCustomColoursCaller"] == "InHeal" then
        r,g,b=hbv_Skins_GetFrameVar("BarIACol", "IR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarIACol", "IG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarIACol", "IB", hb_lVars["Frame"])
        re,ge,be=hbv_Skins_GetFrameVar("BarIACol", "IRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarIACol", "IGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarIACol", "IBE", hb_lVars["Frame"])

        HealBot_Options_CustomColourInjured:SetValue(hbv_Skins_GetFrameVar("BarIACol", "IIT", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_CustomColourInjured)
        HealBot_Options_CustomColourCritical:SetValue(hbv_Skins_GetFrameVar("BarIACol", "ICT", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_CustomColourCritical)

        HealBot_SkinsFramesBarsColoursCustom_Text:SetText(HEALBOT_OPTIONS_CUSTOMCOLINHEAL)
    elseif hb_lVars["BarCustomColoursCaller"] == "Absorb" then
        r,g,b=hbv_Skins_GetFrameVar("BarIACol", "AR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarIACol", "AG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarIACol", "AB", hb_lVars["Frame"])
        re,ge,be=hbv_Skins_GetFrameVar("BarIACol", "ARE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarIACol", "AGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarIACol", "ABE", hb_lVars["Frame"])

        HealBot_Options_CustomColourInjured:SetValue(hbv_Skins_GetFrameVar("BarIACol", "AIT", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_CustomColourInjured)
        HealBot_Options_CustomColourCritical:SetValue(hbv_Skins_GetFrameVar("BarIACol", "ACT", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_CustomColourCritical)

        HealBot_SkinsFramesBarsColoursCustom_Text:SetText(HEALBOT_OPTIONS_CUSTOMCOLABSORB)
    elseif hb_lVars["BarCustomColoursCaller"] == "Border" then
        r,g,b=hbv_Skins_GetFrameVar("BarCol", "BORR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarCol", "BORG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarCol", "BORB", hb_lVars["Frame"])
        re,ge,be=hbv_Skins_GetFrameVar("BarCol", "BORRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarCol", "BORGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarCol", "BORBE", hb_lVars["Frame"])

        HealBot_Options_CustomColourInjured:SetValue(hbv_Skins_GetFrameVar("BarCol", "BORIT", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_CustomColourInjured)
        HealBot_Options_CustomColourCritical:SetValue(hbv_Skins_GetFrameVar("BarCol", "BORCT", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_CustomColourCritical)

        HealBot_SkinsFramesBarsColoursCustom_Text:SetText(HEALBOT_OPTIONS_CUSTOMCOLBACKBOR)
    end
    HealBot_BarHealthyCustomColour:SetStatusBarColor(r,g,b,1)
    HealBot_BarHealthyCustomColourEnemy:SetStatusBarColor(re,ge,be,1)

    if hb_lVars["BarCustomColoursCaller"] == "Health" then
        r,g,b=hbv_Skins_GetFrameVar("BarCol", "HIR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarCol", "HIG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarCol", "HIB", hb_lVars["Frame"])
        re,ge,be=hbv_Skins_GetFrameVar("BarCol", "HIRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarCol", "HIGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarCol", "HIBE", hb_lVars["Frame"])
    elseif hb_lVars["BarCustomColoursCaller"] == "Back" then
        r,g,b=hbv_Skins_GetFrameVar("BarCol", "BIR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarCol", "BIG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarCol", "BIB", hb_lVars["Frame"])
        re,ge,be=hbv_Skins_GetFrameVar("BarCol", "BIRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarCol", "BIGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarCol", "BIBE", hb_lVars["Frame"])
    elseif hb_lVars["BarCustomColoursCaller"] == "InHeal" then
        r,g,b=hbv_Skins_GetFrameVar("BarIACol", "IIR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarIACol", "IIG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarIACol", "IIB", hb_lVars["Frame"])
        re,ge,be=hbv_Skins_GetFrameVar("BarIACol", "IIRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarIACol", "IIGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarIACol", "IIBE", hb_lVars["Frame"])
    elseif hb_lVars["BarCustomColoursCaller"] == "Absorb" then
        r,g,b=hbv_Skins_GetFrameVar("BarIACol", "AIR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarIACol", "AIG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarIACol", "AIB", hb_lVars["Frame"])
        re,ge,be=hbv_Skins_GetFrameVar("BarIACol", "AIRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarIACol", "AIGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarIACol", "AIBE", hb_lVars["Frame"])
    elseif hb_lVars["BarCustomColoursCaller"] == "Border" then
        r,g,b=hbv_Skins_GetFrameVar("BarCol", "BORIR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarCol", "BORIG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarCol", "BORIB", hb_lVars["Frame"])
        re,ge,be=hbv_Skins_GetFrameVar("BarCol", "BORIRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarCol", "BORIGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarCol", "BORIBE", hb_lVars["Frame"])
    end
    HealBot_BarInjuredCustomColour:SetStatusBarColor(r,g,b,1)
    HealBot_BarInjuredCustomColourEnemy:SetStatusBarColor(re,ge,be,1)

    if hb_lVars["BarCustomColoursCaller"] == "Health" then
        r,g,b=hbv_Skins_GetFrameVar("BarCol", "HCR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarCol", "HCG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarCol", "HCB", hb_lVars["Frame"])
        re,ge,be=hbv_Skins_GetFrameVar("BarCol", "HCRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarCol", "HCGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarCol", "HCBE", hb_lVars["Frame"])
    elseif hb_lVars["BarCustomColoursCaller"] == "Back" then
        r,g,b=hbv_Skins_GetFrameVar("BarCol", "BCR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarCol", "BCG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarCol", "BCB", hb_lVars["Frame"])
        re,ge,be=hbv_Skins_GetFrameVar("BarCol", "BCRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarCol", "BCGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarCol", "BCBE", hb_lVars["Frame"])
    elseif hb_lVars["BarCustomColoursCaller"] == "InHeal" then
        r,g,b=hbv_Skins_GetFrameVar("BarIACol", "ICR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarIACol", "ICG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarIACol", "ICB", hb_lVars["Frame"])
        re,ge,be=hbv_Skins_GetFrameVar("BarIACol", "ICRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarIACol", "ICGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarIACol", "ICBE", hb_lVars["Frame"])
    elseif hb_lVars["BarCustomColoursCaller"] == "Absorb" then
        r,g,b=hbv_Skins_GetFrameVar("BarIACol", "ACR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarIACol", "ACG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarIACol", "ACB", hb_lVars["Frame"])
        re,ge,be=hbv_Skins_GetFrameVar("BarIACol", "ACRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarIACol", "ACGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarIACol", "ACBE", hb_lVars["Frame"])
    elseif hb_lVars["BarCustomColoursCaller"] == "Border" then
        r,g,b=hbv_Skins_GetFrameVar("BarCol", "BORCR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarCol", "BORCG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarCol", "BORCB", hb_lVars["Frame"])
        re,ge,be=hbv_Skins_GetFrameVar("BarCol", "BORCRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarCol", "BORCGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarCol", "BORCBE", hb_lVars["Frame"])
    end
    HealBot_BarCriticalCustomColour:SetStatusBarColor(r,g,b,1)
    HealBot_BarCriticalCustomColourEnemy:SetStatusBarColor(re,ge,be,1)
end

function HealBot_TextCustomColours_SetStatusBars()
      --HealBot_setCall("HealBot_TextCustomColours_SetStatusBars")
    local r,g,b,fn,fh,fo,er,eg,eb
    if hb_lVars["TextCustomColoursCaller"] == "Name" then
        r,g,b=hbv_Skins_GetFrameVar("BarTextCol", "NCR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarTextCol", "NCG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarTextCol", "NCB", hb_lVars["Frame"])
        er,eg,eb=hbv_Skins_GetFrameVar("BarTextCol", "NCRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarTextCol", "NCGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarTextCol", "NCBE", hb_lVars["Frame"])
        fn=hbv_Skins_GetFrameVar("BarText", "FONT", hb_lVars["Frame"])
        fh=hbv_Skins_GetFrameVar("BarText", "HEIGHT", hb_lVars["Frame"])
        fo=hbv_Skins_GetFrameVar("BarText", "OUTLINE", hb_lVars["Frame"])

        HealBot_Options_TextCustomColourInjured:SetValue(hbv_Skins_GetFrameVar("BarTextCol", "NIT", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_TextCustomColourInjured)
        HealBot_Options_TextCustomColourCritical:SetValue(hbv_Skins_GetFrameVar("BarTextCol", "NCT", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_TextCustomColourCritical)

        HealBot_SkinsFramesTextColoursCustom_Text:SetText(HEALBOT_OPTIONS_CUSTOMTEXTCOLNAME)
    elseif hb_lVars["TextCustomColoursCaller"] == "Health" then
        r,g,b=hbv_Skins_GetFrameVar("BarTextCol", "HCR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarTextCol", "HCG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarTextCol", "HCB", hb_lVars["Frame"])
        er,eg,eb=hbv_Skins_GetFrameVar("BarTextCol", "HCRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarTextCol", "HCGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarTextCol", "HCBE", hb_lVars["Frame"])
        fn=hbv_Skins_GetFrameVar("BarText", "HFONT", hb_lVars["Frame"])
        fh=hbv_Skins_GetFrameVar("BarText", "HHEIGHT", hb_lVars["Frame"])
        fo=hbv_Skins_GetFrameVar("BarText", "HOUTLINE", hb_lVars["Frame"])

        HealBot_Options_TextCustomColourInjured:SetValue(hbv_Skins_GetFrameVar("BarTextCol", "HIT", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_TextCustomColourInjured)
        HealBot_Options_TextCustomColourCritical:SetValue(hbv_Skins_GetFrameVar("BarTextCol", "HCT", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_TextCustomColourCritical)

        HealBot_SkinsFramesTextColoursCustom_Text:SetText(HEALBOT_OPTIONS_CUSTOMTEXTCOLHEALTH)
    elseif hb_lVars["TextCustomColoursCaller"] == "State" then
        r,g,b=hbv_Skins_GetFrameVar("BarTextCol", "SCR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarTextCol", "SCG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarTextCol", "SCB", hb_lVars["Frame"])
        er,eg,eb=hbv_Skins_GetFrameVar("BarTextCol", "SCRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarTextCol", "SCGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarTextCol", "SCBE", hb_lVars["Frame"])
        fn=hbv_Skins_GetFrameVar("BarText", "SFONT", hb_lVars["Frame"])
        fh=hbv_Skins_GetFrameVar("BarText", "SHEIGHT", hb_lVars["Frame"])
        fo=hbv_Skins_GetFrameVar("BarText", "SOUTLINE", hb_lVars["Frame"])

        HealBot_Options_TextCustomColourInjured:SetValue(hbv_Skins_GetFrameVar("BarTextCol", "SIT", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_TextCustomColourInjured)
        HealBot_Options_TextCustomColourCritical:SetValue(hbv_Skins_GetFrameVar("BarTextCol", "SCT", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_TextCustomColourCritical)

        HealBot_SkinsFramesTextColoursCustom_Text:SetText(HEALBOT_OPTIONS_CUSTOMTEXTCOLSTATE)
    end
    HealBot_TextHealthyCustomColourt:SetTextColor(r,g,b,1)
    HealBot_TextHealthyCustomColourEnemyt:SetTextColor(er,eg,eb,1)
    HealBot_Media_UpdateFont(HealBot_TextHealthyCustomColourt, fn, fh, fo, "Options_TextCustomColours_SetStatusBars - BarText")
    HealBot_Media_UpdateFont(HealBot_TextInjuredCustomColourt, fn, fh, fo, "Options_TextCustomColours_SetStatusBars - BarText")
    HealBot_Media_UpdateFont(HealBot_TextCriticalCustomColourt, fn, fh, fo, "Options_TextCustomColours_SetStatusBars - BarText")
    HealBot_Media_UpdateFont(HealBot_TextHealthyCustomColourEnemyt, fn, fh, fo, "Options_TextCustomColours_SetStatusBars - BarText")
    HealBot_Media_UpdateFont(HealBot_TextInjuredCustomColourEnemyt, fn, fh, fo, "Options_TextCustomColours_SetStatusBars - BarText")
    HealBot_Media_UpdateFont(HealBot_TextCriticalCustomColourEnemyt, fn, fh, fo, "Options_TextCustomColours_SetStatusBars - BarText")

    if hb_lVars["TextCustomColoursCaller"] == "Name" then
        r,g,b=hbv_Skins_GetFrameVar("BarTextCol", "NICR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarTextCol", "NICG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarTextCol", "NICB", hb_lVars["Frame"])
        er,eg,eb=hbv_Skins_GetFrameVar("BarTextCol", "NICRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarTextCol", "NICGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarTextCol", "NICBE", hb_lVars["Frame"])
    elseif hb_lVars["TextCustomColoursCaller"] == "Health" then
        r,g,b=hbv_Skins_GetFrameVar("BarTextCol", "HICR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarTextCol", "HICG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarTextCol", "HICB", hb_lVars["Frame"])
        er,eg,eb=hbv_Skins_GetFrameVar("BarTextCol", "HICRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarTextCol", "HICGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarTextCol", "HICBE", hb_lVars["Frame"])
    elseif hb_lVars["TextCustomColoursCaller"] == "State" then
        r,g,b=hbv_Skins_GetFrameVar("BarTextCol", "SICR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarTextCol", "SICG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarTextCol", "SICB", hb_lVars["Frame"])
        er,eg,eb=hbv_Skins_GetFrameVar("BarTextCol", "SICRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarTextCol", "SICGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarTextCol", "SICBE", hb_lVars["Frame"])
    end
    HealBot_TextInjuredCustomColourt:SetTextColor(r,g,b,1)
    HealBot_TextInjuredCustomColourEnemyt:SetTextColor(er,eg,eb,1)

    if hb_lVars["TextCustomColoursCaller"] == "Name" then
        r,g,b=hbv_Skins_GetFrameVar("BarTextCol", "NCCR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarTextCol", "NCCG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarTextCol", "NCCB", hb_lVars["Frame"])
        er,eg,eb=hbv_Skins_GetFrameVar("BarTextCol", "NCCRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarTextCol", "NCCGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarTextCol", "NCCBE", hb_lVars["Frame"])
    elseif hb_lVars["TextCustomColoursCaller"] == "Health" then
        r,g,b=hbv_Skins_GetFrameVar("BarTextCol", "HCCR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarTextCol", "HCCG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarTextCol", "HCCB", hb_lVars["Frame"])
        er,eg,eb=hbv_Skins_GetFrameVar("BarTextCol", "HCCRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarTextCol", "HCCGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarTextCol", "HCCBE", hb_lVars["Frame"])
    elseif hb_lVars["TextCustomColoursCaller"] == "State" then
        r,g,b=hbv_Skins_GetFrameVar("BarTextCol", "SCCR", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarTextCol", "SCCG", hb_lVars["Frame"]),
              hbv_Skins_GetFrameVar("BarTextCol", "SCCB", hb_lVars["Frame"])
        er,eg,eb=hbv_Skins_GetFrameVar("BarTextCol", "SCCRE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarTextCol", "SCCGE", hb_lVars["Frame"]),
                 hbv_Skins_GetFrameVar("BarTextCol", "SCCBE", hb_lVars["Frame"])
    end
    HealBot_TextCriticalCustomColourt:SetTextColor(r,g,b,1)
    HealBot_TextCriticalCustomColourEnemyt:SetTextColor(er,eg,eb,1)
end

function HealBot_BarCustomColours_OnClick(caller)
      --HealBot_setCall("HealBot_BarCustomColours_OnClick")
    hb_lVars["BarCustomColoursCaller"]=caller
    HealBot_Options_SkinsFramesBarsColoursCustom:Show()
    HealBot_Options_SkinsFramesBarsColours:Hide()
    HealBot_BarCustomColours_SetStatusBars()
end

function HealBot_TextCustomColours_OnClick(caller)
      --HealBot_setCall("HealBot_TextCustomColours_OnClick")
    hb_lVars["TextCustomColoursCaller"]=caller
    HealBot_Options_SkinsFramesTextColoursCustom:Show()
    if hb_lVars["TextCustomColoursCaller"] == "Name" then
        HealBot_Options_SkinsFrameTextNameColour:Hide()
    elseif hb_lVars["TextCustomColoursCaller"] == "Health" then
        HealBot_Options_SkinsFrameTextHealthColour:Hide()
    elseif hb_lVars["TextCustomColoursCaller"] == "State" then
        HealBot_Options_SkinsFrameTextStateColour:Hide()
    else
        HealBot_Options_SkinsFrameTextAggroColour:Hide()
    end
    HealBot_TextCustomColours_SetStatusBars()
end

function HealBot_SkinCustomColoursColorpick_OnClick(caller)
      --HealBot_setCall("HealBot_SkinCustomColoursColorpick_OnClick")
    if hb_lVars["BarCustomColoursCaller"] == "Health" then
        if caller == "Critical" then
            HealBot_SkinColorpick_OnClick("CustomCriticalBar")
        elseif caller == "Injured" then
            HealBot_SkinColorpick_OnClick("CustomInjuredBar")
        elseif caller == "Healthy" then
            HealBot_SkinColorpick_OnClick("CustomBar")
        elseif caller == "CriticalEnemy" then
            HealBot_SkinColorpick_OnClick("CustomCriticalEnemyBar")
        elseif caller == "InjuredEnemy" then
            HealBot_SkinColorpick_OnClick("CustomInjuredEnemyBar")
        else
            HealBot_SkinColorpick_OnClick("CustomEnemyBar")
        end
    elseif hb_lVars["BarCustomColoursCaller"] == "Back" then
        if caller == "Critical" then
            HealBot_SkinColorpick_OnClick("CustomBackCriticalBar")
        elseif caller == "Injured" then
            HealBot_SkinColorpick_OnClick("CustomBackInjuredBar")
        elseif caller == "Healthy" then
            HealBot_SkinColorpick_OnClick("CustomBackBar")
        elseif caller == "CriticalEnemy" then
            HealBot_SkinColorpick_OnClick("CustomBackCriticalEnemyBar")
        elseif caller == "InjuredEnemy" then
            HealBot_SkinColorpick_OnClick("CustomBackInjuredEnemyBar")
        else
            HealBot_SkinColorpick_OnClick("CustomBackEnemyBar")
        end
    elseif hb_lVars["BarCustomColoursCaller"] == "InHeal" then
        if caller == "Critical" then
            HealBot_SkinColorpick_OnClick("CustomIHCriticalBar")
        elseif caller == "Injured" then
            HealBot_SkinColorpick_OnClick("CustomIHInjuredBar")
        elseif caller == "Healthy" then
            HealBot_SkinColorpick_OnClick("CustomIHBar")
        elseif caller == "CriticalEnemy" then
            HealBot_SkinColorpick_OnClick("CustomIHCriticalEnemyBar")
        elseif caller == "InjuredEnemy" then
            HealBot_SkinColorpick_OnClick("CustomIHInjuredEnemyBar")
        else
            HealBot_SkinColorpick_OnClick("CustomIHEnemyBar")
        end
    elseif hb_lVars["BarCustomColoursCaller"] == "Absorb" then
        if caller == "Critical" then
            HealBot_SkinColorpick_OnClick("CustomAbsorbCriticalBar")
        elseif caller == "Injured" then
            HealBot_SkinColorpick_OnClick("CustomAbsorbInjuredBar")
        elseif caller == "Healthy" then
            HealBot_SkinColorpick_OnClick("CustomAbsorbBar")
        elseif caller == "CriticalEnemy" then
            HealBot_SkinColorpick_OnClick("CustomAbsorbCriticalEnemyBar")
        elseif caller == "InjuredEnemy" then
            HealBot_SkinColorpick_OnClick("CustomAbsorbInjuredEnemyBar")
        else
            HealBot_SkinColorpick_OnClick("CustomAbsorbEnemyBar")
        end
    elseif hb_lVars["BarCustomColoursCaller"] == "Border" then
        if caller == "Critical" then
            HealBot_SkinColorpick_OnClick("CustomBorderCriticalBar")
        elseif caller == "Injured" then
            HealBot_SkinColorpick_OnClick("CustomBorderInjuredBar")
        elseif caller == "Healthy" then
            HealBot_SkinColorpick_OnClick("CustomBorderBar")
        elseif caller == "CriticalEnemy" then
            HealBot_SkinColorpick_OnClick("CustomBorderCriticalEnemyBar")
        elseif caller == "InjuredEnemy" then
            HealBot_SkinColorpick_OnClick("CustomBorderInjuredEnemyBar")
        else
            HealBot_SkinColorpick_OnClick("CustomBorderEnemyBar")
        end
    end
end

function HealBot_SkinTextCustomColoursColorpick_OnClick(caller)
      --HealBot_setCall("HealBot_SkinTextCustomColoursColorpick_OnClick")
    if hb_lVars["TextCustomColoursCaller"] == "Name" then
        if caller == "Critical" then
            HealBot_SkinColorpick_OnClick("CustomNameCriticalText")
        elseif caller == "Injured" then
            HealBot_SkinColorpick_OnClick("CustomNameInjuredText")
        elseif caller == "Healthy" then
            HealBot_SkinColorpick_OnClick("CustomNameText")
        elseif caller == "CriticalEnemy" then
            HealBot_SkinColorpick_OnClick("CustomNameCriticalEnemyText")
        elseif caller == "InjuredEnemy" then
            HealBot_SkinColorpick_OnClick("CustomNameInjuredEnemyText")
        else
            HealBot_SkinColorpick_OnClick("CustomNameEnemyText")
        end
    elseif hb_lVars["TextCustomColoursCaller"] == "Health" then
        if caller == "Critical" then
            HealBot_SkinColorpick_OnClick("CustomHealthCriticalText")
        elseif caller == "Injured" then
            HealBot_SkinColorpick_OnClick("CustomHealthInjuredText")
        elseif caller == "Healthy" then
            HealBot_SkinColorpick_OnClick("CustomHealthText")
        elseif caller == "CriticalEnemy" then
            HealBot_SkinColorpick_OnClick("CustomHealthCriticalEnemyText")
        elseif caller == "InjuredEnemy" then
            HealBot_SkinColorpick_OnClick("CustomHealthInjuredEnemyText")
        else
            HealBot_SkinColorpick_OnClick("CustomHealthEnemyText")
        end
    elseif hb_lVars["TextCustomColoursCaller"] == "State" then
        if caller == "Critical" then
            HealBot_SkinColorpick_OnClick("CustomStateCriticalText")
        elseif caller == "Injured" then
            HealBot_SkinColorpick_OnClick("CustomStateInjuredText")
        elseif caller == "Healthy" then
            HealBot_SkinColorpick_OnClick("CustomStateText")
        elseif caller == "CriticalEnemy" then
            HealBot_SkinColorpick_OnClick("CustomStateCriticalEnemyText")
        elseif caller == "InjuredEnemy" then
            HealBot_SkinColorpick_OnClick("CustomStateInjuredEnemyText")
        else
            HealBot_SkinColorpick_OnClick("CustomStateEnemyText")
        end
    end
    if caller~="Critical" and caller~="Injured" then
        hb_lVars["CustomTxtColourHealthyChange"]=true
    end
end

function HealBot_Options_TextCustomColourDone_OnClick()
      --HealBot_setCall("HealBot_Options_TextCustomColourDone_OnClick")
    if hb_lVars["TextCustomColoursCaller"] == "Name" then
        HealBot_Options_SkinsFrameTextNameColour:Show()
    elseif hb_lVars["TextCustomColoursCaller"] == "Health" then
        HealBot_Options_SkinsFrameTextHealthColour:Show()
    elseif hb_lVars["TextCustomColoursCaller"] == "State" then
        HealBot_Options_SkinsFrameTextStateColour:Show()
    else
        HealBot_Options_SkinsFrameTextAggroColour:Show()
    end
    HealBot_Options_SkinsFramesTextColoursCustom:Hide()
    if hb_lVars["CustomTxtColourHealthyChange"] then
        hb_lVars["CustomTxtColourHealthyChange"]=false
        HealBot_Timers_Set("SKINS","SkinBarTextColours")
    end
end

function HealBot_Options_PresetColourSelect_OnClick(id,cancel)
      --HealBot_setCall("HealBot_Options_PresetColourSelect_OnClick")
    if hb_lVars["PresetColourCaller"] == "HealBot_Options_BuffHoTPresetColour" then
        local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"])
        if sId and HealBot_Globals.CustomBuffBarColour[sId] then
            HealBot_ColourObjWaiting=sId
        else
            HealBot_ColourObjWaiting=customBuffPriority
        end
        HealBot_Options_PresetColours:Hide()
        HealBot_Options_Panel5:Show()
    elseif strsub(hb_lVars["PresetColourCaller"] ,1,4) == "Buff" then
        HealBot_ColourObjWaiting=hb_lVars["PresetColourCaller"]
        HealBot_Options_PresetColours:Hide()
        HealBot_Options_Panel5:Show()
    elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_CustomDebuffPresetColour" then
        if hb_lVars["CDebuffcustomSpellID"] and HealBot_Globals.CDCBarColour[hb_lVars["CDebuffcustomSpellID"]] then
            HealBot_ColourObjWaiting=hb_lVars["CDebuffcustomSpellID"]
        else
            HealBot_ColourObjWaiting=customDebuffPriority
        end
        HealBot_Options_PresetColours:Hide()
        HealBot_Options_Panel4:Show()
    elseif strsub(hb_lVars["PresetColourCaller"],1,22) == "HealBot_Options_Debuff" then
        if hb_lVars["PresetColourCaller"] == "HealBot_Options_DebuffCursePresetColour" then
            HealBot_ColourObjWaiting=HEALBOT_CURSE_en
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_DebuffPoisonPresetColour" then
            HealBot_ColourObjWaiting=HEALBOT_POISON_en
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_DebuffMagicPresetColour" then
            HealBot_ColourObjWaiting=HEALBOT_MAGIC_en
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_DebuffDiseasePresetColour" then
            HealBot_ColourObjWaiting=HEALBOT_DISEASE_en
        end
        HealBot_Options_PresetColours:Hide()
        HealBot_Options_Panel4:Show()
    elseif strsub(hb_lVars["PresetColourCaller"],1,24) == "HealBot_Options_Override" then
        if hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColClassDeathKnightPresetColour" then
            HealBot_ColourObjWaiting="OverrideClassDeathKnight"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColClassDemonHunterPresetColour" then
            HealBot_ColourObjWaiting="OverrideClassDemonHunter"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColClassDruidPresetColour" then
            HealBot_ColourObjWaiting="OverrideClassDruid"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColClassEvokerPresetColour" then
            HealBot_ColourObjWaiting="OverrideClassEvoker"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColClassHunterPresetColour" then
            HealBot_ColourObjWaiting="OverrideClassHunter"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColClassMagePresetColour" then
            HealBot_ColourObjWaiting="OverrideClassMage"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColClassMonkPresetColour" then
            HealBot_ColourObjWaiting="OverrideClassMonk"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColClassPaladinPresetColour" then
            HealBot_ColourObjWaiting="OverrideClassPaladin"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColClassPriestPresetColour" then
            HealBot_ColourObjWaiting="OverrideClassPriest"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColClassRoguePresetColour" then
            HealBot_ColourObjWaiting="OverrideClassRogue"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColClassShamanPresetColour" then
            HealBot_ColourObjWaiting="OverrideClassShaman"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColClassWarlockPresetColour" then
            HealBot_ColourObjWaiting="OverrideClassWarlock"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColClassWarriorPresetColour" then
            HealBot_ColourObjWaiting="OverrideClassWarrior"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideAdaptiveRecentHealsPresetColour" then
            HealBot_ColourObjWaiting="OverrideAdaptiveRecentHeals"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideAdaptiveThreatPresetColour" then
            HealBot_ColourObjWaiting="OverrideAdaptiveThreat"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideAdaptiveAggroPresetColour" then
            HealBot_ColourObjWaiting="OverrideAdaptiveAggro"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideAdaptiveHighlightPresetColour" then
            HealBot_ColourObjWaiting="OverrideAdaptiveHighlight"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideAdaptiveTargetPresetColour" then
            HealBot_ColourObjWaiting="OverrideAdaptiveTarget"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideAdaptiveOORPresetColour" then
            HealBot_ColourObjWaiting="OverrideAdaptiveOOR"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideAdaptiveOverhealsPresetColour" then
            HealBot_ColourObjWaiting="OverrideAdaptiveOverheals"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideAdaptiveAbsorbsPresetColour" then
            HealBot_ColourObjWaiting="OverrideAdaptiveAbsorbs"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColRoleTankPresetColour" then
            HealBot_ColourObjWaiting="OverrideRoleTank"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColRoleHealPresetColour" then
            HealBot_ColourObjWaiting="OverrideRoleHeal"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColRoleDPSPresetColour" then
            HealBot_ColourObjWaiting="OverrideRoleDPS"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColPowerAstralPresetColour" then
            HealBot_ColourObjWaiting="OverridePowerAstral"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColPowerEnergyPresetColour" then
            HealBot_ColourObjWaiting="OverridePowerEnergy"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColPowerFocusPresetColour" then
            HealBot_ColourObjWaiting="OverridePowerFocus"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColPowerFuryPresetColour" then
            HealBot_ColourObjWaiting="OverridePowerFury"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColPowerManaPresetColour" then
            HealBot_ColourObjWaiting="OverridePowerMana"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColPowerRagePresetColour" then
            HealBot_ColourObjWaiting="OverridePowerRage"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_OverrideColPowerRunicPresetColour" then
            HealBot_ColourObjWaiting="OverridePowerRunic"
        end
        HealBot_Options_PresetColours:Hide()
        HealBot_Options_Panel10:Show()
    elseif strsub(hb_lVars["PresetColourCaller"],1,20) == "HealBot_Options_Skin" then
        if strsub(hb_lVars["PresetColourCaller"],1,28) == "HealBot_Options_SkinAdaptive" then
            if hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinAdaptiveRecentHealsPresetColour" then
                HealBot_ColourObjWaiting="SkinAdaptiveRecentHeals"
            elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinAdaptiveThreatPresetColour" then
                HealBot_ColourObjWaiting="SkinAdaptiveThreat"
            elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinAdaptiveAggroPresetColour" then
                HealBot_ColourObjWaiting="SkinAdaptiveAggro"
            elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinAdaptiveHighlightPresetColour" then
                HealBot_ColourObjWaiting="SkinAdaptiveHighlight"
            elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinAdaptiveTargetPresetColour" then
                HealBot_ColourObjWaiting="SkinAdaptiveTarget"
            elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinAdaptiveOORPresetColour" then
                HealBot_ColourObjWaiting="SkinAdaptiveOOR"
            elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinAdaptiveOverhealsPresetColour" then
                HealBot_ColourObjWaiting="SkinAdaptiveOverheals"
            elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinAdaptiveAbsorbsPresetColour" then
                HealBot_ColourObjWaiting="SkinAdaptiveAbsorbs"
            end
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinBarHealthyPresetColour" then
            if hb_lVars["BarCustomColoursCaller"] == "Health" then
                HealBot_ColourObjWaiting="CustomBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "Back" then
                HealBot_ColourObjWaiting="CustomBackBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "InHeal" then
                HealBot_ColourObjWaiting="CustomIHBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "Absorb" then
                HealBot_ColourObjWaiting="CustomAbsorbBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "Border" then
                HealBot_ColourObjWaiting="CustomBorderBar"
            end
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinBarInjuredPresetColour" then
            if hb_lVars["BarCustomColoursCaller"] == "Health" then
                HealBot_ColourObjWaiting="CustomInjuredBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "Back" then
                HealBot_ColourObjWaiting="CustomBackInjuredBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "InHeal" then
                HealBot_ColourObjWaiting="CustomIHInjuredBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "Absorb" then
                HealBot_ColourObjWaiting="CustomAbsorbInjuredBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "Border" then
                HealBot_ColourObjWaiting="CustomBorderInjuredBar"
            end
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinBarCriticalPresetColour" then
            if hb_lVars["BarCustomColoursCaller"] == "Health" then
                HealBot_ColourObjWaiting="CustomCriticalBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "Back" then
                HealBot_ColourObjWaiting="CustomBackCriticalBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "InHeal" then
                HealBot_ColourObjWaiting="CustomIHCriticalBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "Absorb" then
                HealBot_ColourObjWaiting="CustomAbsorbCriticalBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "Border" then
                HealBot_ColourObjWaiting="CustomBorderCriticalBar"
            end
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinBarHealthyPresetColourEnemy" then
            if hb_lVars["BarCustomColoursCaller"] == "Health" then
                HealBot_ColourObjWaiting="CustomEnemyBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "Back" then
                HealBot_ColourObjWaiting="CustomBackEnemyBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "InHeal" then
                HealBot_ColourObjWaiting="CustomIHEnemyBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "Absorb" then
                HealBot_ColourObjWaiting="CustomAbsorbEnemyBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "Border" then
                HealBot_ColourObjWaiting="CustomBorderEnemyBar"
            end
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinBarInjuredPresetColourEnemy" then
            if hb_lVars["BarCustomColoursCaller"] == "Health" then
                HealBot_ColourObjWaiting="CustomInjuredEnemyBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "Back" then
                HealBot_ColourObjWaiting="CustomBackInjuredEnemyBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "InHeal" then
                HealBot_ColourObjWaiting="CustomIHInjuredEnemyBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "Absorb" then
                HealBot_ColourObjWaiting="CustomAbsorbInjuredEnemyBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "Border" then
                HealBot_ColourObjWaiting="CustomBorderInjuredEnemyBar"
            end
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinBarCriticalPresetColourEnemy" then
            if hb_lVars["BarCustomColoursCaller"] == "Health" then
                HealBot_ColourObjWaiting="CustomCriticalEnemyBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "Back" then
                HealBot_ColourObjWaiting="CustomBackCriticalEnemyBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "InHeal" then
                HealBot_ColourObjWaiting="CustomIHCriticalEnemyBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "Absorb" then
                HealBot_ColourObjWaiting="CustomAbsorbCriticalEnemyBar"
            elseif hb_lVars["BarCustomColoursCaller"] == "Border" then
                HealBot_ColourObjWaiting="CustomBorderCriticalEnemyBar"
            end
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinTextHealthyPresetColour" then
            if hb_lVars["TextCustomColoursCaller"] == "Name" then
                HealBot_ColourObjWaiting="CustomNameText"
            elseif hb_lVars["TextCustomColoursCaller"] == "Health" then
                HealBot_ColourObjWaiting="CustomHealthText"
            elseif hb_lVars["TextCustomColoursCaller"] == "State" then
                HealBot_ColourObjWaiting="CustomStateText"
            end
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinTextInjuredPresetColour" then
            if hb_lVars["TextCustomColoursCaller"] == "Name" then
                HealBot_ColourObjWaiting="CustomNameInjuredText"
            elseif hb_lVars["TextCustomColoursCaller"] == "Health" then
                HealBot_ColourObjWaiting="CustomHealthInjuredText"
            elseif hb_lVars["TextCustomColoursCaller"] == "State" then
                HealBot_ColourObjWaiting="CustomStateInjuredText"
            end
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinTextCriticalPresetColour" then
            if hb_lVars["TextCustomColoursCaller"] == "Name" then
                HealBot_ColourObjWaiting="CustomNameCriticalText"
            elseif hb_lVars["TextCustomColoursCaller"] == "Health" then
                HealBot_ColourObjWaiting="CustomHealthCriticalText"
            elseif hb_lVars["TextCustomColoursCaller"] == "State" then
                HealBot_ColourObjWaiting="CustomStateCriticalText"
            end
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinTextHealthyPresetColourEnemy" then
            if hb_lVars["TextCustomColoursCaller"] == "Name" then
                HealBot_ColourObjWaiting="CustomNameEnemyText"
            elseif hb_lVars["TextCustomColoursCaller"] == "Health" then
                HealBot_ColourObjWaiting="CustomHealthEnemyText"
            elseif hb_lVars["TextCustomColoursCaller"] == "State" then
                HealBot_ColourObjWaiting="CustomStateEnemyText"
            end
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinTextInjuredPresetColourEnemy" then
            if hb_lVars["TextCustomColoursCaller"] == "Name" then
                HealBot_ColourObjWaiting="CustomNameInjuredEnemyText"
            elseif hb_lVars["TextCustomColoursCaller"] == "Health" then
                HealBot_ColourObjWaiting="CustomHealthInjuredEnemyText"
            elseif hb_lVars["TextCustomColoursCaller"] == "State" then
                HealBot_ColourObjWaiting="CustomStateInjuredEnemyText"
            end
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinTextCriticalPresetColourEnemy" then
            if hb_lVars["TextCustomColoursCaller"] == "Name" then
                HealBot_ColourObjWaiting="CustomNameCriticalEnemyText"
            elseif hb_lVars["TextCustomColoursCaller"] == "Health" then
                HealBot_ColourObjWaiting="CustomHealthCriticalEnemyText"
            elseif hb_lVars["TextCustomColoursCaller"] == "State" then
                HealBot_ColourObjWaiting="CustomStateCriticalEnemyText"
            end
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinStateDeadColPresetColour" then
            HealBot_ColourObjWaiting="DeadStateText"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColRoleTankPresetColour" then
            HealBot_ColourObjWaiting="RoleTank"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColRoleHealPresetColour" then
            HealBot_ColourObjWaiting="RoleHeal"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColRoleDPSPresetColour" then
            HealBot_ColourObjWaiting="RoleDPS"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColPowerAstralPresetColour" then
            HealBot_ColourObjWaiting="PowerAstral"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColPowerEnergyPresetColour" then
            HealBot_ColourObjWaiting="PowerEnergy"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColPowerFocusPresetColour" then
            HealBot_ColourObjWaiting="PowerFocus"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColPowerFuryPresetColour" then
            HealBot_ColourObjWaiting="PowerFury"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColPowerManaPresetColour" then
            HealBot_ColourObjWaiting="PowerMana"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColPowerRagePresetColour" then
            HealBot_ColourObjWaiting="PowerRage"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColPowerRunicPresetColour" then
            HealBot_ColourObjWaiting="PowerRunic"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColClassDeathKnightPresetColour" then
            HealBot_ColourObjWaiting="ClassDeathKnight"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColClassDemonHunterPresetColour" then
            HealBot_ColourObjWaiting="ClassDemonHunter"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColClassDruidPresetColour" then
            HealBot_ColourObjWaiting="ClassDruid"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColClassEvokerPresetColour" then
            HealBot_ColourObjWaiting="ClassEvoker"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColClassHunterPresetColour" then
            HealBot_ColourObjWaiting="ClassHunter"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColClassMagePresetColour" then
            HealBot_ColourObjWaiting="ClassMage"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColClassMonkPresetColour" then
            HealBot_ColourObjWaiting="ClassMonk"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColClassPaladinPresetColour" then
            HealBot_ColourObjWaiting="ClassPaladin"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColClassPriestPresetColour" then
            HealBot_ColourObjWaiting="ClassPriest"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColClassRoguePresetColour" then
            HealBot_ColourObjWaiting="ClassRogue"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColClassShamanPresetColour" then
            HealBot_ColourObjWaiting="ClassShaman"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColClassWarlockPresetColour" then
            HealBot_ColourObjWaiting="ClassWarlock"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinColClassWarriorPresetColour" then
            HealBot_ColourObjWaiting="ClassWarrior"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinDeadColPresetColour" then
            HealBot_ColourObjWaiting="DeadNameText"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinStateResColPresetColour" then
            HealBot_ColourObjWaiting="ResStateText"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinResColPresetColour" then
            HealBot_ColourObjWaiting="ResNameText"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinStateSummonColPresetColour" then
            HealBot_ColourObjWaiting="SummonStateText"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinSummonColPresetColour" then
            HealBot_ColourObjWaiting="SummonNameText"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinEmergCritPresetColour" then
            HealBot_ColourObjWaiting="CustomEmergCrit"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinEmergInjPresetColour" then
            HealBot_ColourObjWaiting="CustomEmergInj"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinEmergHealthyPresetColour" then
            HealBot_ColourObjWaiting="CustomEmergHealthy"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinBarExtraOverHealPresetColour" then
            HealBot_ColourObjWaiting="CustomOverHealText"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinBarExtraInHealPresetColour" then
            HealBot_ColourObjWaiting="CustomInHealText"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinBarExtraHealthPresetColour" then
            HealBot_ColourObjWaiting="CustomExtraHealthText"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinBarAggroTextPresetColour" then
            HealBot_ColourObjWaiting="CustomAggroText"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinBarAuxTextPresetColour" then
            HealBot_ColourObjWaiting="CustomAuxText"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinBarAuxBarPresetColour" then
            HealBot_ColourObjWaiting="CustomAuxBar"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinHeaderBarPresetColour" then
            HealBot_ColourObjWaiting="HeadB"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinHeaderTextPresetColour" then
            HealBot_ColourObjWaiting="HeadT"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinActionIconsGlowPresetColour" then
            HealBot_ColourObjWaiting="ActionIconsAlertGlow"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinActionIconsCDTextPresetColour" then
            HealBot_ColourObjWaiting="ActionIconsCDText"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinActionIconsCountTextPresetColour" then
            HealBot_ColourObjWaiting="ActionIconsCountText"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinFrameAliasTextPresetColour" then
            HealBot_ColourObjWaiting="AliasT"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinFrameAliasPresetColour" then
            HealBot_ColourObjWaiting="Alias"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinFrameBackPresetColour" then
            HealBot_ColourObjWaiting="Back"
        elseif hb_lVars["PresetColourCaller"] == "HealBot_Options_SkinFrameBorderPresetColour" then
            HealBot_ColourObjWaiting="Bor"
        end
        HealBot_Options_PresetColours:Hide()
        HealBot_Options_Panel3:Show()
    end
    if not cancel then
        HealBot_Returned_Colours(HealBot_Globals.PresetColours[id].R, HealBot_Globals.PresetColours[id].G,
                                 HealBot_Globals.PresetColours[id].B, HealBot_Globals.PresetColours[id].A, true)
    end
end

hb_lVars["prevR"]=nil
hb_lVars["prevG"]=nil
hb_lVars["prevB"]=nil
hb_lVars["prevA"]=nil
function HealBot_UseColourPick(R, G, B, A)
      --HealBot_setCall("HealBot_UseColourPick")
    if not R then R=1 end
    if not G then G=1 end
    if not B then B=1 end
    hb_lVars["prevR"], hb_lVars["prevG"], hb_lVars["prevB"], hb_lVars["prevA"]=R, G, B, A;
    if ColorPickerFrame:IsVisible() then
        ColorPickerFrame:Hide();
    elseif A then
        ColorPickerFrame.hasOpacity=true;
        if HEALBOT_GAME_VERSION<10 then
            --if HEALBOT_GAME_VERSION == 3 then
            --    ColorPickerFrame.func=function() local lR,lG,lB=ColorPickerFrame:GetColorRGB(); local lA=OpacitySliderFrame:GetValue(); HealBot_Returned_Colours(lR,lG,lB,lA); end;
            --else
                ColorPickerFrame.swatchFunc=function() local lR,lG,lB=ColorPickerFrame:GetColorRGB(); local lA=OpacitySliderFrame:GetValue(); HealBot_Returned_Colours(lR,lG,lB,lA); end;
            --end
            ColorPickerFrame.opacityFunc=function() local lR,lG,lB=ColorPickerFrame:GetColorRGB(); local lA=OpacitySliderFrame:GetValue(); HealBot_Returned_Colours(lR,lG,lB,lA); end;
            ColorPickerFrame.cancelFunc=function() HealBot_Returned_Colours(hb_lVars["prevR"], hb_lVars["prevG"], hb_lVars["prevB"], 1-hb_lVars["prevA"]); end;
            ColorPickerFrame:SetColorRGB(R, G, B);
            ColorPickerFrame.opacity=1-A;
            OpacitySliderFrame:SetValue(1-A);
        else
            ColorPickerFrame.swatchFunc=function() local lR,lG,lB=ColorPickerFrame.Content.ColorPicker:GetColorRGB(); local lA=ColorPickerFrame:GetColorAlpha(); HealBot_Returned_Colours(lR,lG,lB,lA); end;
            ColorPickerFrame.opacityFunc=function() local lR,lG,lB=ColorPickerFrame.Content.ColorPicker:GetColorRGB(); local lA=ColorPickerFrame:GetColorAlpha(); HealBot_Returned_Colours(lR,lG,lB,lA); end;
            ColorPickerFrame.cancelFunc=function() HealBot_Returned_Colours(hb_lVars["prevR"], hb_lVars["prevG"], hb_lVars["prevB"], hb_lVars["prevA"]); end;
            ColorPickerFrame.Content.ColorPicker:SetColorRGB(R, G, B);
            ColorPickerFrame.opacity=A;
        end
        ColorPickerFrame:ClearAllPoints();
        ColorPickerFrame:SetPoint("TOPLEFT","HealBot_Options","TOPRIGHT",0,-152);
        ColorPickerFrame:Show();
    else
        ColorPickerFrame.hasOpacity=false;
        if HEALBOT_GAME_VERSION<10 then
            --if HEALBOT_GAME_VERSION == 3 then
            --    ColorPickerFrame.func=function() HealBot_Returned_Colours(ColorPickerFrame:GetColorRGB()); end;
            --else
                ColorPickerFrame.swatchFunc=function() HealBot_Returned_Colours(ColorPickerFrame:GetColorRGB()); end;
            --end
            ColorPickerFrame:SetColorRGB(R, G, B);
        else
            ColorPickerFrame.swatchFunc=function() HealBot_Returned_Colours(ColorPickerFrame.Content.ColorPicker:GetColorRGB()); end;
            ColorPickerFrame.Content.ColorPicker:SetColorRGB(R, G, B);
        end
        ColorPickerFrame.cancelFunc=function() HealBot_Returned_Colours(hb_lVars["prevR"], hb_lVars["prevG"], hb_lVars["prevB"]); end; --added by Diacono
        ColorPickerFrame:ClearAllPoints();
        ColorPickerFrame:SetPoint("TOPLEFT","HealBot_Options","TOPRIGHT",0,-152);
        ColorPickerFrame:Show();
    end
    if HEALBOT_GAME_VERSION<10 then
        return ColorPickerFrame:GetColorRGB();
    else
        return ColorPickerFrame.Content.ColorPicker:GetColorRGB();
    end
end

function HealBot_Options_ColoursAdaptivePluginButton_OnClick()
      --HealBot_setCall("HealBot_Options_ColoursAdaptivePluginButton_OnClick")
    if hb_lVars["curPlugin"]<9 or hb_lVars["curPlugin"]>12 then
        hb_lVars["curPlugin"]=10
    end
    HealBot_Options_ShowTab("Plugins")
end

local DefaultAdaptiveCol={["RecentHeals"]={R=0.1,G=1,B=0.2},["Threat"]={R=1,G=0.49,B=0.04},
                          ["Aggro"]={R=1,G=0,B=0},["Highlight"]={R=0.4,G=1,B=1},
                          ["Target"]={R=1,G=0.9,B=0.2},["OOR"]={R=0,G=0,B=0},
                          ["Overheals"]={R=1,G=0.2,B=0.2},["Absorbs"]={R=1,G=1,B=1}}
function HealBot_Options_AdaptiveResetColour_OnClick(aType, override)
      --HealBot_setCall("HealBot_Options_AdaptiveResetColour_OnClick")
    if override then
        HealBot_Globals.OverrideAdaptiveCol[aType].R=DefaultAdaptiveCol[aType].R
        HealBot_Globals.OverrideAdaptiveCol[aType].G=DefaultAdaptiveCol[aType].G
        HealBot_Globals.OverrideAdaptiveCol[aType].B=DefaultAdaptiveCol[aType].B
    else
        HealBot_Skins_NilColVar("AdaptiveCol", aType, "R")
        HealBot_Skins_NilColVar("AdaptiveCol", aType, "G")
        HealBot_Skins_NilColVar("AdaptiveCol", aType, "B")
    end
    HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
end

function HealBot_SetCustomBuffBarColours()
      --HealBot_setCall("HealBot_SetCustomBuffBarColours")
    local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"])
    if sId and HealBot_Globals.CustomBuffBarColour[sId] then
        HealBot_BuffCustomColorpick:SetStatusBarColor(HealBot_Globals.CustomBuffBarColour[sId].R or 0.25,
                                                 HealBot_Globals.CustomBuffBarColour[sId].G or 0.58,
                                                 HealBot_Globals.CustomBuffBarColour[sId].B or 0.8,
                                                 hbv_Skins_GetFrameVar("BarCol", "HA", hb_lVars["Frame"]));
    else
        HealBot_BuffCustomColorpick:SetStatusBarColor(HealBot_Globals.CustomBuffBarColour[customBuffPriority].R or 0.25,
                                                 HealBot_Globals.CustomBuffBarColour[customBuffPriority].G or 0.58,
                                                 HealBot_Globals.CustomBuffBarColour[customBuffPriority].B or 0.8,
                                                 hbv_Skins_GetFrameVar("BarCol", "HA", hb_lVars["Frame"]));
    end
end

function HealBot_SetCDCBarColours()
      --HealBot_setCall("HealBot_SetCDCBarColours")
    HealBot_DiseaseColorpick:SetStatusBarColor(HealBot_Config_Cures.CDCBarColour[HEALBOT_DISEASE_en].R or 0.55,
                                               HealBot_Config_Cures.CDCBarColour[HEALBOT_DISEASE_en].G or 0.19,
                                               HealBot_Config_Cures.CDCBarColour[HEALBOT_DISEASE_en].B or 0.7,
                                               hbv_Skins_GetFrameVar("BarCol", "HA", hb_lVars["Frame"]));
    HealBot_MagicColorpick:SetStatusBarColor(HealBot_Config_Cures.CDCBarColour[HEALBOT_MAGIC_en].R or 0.26,
                                             HealBot_Config_Cures.CDCBarColour[HEALBOT_MAGIC_en].G or 0.33,
                                             HealBot_Config_Cures.CDCBarColour[HEALBOT_MAGIC_en].B or 0.83,
                                             hbv_Skins_GetFrameVar("BarCol", "HA", hb_lVars["Frame"]));
    HealBot_PoisonColorpick:SetStatusBarColor(HealBot_Config_Cures.CDCBarColour[HEALBOT_POISON_en].R or 0.12,
                                              HealBot_Config_Cures.CDCBarColour[HEALBOT_POISON_en].G or 0.46,
                                              HealBot_Config_Cures.CDCBarColour[HEALBOT_POISON_en].B or 0.24,
                                              hbv_Skins_GetFrameVar("BarCol", "HA", hb_lVars["Frame"]));
    HealBot_CurseColorpick:SetStatusBarColor(HealBot_Config_Cures.CDCBarColour[HEALBOT_CURSE_en].R or 0.83,
                                             HealBot_Config_Cures.CDCBarColour[HEALBOT_CURSE_en].G or 0.43,
                                             HealBot_Config_Cures.CDCBarColour[HEALBOT_CURSE_en].B or 0.09,
                                             hbv_Skins_GetFrameVar("BarCol", "HA", hb_lVars["Frame"]));
    HealBot_BleedColorpick:SetStatusBarColor(HealBot_Config_Cures.CDCBarColour[HEALBOT_BLEED_en].R or 0.58,
                                             HealBot_Config_Cures.CDCBarColour[HEALBOT_BLEED_en].G or 0.02,
                                             HealBot_Config_Cures.CDCBarColour[HEALBOT_BLEED_en].B or 0.02,
                                             hbv_Skins_GetFrameVar("BarCol", "HA", hb_lVars["Frame"]));
    if hb_lVars["CDebuffcustomSpellID"] and HealBot_Globals.CDCBarColour[hb_lVars["CDebuffcustomSpellID"]] then
        HealBot_CustomColorpick:SetStatusBarColor(HealBot_Globals.CDCBarColour[hb_lVars["CDebuffcustomSpellID"]].R or 0.45,
                                                 HealBot_Globals.CDCBarColour[hb_lVars["CDebuffcustomSpellID"]].G or 0,
                                                 HealBot_Globals.CDCBarColour[hb_lVars["CDebuffcustomSpellID"]].B or 0.26,
                                                 hbv_Skins_GetFrameVar("BarCol", "HA", hb_lVars["Frame"]));
    else
        HealBot_CustomColorpick:SetStatusBarColor(HealBot_Globals.CDCBarColour[customDebuffPriority].R or 0.45,
                                                 HealBot_Globals.CDCBarColour[customDebuffPriority].G or 0,
                                                 HealBot_Globals.CDCBarColour[customDebuffPriority].B or 0.26,
                                                 hbv_Skins_GetFrameVar("BarCol", "HA", hb_lVars["Frame"]));
    end
    HealBot_Timers_Set("AURA","CustomDebuffList")
end

function HealBot_SetBuffBarColours()
      --HealBot_setCall("HealBot_SetBuffBarColours")
    local buffbarcolrClass=HealBot_Config_Buffs.HealBotBuffColR
    local buffbarcolgClass=HealBot_Config_Buffs.HealBotBuffColG
    local buffbarcolbClass=HealBot_Config_Buffs.HealBotBuffColB

    for k=1,16 do
        local bar=_G["HealBot_Buff"..k.."Colour"]
        if bar then
            bar:SetStatusBarColor((buffbarcolrClass[k] or 1),
                                  (buffbarcolgClass[k] or 1),
                                  (buffbarcolbClass[k] or 1),
                                  hbv_Skins_GetFrameVar("BarCol", "HA", hb_lVars["Frame"]));
        end
    end
    HealBot_Timers_Set("AURA","BuffReset")
end
--------------------------------------------------------------------------------

function HealBot_Options_FrameAlias_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_FrameAlias_OnTextChanged")
    if hbv_Skins_GetFrameVar("FrameAlias", "ALIAS", hb_lVars["Frame"])~=self:GetText() then
        hbv_Skins_SetFrameVar(self:GetText(), "FrameAlias", "ALIAS", hb_lVars["Frame"])
        HealBot_Timers_InitExtraOptions()
    end
end

function HealBot_Options_CoordsSetPoint()
    HealBot_Action_setPoint(hb_lVars["Frame"], false, true)
    C_Timer.After(0.01, function() HealBot_Action_setPoint(hb_lVars["Frame"], true) end)
end

function HealBot_Options_CoordsX_OnTextChanged(x)
    HealBot_Options_CoordsX:SetText(x)
end

function HealBot_Options_CoordsX_OnEnterPressed(self)
      --HealBot_setCall("HealBot_Options_FrameAlias_OnTextChanged")
    local NewX=tonumber(self:GetText())
    if type(NewX) == "number" and hbv_Skins_GetFrameVar("Anchors", "RealX", hb_lVars["Frame"])~=NewX then
        hbv_Skins_SetFrameVar(NewX, "Anchors", "RealX", hb_lVars["Frame"])
        HealBot_Options_CoordsSetPoint()
    end
end

function HealBot_Options_CoordsY_OnTextChanged(y)
    HealBot_Options_CoordsY:SetText(y)
end

function HealBot_Options_Coords_OnTextChanged(x, y, frame)
    if hb_lVars["Frame"] == frame then
        HealBot_Options_CoordsX_OnTextChanged(x)
        HealBot_Options_CoordsY_OnTextChanged(y)
    end
end

function HealBot_Options_CoordsY_OnEnterPressed(self)
      --HealBot_setCall("HealBot_Options_FrameAlias_OnTextChanged")
    local NewY=tonumber(self:GetText())
    if type(NewY) == "number" and hbv_Skins_GetFrameVar("Anchors", "RealY", hb_lVars["Frame"])~=NewY then
        hbv_Skins_SetFrameVar(NewY, "Anchors", "RealY", hb_lVars["Frame"])
        HealBot_Options_CoordsSetPoint()
    end
end

function HealBot_Options_CoordsFixed_OnClick(self)
      --HealBot_setCall("HealBot_Options_CastNotifyResOnly_OnClick")
    hbv_Skins_SetFrameVar(self:GetChecked(), "Anchors", "RealFixed", hb_lVars["Frame"])
end

function HealBot_Options_FrameTitle_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_FrameTitle_OnTextChanged")
    hbv_Skins_SetFrameVar(self:GetText(), "FrameAlias", "NAME", hb_lVars["Frame"])
    if hbv_Skins_GetFrameBoolean("FrameAlias", "SHOW", hb_lVars["Frame"]) then
        HealBot_Timers_Set("SKINS","FrameAliases")
    end
end

function HealBot_Options_FrameAliasShow_OnClick(self)
      --HealBot_setCall("HealBot_Options_FrameAliasShow_OnClick")
    if hbv_Skins_GetFrameBoolean("FrameAlias", "SHOW", hb_lVars["Frame"])~=self:GetChecked() then
        hbv_Skins_SetFrameVar(self:GetChecked(), "FrameAlias", "SHOW", hb_lVars["Frame"])
        HealBot_Options_framesChanged(true)
        HealBot_Timers_Set("SKINS","FrameAliases")
    end
end

function HealBot_Options_KnownSpellCheckButtonNum(bNo)
      --HealBot_setCall("HealBot_Options_KnownSpellCheckButtonNum")
    if bNo == 2 then
        bNo=3
    elseif bNo == 3 then
        bNo=2
    end
    return bNo
end

function HealBot_SpellAutoButton_PrepAttribs()
      --HealBot_setCall("HealBot_SpellAutoButton_PrepAttribs")
    if hb_lVars["ActionBarsCombo"] == 1 then
        HealBot_Timers_Set("INIT","PrepSetEnabledAttribs")
    elseif hb_lVars["ActionBarsCombo"] == 2 then
        HealBot_Timers_Set("INIT","PrepSetEnemyAttribs")
    elseif hb_lVars["ActionBarsCombo"] == 3 then
        HealBot_Timers_Set("INIT","PrepSetEmergAttribs")
    end
end

function HealBot_SpellAutoButton_OnClick(self, autoType, autoButton)
      --HealBot_setCall("HealBot_SpellAutoButton_OnClick")
    if self:GetChecked() then
        HealBot_SpellAutoButton_Update(autoType, HealBot_Options_ComboButton_ModifierKey(HealBot_Options_ComboButtons_Modifier), hb_lVars["ActionBarsCombo"], autoButton, "true")
    else
        HealBot_SpellAutoButton_Update(autoType, HealBot_Options_ComboButton_ModifierKey(HealBot_Options_ComboButtons_Modifier), hb_lVars["ActionBarsCombo"], autoButton, "false")
    end
    HealBot_SpellAutoButton_PrepAttribs()
end

function HealBot_Options_KnownSpellCheckSetColour(self,sName,cType,incEmote)
      --HealBot_setCall("HealBot_Options_KnownSpellCheckSetColour")
    if HealBot_Spells_KnownByName(sName) then
        self:SetTextColor(1,1,1,1)
    elseif GetMacroIndexByName(sName)>0 then
        self:SetTextColor(0.2,1,0.5,1)
    elseif HealBot_IsKnownItem(sName) then
        self:SetTextColor(0.2,0.5,1,1)
    elseif HealBot_Action_SpellCmdCodes(cType, sName) then
        self:SetTextColor(1,1,0,1)
    elseif incEmote then
        local e,t=string.split("=", sName)
        if e and e == HEALBOT_EMOTE and t then
            self:SetTextColor(1,0.58,0,1)
        else
            self:SetTextColor(0.7,0.7,0.7,1)
        end
    else
        self:SetTextColor(0.7,0.7,0.7,1)
    end
end

function HealBot_Options_KnownSpellCheck(self, sName,cType,key,bNo)
      --HealBot_setCall("HealBot_Options_KnownSpellCheck")
    if self then
        if cType~="ICON" then
            HealBot_Options_KnownSpellCheckSetColour(self,sName,cType,true)
        elseif HealBot_Action_SpellCmdCodes(cType, sName) then
            self:SetTextColor(1,1,0,1)
        else
            self:SetTextColor(0.7,0.7,0.7,1)
        end
    end
end

function HealBot_Options_CheckBindsOnChange(newBind, index)
      --HealBot_setCall("HealBot_Options_CheckBindsOnChange")
    if newBind>1 then
        for x=1,20 do
            if x~=index and HealBot_SpellBinds_GetData(x) == newBind then
                HealBot_SpellBinds_SetData(1, x)
                if x>5 then
                    HealBot_Timers_Set("LAST","PluginInitBinds")
                else
                    HealBot_Timers_Set("LAST","InitBinds")
                end
            end
        end
    end
    HealBot_Timers_Set("INIT","PrepSetAllAttribs",true)
end

function HealBot_Options_DoSpellsOnTextChanged(self, cType, bNo, key, spellText)
      --HealBot_setCall("HealBot_Options_DoSpellsOnTextChanged")
    local mButton=HealBot_Options_ComboClass_Button(bNo)
    if not HealBot_Spells_KnownByName(spellText) then
        local uSpell=HealBot_Options_UpperFirstChar(spellText)
        if HealBot_Spells_KnownByName(uSpell) then
            spellText=uSpell
        end
    end
    local cSpell=HealBot_Action_GetSpell(cType, HealBot_Action_GetCombo(key, mButton)) or ""
    if cSpell ~= spellText then
        HealBot_Action_SetSpell(cType, HealBot_Action_GetCombo(key, mButton), spellText)
        HealBot_Timers_Set("OOC","SaveSpellsProfile",true)
    end
    HealBot_Options_ComboClass_SetIcon(bNo, cType, HealBot_Action_GetCombo(key, mButton))
    HealBot_Options_KnownSpellCheck(self, spellText,cType,key,HealBot_Options_KnownSpellCheckButtonNum(bNo))
end

function HealBot_Options_ActionIconsAlertOnlyIC_OnClick(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertOnlyIC_OnClick")
    if hbv_ActionIcons_GetBooleanData("inCombat", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=self:GetChecked() then
        hbv_ActionIcons_SetData(self:GetChecked(), "inCombat", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsAlertOnlyInGR_OnClick(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertOnlyInGR_OnClick")
    if hbv_ActionIcons_GetBooleanData("inGroup", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=self:GetChecked() then
        hbv_ActionIcons_SetData(self:GetChecked(), "inGroup", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsCDTextShow_OnClick(self)
      --HealBot_setCall("HealBot_Options_ActionIconsCDTextShow_OnClick")
    if self:GetChecked() then
        if hbv_ActionIcons_GetBoolean("HIDETEXT", hb_lVars["Frame"]) then
            hbv_ActionIcons_SetVars(false, "HIDETEXT", hb_lVars["Frame"])
            HealBot_ActionIcons_SelfCDTextUpdate(hb_lVars["Frame"])
        end
    else
        hbv_ActionIcons_SetVars(true, "HIDETEXT", hb_lVars["Frame"])
    end
end

function HealBot_Options_ActionIconsCountTextShow_OnClick(self)
      --HealBot_setCall("HealBot_Options_ActionIconsCountTextShow_OnClick")
    if self:GetChecked() then
        if hbv_ActionIcons_GetBoolean("HIDECOUNTTEXT", hb_lVars["Frame"]) then
            hbv_ActionIcons_SetVars(false, "HIDECOUNTTEXT", hb_lVars["Frame"])
            HealBot_ActionIcons_SelfCountTextUpdate(hb_lVars["Frame"])
        end
    elseif not hbv_ActionIcons_GetBoolean("HIDECOUNTTEXT", hb_lVars["Frame"]) then
        hbv_ActionIcons_SetVars(true, "HIDECOUNTTEXT", hb_lVars["Frame"])
        HealBot_ActionIcons_SelfCountTextUpdate(hb_lVars["Frame"])
    end
end

function HealBot_Options_ActionIconsAlertOnlyInInst_OnClick(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertOnlyInInst_OnClick")
    if hbv_ActionIcons_GetBooleanData("inInst", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=self:GetChecked() then
        hbv_ActionIcons_SetData(self:GetChecked(), "inInst", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsAlertBuffSelfCast_OnClick(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertBuffSelfCast_OnClick")
    if hbv_ActionIcons_GetBooleanData("AlertBuffSelf", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])~=self:GetChecked() then
        hbv_ActionIcons_SetData(self:GetChecked(), "AlertBuffSelf", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsSelfAlertBuffSelfCast_OnClick(self)
      --HealBot_setCall("HealBot_Options_ActionIconsSelfAlertBuffSelfCast_OnClick")
    if hbv_ActionIcons_GetBooleanData("SelfAlertBuffSelf", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=self:GetChecked() then
        hbv_ActionIcons_SetData(self:GetChecked(), "SelfAlertBuffSelf", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsAlertDebuffSelfCast_OnClick(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertDebuffSelfCast_OnClick")
    if hbv_ActionIcons_GetBooleanData("AlertDebuffSelf", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])~=self:GetChecked() then
        hbv_ActionIcons_SetData(self:GetChecked(), "AlertDebuffSelf", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsAlertBuffMinStacks_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertBuffMinStacks_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_ActionIcons_GetData("AlertBuffMinStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])~=val then
        hbv_ActionIcons_SetData(val, "AlertBuffMinStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsSelfAlertBuffMinStacks_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsSelfAlertBuffMinStacks_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_ActionIcons_GetData("SelfAlertBuffMinStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=val then
        hbv_ActionIcons_SetData(val, "SelfAlertBuffMinStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsAlertDebuffMinStacks_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertDebuffMinStacks_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_ActionIcons_GetData("AlertDebuffMinStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])~=val then
        hbv_ActionIcons_SetData(val, "AlertDebuffMinStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val);
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsAlertBuffMaxStacks_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertBuffMaxStacks_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_ActionIcons_GetData("AlertBuffMaxStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])~=val then
        hbv_ActionIcons_SetData(val, "AlertBuffMaxStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])
        local g=_G[self:GetName().."Text"]
        if val == 21 then
            g:SetText(self.text .. ": 99");
        else
            g:SetText(self.text .. ": " .. val);
        end
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsSelfAlertBuffMaxStacks_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsSelfAlertBuffMaxStacks_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_ActionIcons_GetData("SelfAlertBuffMaxStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=val then
        hbv_ActionIcons_SetData(val, "SelfAlertBuffMaxStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
        local g=_G[self:GetName().."Text"]
        if val == 21 then
            g:SetText(self.text .. ": 99");
        else
            g:SetText(self.text .. ": " .. val);
        end
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsAlertDebuffMaxStacks_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertDebuffMaxStacks_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_ActionIcons_GetData("AlertDebuffMaxStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])~=val then
        hbv_ActionIcons_SetData(val, "AlertDebuffMaxStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])
        local g=_G[self:GetName().."Text"]
        if val == 21 then
            g:SetText(self.text .. ": 99");
        else
            g:SetText(self.text .. ": " .. val);
        end
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsAlertHealth_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertHealth_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_ActionIcons_GetData("AlertHealth", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=val then
        hbv_ActionIcons_SetData(val, "AlertHealth", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val.."%");
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsAlertHealthAbove_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertHealthAbove_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_ActionIcons_GetData("AlertHealthAbove", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=val then
        hbv_ActionIcons_SetData(val, "AlertHealthAbove", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val.."%");
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsAlertMana_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertMana_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_ActionIcons_GetData("AlertMana", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=val then
        hbv_ActionIcons_SetData(val, "AlertMana", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val.."%");
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsAlertManaAbove_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertManaAbove_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_ActionIcons_GetData("AlertManaAbove", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=val then
        hbv_ActionIcons_SetData(val, "AlertManaAbove", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val.."%");
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsAlertGlowTimeout_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertGlowTimeout_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_ActionIcons_GetData("AlertGlowTimeout", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=val then
        hbv_ActionIcons_SetData(val, "AlertGlowTimeout", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. val.."s");
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsAlertAggro_OnValueChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertAggro_OnValueChanged")
    local val=floor(self:GetValue()+0.5)
    if val~=self:GetValue() then
        self:SetValue(val)
    elseif hbv_ActionIcons_GetData("AlertAggro", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=val then
        hbv_ActionIcons_SetData(val, "AlertAggro", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
        local g=_G[self:GetName().."Text"]
        g:SetText(self.text .. ": " .. HealBot_Options_Lists["AggroIndAlertLevel"][val]);
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsConfigAbilityTextUpdate(frame, id, text)
      --HealBot_setCall("HealBot_Options_ActionIconsConfigAbilityTextUpdate")
    if text and not hbv_ActionIcons_DataExists("Target", frame, id) then
        hbv_ActionIcons_SetData(HealBot_Options_Lists["ActionIconsTarget"][2], "Target", frame, id)
        if hbv_ActionIcons_DataExists("Target", frame, id) then
            UIDropDownMenu_SetText(HealBot_Options_ActionIconsTarget, hbv_ActionIcons_GetData("Target", frame, id))
        else
            UIDropDownMenu_SetText(HealBot_Options_ActionIconsTarget, HEALBOT_WORDS_UNSET)
        end
    end
    hbv_ActionIcons_SetData(text, "Ability", frame, id)
    if id == hb_lVars["ActionIconsID"] then HealBot_Options_ComboClass_SetIcon(9, nil, nil, text) end
    C_Timer.After(0.1, function() HealBot_ActionIcons_ValidateAbility(frame, id) end)
    HealBot_Options_FramesActionIconsSetLists(true)
end

local spellText,spellCode=nil,nil
function HealBot_Options_ActionIconsConfigAbilityTextChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsConfigAbilityTextChanged")
    spellText=strtrim(self:GetText())
    if not HealBot_Spells_KnownByName(spellText) then
        local uSpell=HealBot_Options_UpperFirstChar(spellText)
        if HealBot_Spells_KnownByName(uSpell) then
            spellText=uSpell
        end
    end
    HealBot_Options_KnownSpellCheckSetColour(self,spellText,"",false)
    spellCode=HealBot_ActionIcons_SetSpell(spellText)
    if spellCode then
        if hbv_ActionIcons_GetData("Ability", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=spellCode then
            HealBot_Options_ActionIconsConfigAbilityTextUpdate(hb_lVars["Frame"], hb_lVars["ActionIconsID"], spellCode)
        end
    elseif hbv_ActionIcons_DataExists("Ability", hb_lVars["Frame"], hb_lVars["ActionIconsID"]) then
        HealBot_Options_ActionIconsConfigAbilityTextUpdate(hb_lVars["Frame"], hb_lVars["ActionIconsID"], nil)
    end
end

local hbActionIconsBindRecheck={}
local bindOK,BindKey=nil,nil
function HealBot_Options_ActionIconsBindValid(frame, id)
      --HealBot_setCall("HealBot_Options_ActionIconsBindValid")
    if hbv_ActionIcons_DataExists("Bind", frame, id) then
        BindKey=hbv_ActionIcons_GetData("Bind", frame, id)
        healbotactioniconsbindtxt:SetText(BindKey)
    else
        BindKey=false
        healbotactioniconsbindtxt:SetText("")
    end
    if not HealBot_Data["UILOCK"] then
        if BindKey then
            bindOK=SetBindingClick(BindKey, HealBot_Options_ButtonHelpBindTestButton:GetName())
        else
            bindOK=false
        end
        if bindOK then
            hbv_ActionIcons_SetData(BindKey, "bKey", frame, id)
            healbotactioniconsbindtxt:SetTextColor(0.4,1,0.4)
            SetBinding(BindKey)
        else
            hbv_ActionIcons_NilData("bKey", frame, id)
            healbotactioniconsbindtxt:SetTextColor(1,0.4,0.4)
        end
    else
        if not hbActionIconsBindRecheck[frame..":"..id] then
            hbActionIconsBindRecheck[frame..":"..id]=true
            HealBot_Timers_Set("OOC","ActionIconsBindRecheck")
        end
        healbotactioniconsbindtxt:SetTextColor(0.94,0.94,0.25)
    end
end

function HealBot_Options_ActionIconsBindRecheck()
      --HealBot_setCall("HealBot_Options_ActionIconsBindRecheck")
    for fid,_ in pairs(hbActionIconsBindRecheck) do
        local frame,id=string.split(":", fid)
        frame=tonumber(frame)
        id=tonumber(id)
        HealBot_Options_ActionIconsBindValid(frame, id)
        C_Timer.After(0.1, function() HealBot_ActionIcons_ValidateAbility(frame, id) end)
        HealBot_Options_FramesActionIconsSetLists()
        hbActionIconsBindRecheck[fid]=nil
    end
end

function HealBot_Options_ActionIconsBindTextUpdate(frame, id, text)
      --HealBot_setCall("HealBot_Options_ActionIconsBindTextUpdate")
    if text and not hbv_ActionIcons_DataExists("Target", frame, id) then
        hbv_ActionIcons_SetData(HealBot_Options_Lists["ActionIconsTarget"][2], "Target", frame, id)
        if hbv_ActionIcons_DataExists("Target", frame, id) then
            UIDropDownMenu_SetText(HealBot_Options_ActionIconsTarget,hbv_ActionIcons_GetData("Target", frame, id))
        else
            UIDropDownMenu_SetText(HEALBOT_WORDS_UNSET)
        end
    end
    hbv_ActionIcons_SetData(text, "Bind", frame, id)
    HealBot_Options_ActionIconsBindValid(frame, id)
    if not HealBot_Data["UILOCK"] then
        C_Timer.After(0.1, function() HealBot_ActionIcons_ValidateAbility(frame, id) end)
    end
    HealBot_Options_FramesActionIconsSetLists(true)
end

function HealBot_Options_ActionIconsBindChanged(bind)
      --HealBot_setCall("HealBot_Options_ActionIconsBindChanged")
    if bind and string.len(bind)>0 then
        if hbv_ActionIcons_GetData("Bind", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=bind then
            HealBot_Options_ActionIconsBindTextUpdate(hb_lVars["Frame"], hb_lVars["ActionIconsID"], bind)
        end
    elseif hbv_ActionIcons_DataExists("Bind", hb_lVars["Frame"], hb_lVars["ActionIconsID"]) then
        HealBot_Options_ActionIconsBindTextUpdate(hb_lVars["Frame"], hb_lVars["ActionIconsID"], nil)
    end
end

function HealBot_Options_ActionIconsBind_KeyCapture(self, key)
      --HealBot_setCall("HealBot_Options_ActionIconsBind_KeyCapture")
    local modKeys={["LSHIFT"]=true,["RSHIFT"]=true,["LCTRL"]=true,["RCTRL"]=true,["LALT"]=true,["RALT"]=true}
    if key and not modKeys[key] then
        local hbModKeys=false
        if IsAltKeyDown() then
            hbModKeys="ALT"
        end
        if IsControlKeyDown() then
            if hbModKeys then
                hbModKeys=hbModKeys.."-CTRL"
            else
                hbModKeys="CTRL"
            end
        end
        if IsShiftKeyDown() then
            if hbModKeys then
                hbModKeys=hbModKeys.."-SHIFT"
            else
                hbModKeys="SHIFT"
            end
        end
        if hbModKeys then
            bind=hbModKeys.."-"..key
        else
            bind=key
        end
        HealBot_Options_ActionIconsBindChanged(bind)
        HealBot_Options_ActionIconsBind_Enable(false)
    end

end

function HealBot_Options_ActionIconsBind_Enable(enable)
      --HealBot_setCall("HealBot_Options_ActionIconsBind_Enable")
    if enable then
        HealBot_Options_ActionIconsBind:SetScript("OnKeyDown", HealBot_Options_ActionIconsBind_KeyCapture)
        hb_lVars["ActionIconsBinding"]=true
        HealBot_Options_ActionIconsBind:SetStatusBarColor(0.75,0.75,0.75)
    else
        HealBot_Options_ActionIconsBind:SetScript("OnKeyDown", nil)
        hb_lVars["ActionIconsBinding"]=false
        HealBot_Options_ActionIconsBind:SetStatusBarColor(0.25,0.25,0.25)
    end
end

function HealBot_Options_ActionIconsBind_End()
      --HealBot_setCall("HealBot_Options_ActionIconsBind_End")
    if hb_lVars["ActionIconsBinding"] then
        HealBot_Options_ActionIconsBind_Enable(false)
    end
end

function HealBot_Options_ActionIconsBind_OnClick(self, button)
      --HealBot_setCall("HealBot_Options_ActionIconsBind_OnClick")
    if button == "LeftButton" then
        if hb_lVars["ActionIconsBinding"] then
            HealBot_Options_ActionIconsBind_Enable(false)
        else
            HealBot_Options_ActionIconsBind_Enable(true)
        end
    elseif button == "RightButton" then
        HealBot_Options_ActionIconsBind_End()
        HealBot_Options_ActionIconsBindChanged()
    end
end

function HealBot_Options_ButtonHelpBindTestButton_OnClick(self)
      --HealBot_setCall("HealBot_Options_ButtonHelpBindTestButton_OnClick")
      -- This function has a purpose
    HealBot_AddDebug("Bind Test")
end

function HealBot_Options_ActionIconsAlertBuffnameChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertBuffnameChanged")
    spellText=strtrim(self:GetText())
    if hbv_ActionIcons_GetData("AlertBuff", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])~=spellText then
        if string.len(hbv_ActionIcons_GetData("AlertBuff", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))>0 then
            HealBot_ActionIcons_DeleteBuff(hb_lVars["Frame"], hb_lVars["ActionIconsID"], hbv_ActionIcons_GetData("AlertBuff", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]), hb_lVars["ActionIconsCondNo"])
        end
        hbv_ActionIcons_SetData(spellText, "AlertBuff", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])
        HealBot_ActionIcons_AddBuff(hb_lVars["Frame"], hb_lVars["ActionIconsID"], spellText, hb_lVars["ActionIconsCondNo"])
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsSelfAlertBuffnameChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsSelfAlertBuffnameChanged")
    spellText=strtrim(self:GetText())
    if hbv_ActionIcons_GetData("SelfAlertBuff", hb_lVars["Frame"], hb_lVars["ActionIconsID"])~=spellText then
        if string.len(hbv_ActionIcons_GetData("SelfAlertBuff", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))>0 then
            HealBot_ActionIcons_DeleteBuff(hb_lVars["Frame"], hb_lVars["ActionIconsID"], hbv_ActionIcons_GetData("SelfAlertBuff", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        end
        hbv_ActionIcons_SetData(spellText, "SelfAlertBuff", hb_lVars["Frame"], hb_lVars["ActionIconsID"])
        HealBot_ActionIcons_AddBuff(hb_lVars["Frame"], hb_lVars["ActionIconsID"], spellText)
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_ActionIconsAlertDebuffnameChanged(self)
      --HealBot_setCall("HealBot_Options_ActionIconsAlertDebuffnameChanged")
    spellText=strtrim(self:GetText())
    if hbv_ActionIcons_GetData("AlertDebuff", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])~=spellText then
        if string.len(hbv_ActionIcons_GetData("AlertDebuff", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))>0 then
            HealBot_ActionIcons_DeleteDebuff(hb_lVars["Frame"], hb_lVars["ActionIconsID"], hbv_ActionIcons_GetData("AlertDebuff", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]), hb_lVars["ActionIconsCondNo"])
        end
        hbv_ActionIcons_SetData(spellText, "AlertDebuff", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])
        HealBot_ActionIcons_AddDebuff(hb_lVars["Frame"], hb_lVars["ActionIconsID"], spellText, hb_lVars["ActionIconsCondNo"])
        HealBot_ActionIcons_CheckAlertChangeFrameId(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
    end
end

function HealBot_Options_SpellsOnTextChanged(self, bNo)
      --HealBot_setCall("HealBot_Options_SpellsOnTextChanged")
    local cType=HealBot_Options_GetComboType()
    if hb_lVars["ActionBarsCombo"] == 1 then
        HealBot_Timers_Set("INIT","PrepSetEnabledAttribs",true)
    elseif hb_lVars["ActionBarsCombo"] == 2 then
        HealBot_Timers_Set("INIT","PrepSetEnemyAttribs",true)
    elseif hb_lVars["ActionBarsCombo"] == 3 then
        HealBot_Timers_Set("INIT","PrepSetEmergAttribs",true)
    else
        HealBot_Action_ClearSpellCache("ICON")
    end
    local key=HealBot_Options_ComboButton_ModifierKey(HealBot_Options_ComboButtons_Modifier)
    spellText=strtrim(self:GetText())
    HealBot_Options_DoSpellsOnTextChanged(self, cType, bNo, key, spellText)
    if bNo == 1 then HealBot_Timers_Set("PLAYER","SetRangeSpells",true) end
end

function HealBot_Options_SpellsCheckTextValid()
      --HealBot_setCall("HealBot_Options_SpellsCheckTextValid")
    if hb_lVars["SpellsTabOpenWarnId"]>0 then
        local cType=HealBot_Options_GetComboType()
        local modifier=HealBot_Options_ComboButton_ModifierKey(HealBot_Options_ComboButtons_Modifier)
        local g,s
        for x=1,5 do
            s=HealBot_Action_GetSpell(cType, HealBot_Action_GetCombo(modifier, HealBot_Options_ComboClass_Button(x)))
            if s then
                g=_G["HealBot_Options_Button"..x]
                g:SetText("")
                g:SetText(s)
            end
        end
    end
end

function HealBot_Options_SetBuffExtraItemTextColour(object, item, incSpell)
      --HealBot_setCall("HealBot_Options_SetBuffExtraItemTextColour")
    if HealBot_IsKnownItem(item) then
        object:SetTextColor(0.2,0.5,1,1)
        return true
    elseif incSpell and HealBot_Spells_KnownByName(item) then
        object:SetTextColor(1,1,1,1)
        return true
    else
        object:SetTextColor(0.7,0.7,0.7,1)
        return false
    end
end

function HealBot_Options_BuffManaDrinkItemOnTextChanged(self)
      --HealBot_setCall("HealBot_Options_BuffManaDrinkItemOnTextChanged")
    if HealBot_Config_Buffs.ManaDrinkItem~=strtrim(self:GetText()) then
        local prevValid=false
        if HealBot_IsKnownItem(HealBot_Config_Buffs.ManaDrinkItem) then prevValid=true end
        HealBot_Config_Buffs.ManaDrinkItem=strtrim(self:GetText())
        if HealBot_Options_SetBuffExtraItemTextColour(self, HealBot_Config_Buffs.ManaDrinkItem) or prevValid then
            HealBot_Timers_Set("AURA","BuffReset")
        end
    end
end

function HealBot_Options_BuffBackupManaDrinkItemOnTextChanged(self)
      --HealBot_setCall("HealBot_Options_BuffBackupManaDrinkItemOnTextChanged")
    if HealBot_Config_Buffs.BackupManaDrinkItem~=strtrim(self:GetText()) then
        local prevValid=false
        if HealBot_IsKnownItem(HealBot_Config_Buffs.BackupManaDrinkItem) then prevValid=true end
        HealBot_Config_Buffs.BackupManaDrinkItem=strtrim(self:GetText())
        if HealBot_Options_SetBuffExtraItemTextColour(self, HealBot_Config_Buffs.BackupManaDrinkItem) or prevValid then
            HealBot_Timers_Set("AURA","BuffReset")
        end
    end
end

function HealBot_Options_BuffWellFedItemOnTextChanged(self)
      --HealBot_setCall("HealBot_Options_BuffWellFedItemOnTextChanged")
    if HealBot_Config_Buffs.WellFedItem~=strtrim(self:GetText()) then
        local prevValid=false
        if HealBot_IsKnownItem(HealBot_Config_Buffs.WellFedItem) then prevValid=true end
        HealBot_Config_Buffs.WellFedItem=strtrim(self:GetText())
        if HealBot_Options_SetBuffExtraItemTextColour(self, HealBot_Config_Buffs.WellFedItem) or prevValid then
            HealBot_Timers_Set("AURA","BuffReset")
        end
    end
end

function HealBot_Options_BuffBackupWellFedItemOnTextChanged(self)
      --HealBot_setCall("HealBot_Options_BuffBackupWellFedItemOnTextChanged")
    if HealBot_Config_Buffs.BackupWellFedItem~=strtrim(self:GetText()) then
        local prevValid=false
        if HealBot_IsKnownItem(HealBot_Config_Buffs.BackupWellFedItem) then prevValid=true end
        HealBot_Config_Buffs.BackupWellFedItem=strtrim(self:GetText())
        if HealBot_Options_SetBuffExtraItemTextColour(self, HealBot_Config_Buffs.BackupWellFedItem) or prevValid then
            HealBot_Timers_Set("AURA","BuffReset")
        end
    end
end

function HealBot_Options_BuffExtraBuffOnTextChanged(self, id)
      --HealBot_setCall("HealBot_Options_BuffExtraBuffOnTextChanged")
    if HealBot_Config_Buffs.CustomBuffName[id]~=strtrim(self:GetText()) then
        HealBot_Config_Buffs.CustomBuffName[id]=strtrim(self:GetText())
        HealBot_Timers_Set("AURA","BuffReset")
    end
    self:SetTextColor(0.7,1,0.7,0.95)
end

function HealBot_Options_SetBuffExtraItemText()
      --HealBot_setCall("HealBot_Options_SetBuffExtraItemText")
    g=_G["HealBot_Options_BuffExtraItem1"]
    HealBot_Options_SetBuffExtraItemTextColour(g, HealBot_Config_Buffs.CustomItemName[1], true)
    g=_G["HealBot_Options_BuffExtraItem2"]
    HealBot_Options_SetBuffExtraItemTextColour(g, HealBot_Config_Buffs.CustomItemName[2], true)
    g=_G["HealBot_Options_BuffExtraItem3"]
    HealBot_Options_SetBuffExtraItemTextColour(g, HealBot_Config_Buffs.CustomItemName[3], true)

    g=_G["HealBot_Options_BuffWellFedItem"]
    HealBot_Options_SetBuffExtraItemTextColour(g,HealBot_Config_Buffs.WellFedItem)
    g=_G["HealBot_Options_BuffBackupWellFedItem"]
    HealBot_Options_SetBuffExtraItemTextColour(g,HealBot_Config_Buffs.BackupWellFedItem)
    g=_G["HealBot_Options_BuffManaDrinkItem"]
    HealBot_Options_SetBuffExtraItemTextColour(g,HealBot_Config_Buffs.ManaDrinkItem)
    g=_G["HealBot_Options_BuffBackupManaDrinkItem"]
    HealBot_Options_SetBuffExtraItemTextColour(g,HealBot_Config_Buffs.BackupManaDrinkItem)
end

function HealBot_Options_BuffExtraItemOnTextChanged(self, id)
      --HealBot_setCall("HealBot_Options_BuffExtraItemOnTextChanged")
    if HealBot_Config_Buffs.CustomItemName[id]~=strtrim(self:GetText()) then
        local prevValid=false
        if HealBot_Config_Buffs.CustomItemName[id] and (HealBot_Spells_KnownByName(HealBot_Config_Buffs.CustomItemName[id]) or HealBot_IsKnownItem(HealBot_Config_Buffs.CustomItemName[id])) then prevValid=true end
        HealBot_Config_Buffs.CustomItemName[id]=strtrim(self:GetText())
        if HealBot_Options_SetBuffExtraItemTextColour(self, HealBot_Config_Buffs.CustomItemName[id], true) or prevValid then
            HealBot_Timers_Set("AURA","BuffReset")
        end
    end
end

function HealBot_Options_RoleTankTag_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_RoleTankTag_OnTextChanged")
    hbv_Skins_SetFrameVar(self:GetText(), "BarText", "ROLETANK", hb_lVars["Frame"])
    HealBot_Timers_Set("SKINS","TextUpdateNames",true)
end

function HealBot_Options_RoleHealerTag_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_RoleHealerTag_OnTextChanged")
    hbv_Skins_SetFrameVar(self:GetText(), "BarText", "ROLEHEAL", hb_lVars["Frame"])
    HealBot_Timers_Set("SKINS","TextUpdateNames",true)
end


function HealBot_Options_RoleDamagerTag_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_RoleDamagerTag_OnTextChanged")
    hbv_Skins_SetFrameVar(self:GetText(), "BarText", "ROLEDPS", hb_lVars["Frame"])
    HealBot_Timers_Set("SKINS","TextUpdateNames",true)
end

function HealBot_Options_DisconnectedTag_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_DisconnectedTag_OnTextChanged")
    hbv_Skins_SetFrameVar(self:GetText(), "BarText", "TAGDC", hb_lVars["Frame"])
    HealBot_Timers_Set("SKINS","TextSetTagInUse",true)
end

function HealBot_Options_UnitDeadTag_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_UnitDeadTag_OnTextChanged")
    hbv_Skins_SetFrameVar(self:GetText(), "BarText", "TAGRIP", hb_lVars["Frame"])
    HealBot_Timers_Set("SKINS","TextSetTagInUse",true)
end

function HealBot_Options_ResTag_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_ResTag_OnTextChanged")
    hbv_Skins_SetFrameVar(self:GetText(), "BarText", "TAGRES", hb_lVars["Frame"])
    HealBot_Timers_Set("SKINS","TextSetTagInUse",true)
end

function HealBot_Options_SummonsTag_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_SummonsTag_OnTextChanged")
    hbv_Skins_SetFrameVar(self:GetText(), "BarText", "TAGSUM", hb_lVars["Frame"])
    HealBot_Timers_Set("SKINS","TextSetTagInUse",true)
end

function HealBot_Options_GroupTag_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_GroupTag_OnTextChanged")
    hbv_Skins_SetFrameVar(self:GetText(), "BarText", "TAGGROUP", hb_lVars["Frame"])
    HealBot_Timers_Set("SKINS","TextSetTagInUse",true)
end

function HealBot_Options_DebuffTag_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_DebuffTag_OnTextChanged")
    hbv_Skins_SetFrameVar(self:GetText(), "BarText", "TAGDEBUFF", hb_lVars["Frame"])
    HealBot_Timers_Set("SKINS","TextSetTagInUse",true)
end

function HealBot_Options_BuffTag_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_DebuffTag_OnTextChanged")
    hbv_Skins_SetFrameVar(self:GetText(), "BarText", "TAGBUFF", hb_lVars["Frame"])
    HealBot_Timers_Set("SKINS","TextSetTagInUse",true)
end

function HealBot_Options_OutOfRangeTag_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_OutOfRangeTag_OnTextChanged")
    hbv_Skins_SetFrameVar(self:GetText(), "BarText", "TAGOOR", hb_lVars["Frame"])
    HealBot_Timers_Set("SKINS","TextSetTagInUse",true)
end

function HealBot_Options_ReserverTag_OnTextChanged(self)
      --HealBot_setCall("HealBot_Options_ReserverTag_OnTextChanged")
    hbv_Skins_SetFrameVar(self:GetText(), "BarText", "TAGR", hb_lVars["Frame"])
    HealBot_Timers_Set("SKINS","TextSetTagInUse",true)
end

function HealBot_Options_EnableSmartCast_OnClick(self)
      --HealBot_setCall("HealBot_Options_EnableSmartCast_OnClick")
    HealBot_Globals.SmartCast=self:GetChecked()
end

function HealBot_Options_SmartCastDisspell_OnClick(self)
      --HealBot_setCall("HealBot_Options_SmartCastDisspell_OnClick")
    HealBot_Globals.SmartCastDebuff=self:GetChecked()
end

function HealBot_Options_SmartCastBuff_OnClick(self)
      --HealBot_setCall("HealBot_Options_SmartCastBuff_OnClick")
    HealBot_Globals.SmartCastBuff=self:GetChecked()
end

function HealBot_Options_SmartCastRes_OnClick(self)
      --HealBot_setCall("HealBot_Options_SmartCastRes_OnClick")
    HealBot_Globals.SmartCastRes=self:GetChecked()
end

--------------------------------------------------------------------------------
function HealBot_About_Copy_OnClick(self, titleText, copyText)
      --HealBot_setCall("HealBot_About_Copy_OnClick")
    StaticPopupDialogs["HEALBOT_OPTIONS_COPY"]={
		text=titleText,
		button1=CLOSE,
		hasEditBox=1,
		maxLetters=120,
		editBoxWidth=220,
		OnShow=function(self)
			self.editBox:SetText(copyText);
			self.editBox:SetFocus();
			self.editBox:HighlightText();
		end,
    }
    StaticPopup_Show ("HEALBOT_OPTIONS_COPY");
end

function HealBot_Options_ButtonResetSpells_OnClick(self)
      --HealBot_setCall("HealBot_Options_Defaults_OnClick")
    StaticPopupDialogs["HEALBOT_OPTIONS_RESETSPELLDEFAULTS"]={
        text=HEALBOT_OPTIONS_RESETSPELLSMSG,
        button1=HEALBOT_WORDS_YES,
        button2=HEALBOT_WORDS_NO,
        OnAccept=function()
            HealBot_Reset_Spells();
        end,
        timeout=0,
        whileDead=1,
        hideOnEscape=1
    };

    StaticPopup_Show ("HEALBOT_OPTIONS_RESETSPELLDEFAULTS");
end

function HealBot_Options_Defaults_OnClick(self, global)
      --HealBot_setCall("HealBot_Options_Defaults_OnClick")
    local popMsg=""
    if global then
        popMsg=HEALBOT_OPTIONS_SETDEFAULTSMSG
    else
        popMsg=HEALBOT_OPTIONS_SETLOCALDEFAULTSMSG
    end
    StaticPopupDialogs["HEALBOT_OPTIONS_SETDEFAULTS"]={
        text=popMsg,
        button1=HEALBOT_WORDS_YES,
        button2=HEALBOT_WORDS_NO,
        OnAccept=function()
            HealBot_Options_SetDefaults(global);
        end,
        timeout=0,
        whileDead=1,
        hideOnEscape=1
    };

    StaticPopup_Show ("HEALBOT_OPTIONS_SETDEFAULTS");
end

function HealBot_Options_Unused_OnClick()
    HealBot_Skins_DefaultUnusedFrames(Healbot_Config_Skins.Current_Skin)
    HealBot_Timers_Set("SKINS","ResetUpdate")
end

function HealBot_Options_ShowHide()
      --HealBot_setCall("HealBot_Options_ShowHide")
    --if not HealBot_Data["UILOCK"] then
        HealBot_TogglePanel(HealBot_Options, true)
    --else
    --    HealBot_Timers_Set("OOC","ToggleOptions")
    --end
end

function HealBot_Options_Reset_OnClick(self,mode)
      --HealBot_setCall("HealBot_Options_Reset_OnClick")
    HealBot_SetResetFlag(mode)
end

function HealBot_Options_SetDefaults(global)
      --HealBot_setCall("HealBot_Options_SetDefaults")
    HealBot_Globals.LastVersionSkinUpdate=HealBot_Global_InitVersion()
    HealBot_Config.SkinDefault={}
    if global then
        HealBot_Config=HealBot_Options_copyTable(HealBot_ConfigDefaults)
        HealBot_Globals=HealBot_Options_copyTable(HealBot_GlobalsDefaults)
        HealBot_Globals.FirstLoad=false
        HealBot_Config_Spells=HealBot_Options_copyTable(HealBot_Config_SpellsDefaults)
        HealBot_Config_Buffs=HealBot_Options_copyTable(HealBot_Config_BuffsDefaults)
        HealBot_Config_Cures=HealBot_Options_copyTable(HealBot_Config_CuresDefaults)
        HealBot_Config.CurrentSpec=1
        Healbot_Config_Skins.Current_Skin=HEALBOT_SKINS_STD
        Healbot_Config_Skins.Author[HEALBOT_SKINS_STD]=nil
        Healbot_Config_Skins.Author[HEALBOT_SORTBY_GROUP]=nil
        Healbot_Config_Skins.Author[HEALBOT_OPTIONS_RAID25]=nil
        Healbot_Config_Skins.Author[HEALBOT_OPTIONS_RAID40]=nil
        HealBot_Include_Skin(HEALBOT_SORTBY_GROUP, true)
        HealBot_Include_Skin(HEALBOT_OPTIONS_RAID25, true)
        HealBot_Include_Skin(HEALBOT_OPTIONS_RAID40, true)
        HealBot_Include_Skin(HEALBOT_SKINS_STD, false)
    else
        HealBot_Reset_Spells()
        HealBot_Reset_Cures()
        HealBot_Reset_Buffs()
    end
    HealBot_Update_Skins()
    HealBot_runDefaults()
    HealBot_Timers_Set("INIT","PrepSetAllAttribs")
    HealBot_Options:Hide()
    if hbv_Skins_GetVar("Chat", "NOTIFY")>1 then HealBot_Options_CastNotify_OnClick(nil,0); end
    DoneInitTab={}
    HealBot_Timers_InitExtraOptions()
    HealBot_Timers_Set("AURA","CheckPlayer")
    HealBot_Options_SetTheme("Defaults")
    HealBot_Timers_Set("PLAYER","SaveProfile")
    HealBot_Timers_Set("SKINS","ResetUpdate")
end

local function HealBot_Options_Content_MainPanel(panel)
    panel:SetBackdrop({
        bgFile="Interface\\Tooltips\\UI-Tooltip-Background",
        edgeFile="Interface\\Tooltips\\UI-Tooltip-Border",
        tile=true, tileSize=12, edgeSize=12,
        insets={ left=2, right=2, top=2, bottom=2, },
    })
    panel:SetBackdropColor(0,0,0,0.25+hb_lVars["OptionsOpacityAdj"]);
    panel:SetBackdropBorderColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                                 OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                                 OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                                 OptionThemes[HealBot_Globals.OptionsTheme]["A"])
end

local function HealBot_Options_Content_InnerPanel(panel, a)
    panel:SetBackdrop({
        bgFile="Interface\\Tooltips\\UI-Tooltip-Background",
        edgeFile="Interface\\Tooltips\\UI-Tooltip-Border",
        tile=true, tileSize=12, edgeSize=12,
        insets={ left=2, right=2, top=2, bottom=2, },
    })
    panel:SetBackdropColor(0,0,0,0);
    panel:SetBackdropBorderColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                                 OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                                 OptionThemes[HealBot_Globals.OptionsTheme]["B"],a)
end

local function HealBot_Options_Content_Colour(menu, menutxt, highlight)
    if highlight then
        if menu then menu:SetStatusBarColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                                            OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                                            OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                                            OptionThemes[HealBot_Globals.OptionsTheme]["A"]) end
        menutxt:SetTextColor(1,1,1,1)
    else
        if menu then menu:SetStatusBarColor(0.2,0.2,0.2,0) end
        menutxt:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                                 OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                                 OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                                 OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    end
end

local function HealBot_Options_InnerContent_Colour(menu, menutxt, highlight)
    if highlight then
        if menu then menu:SetStatusBarColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                                            OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                                            OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                                            OptionThemes[HealBot_Globals.OptionsTheme]["A"]) end
        menutxt:SetTextColor(1,1,1,1)
    else
        if menu then menu:SetStatusBarColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                                            OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                                            OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                                            0.5) end
        menutxt:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                                 OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                                 OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                                 0.8)
    end
end

function HealBot_Options_MainPanel()
    hb_lVars["OptionsOpacityAdj"]=(HealBot_Globals.OptionsOpacityAdj or 35)/100
    local panel=_G["HealBot_Options"]
    panel:SetBackdrop({
        bgFile="Interface\\DialogFrame\\UI-DialogBox-Background-Dark",
        edgeFile=OptionThemes[HealBot_Globals.OptionsTheme]["egdeFile"],
        tile=true, tileSize=0, edgeSize=OptionThemes[HealBot_Globals.OptionsTheme]["egdeSize"],
        insets={ left=2, right=2, top=2, bottom=2, },
    })
    panel:SetBackdropColor(0,0,0,0.25+hb_lVars["OptionsOpacityAdj"]);
    if not OptionThemes[HealBot_Globals.OptionsTheme]["Classic"] then
        panel:SetBackdropBorderColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                                     OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                                     OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                                     OptionThemes[HealBot_Globals.OptionsTheme]["A"])
        panel=_G["HealBot_Options_ModernTitleBox"]
        panel:Show()
        panel:SetStatusBarColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                                     OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                                     OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                                     OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    else
        panel=_G["HealBot_Options_ModernTitleBox"]
        panel:Hide()
    end
    HealBot_Options_Content_MainPanel(_G["HealBot_Options_Contents"])
    HealBot_Options_Content_MainPanel(_G["HealBot_Options_MainFrame"])
    panel=_G["HealBot_Options_TitleBox"]
    panel:SetTexture(OptionThemes[HealBot_Globals.OptionsTheme]["TitleBox"])
end

function HealBot_Options_SetTheme(caller)
    DoneInitTab={}
    HealBot_Options_MainPanel()
    if caller == "OnLoad" then
        HealBot_Options_Content_Colour(_G["HealBot_Contents_ButtonT0"], _G["HealBot_Contents_ButtonT0Txt"], true)
        HealBot_Options_Content_Colour(_G["HealBot_Contents_ButtonT1"], _G["HealBot_Contents_ButtonT1Txt"])
    elseif caller == "Theme" then
        HealBot_Options_Content_Colour(_G["HealBot_Contents_ButtonT0"], _G["HealBot_Contents_ButtonT0Txt"])
        HealBot_Options_Content_Colour(_G["HealBot_Contents_ButtonT1"], _G["HealBot_Contents_ButtonT1Txt"], true)
    else
        HealBot_Options_Content_Colour(_G["HealBot_Contents_ButtonT0"], _G["HealBot_Contents_ButtonT0Txt"])
        HealBot_Options_Content_Colour(_G["HealBot_Contents_ButtonT1"], _G["HealBot_Contents_ButtonT1Txt"])
    end
    HealBot_Options_Content_Colour(_G["HealBot_Contents_ButtonT10"], _G["HealBot_Contents_ButtonT10Txt"])
    HealBot_Options_Content_Colour(_G["HealBot_Contents_ButtonT2"], _G["HealBot_Contents_ButtonT2Txt"])
    HealBot_Options_Content_Colour(_G["HealBot_Contents_ButtonT3"], _G["HealBot_Contents_ButtonT3Txt"])
    HealBot_Options_Content_Colour(_G["HealBot_Contents_ButtonT3"], _G["HealBot_Contents_ButtonT3Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT301Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT303Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT304Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT305Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT307Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT308Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT309Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT310Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT311Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT312Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT314Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT315Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT316Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT317Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT313Txt"])
    HealBot_Options_Content_Colour(_G["HealBot_Contents_ButtonT4"], _G["HealBot_Contents_ButtonT4Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT41Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT42Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT43Txt"])
    HealBot_Options_Content_Colour(_G["HealBot_Contents_ButtonT5"], _G["HealBot_Contents_ButtonT5Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT51Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT52Txt"])
    HealBot_Options_Content_Colour(nil, _G["HealBot_Contents_ButtonT53Txt"])
    HealBot_Options_Content_Colour(_G["HealBot_Contents_ButtonT6"], _G["HealBot_Contents_ButtonT6Txt"])
    HealBot_Options_Content_Colour(_G["HealBot_Contents_ButtonT8"], _G["HealBot_Contents_ButtonT8Txt"])
    HealBot_Options_Content_Colour(_G["HealBot_Contents_ButtonT9"], _G["HealBot_Contents_ButtonT9Txt"])
    HealBot_Options_Content_Colour(_G["HealBot_Contents_ButtonT99"], _G["HealBot_Contents_ButtonT99Txt"])
    --HealBot_Contents_ButtonT99:Hide()
    HealBot_Options_Content_Colour(nil,_G["HealBot_Options_TitleBoxText"],true)
    HealBot_Options_Content_Colour(nil,_G["HealBot_Options_ModernTitleBoxTxt"],true)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_Panel0_1"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_Panel0_2"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_Panel0_3"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_GenFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EmergLFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_Override_EffectsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_OverrideHotBarsPanel"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_OverrideGroupBarsPanel"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_OverrideHealthDropPanel"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_OverrideFluidBarsPanel"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EffectsOverrideFocusGroups"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EffectsOverrideGlowSize"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EffectsOverrideBorderHazard"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_OverrideFlashEffectPanel"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_OverrideEffectBorder"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_OverrideEffectBars"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_Override_ColourFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_OverrideColoursClass"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_OverrideColoursRole"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_OverrideColoursPower"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_OverrideColoursAdaptive"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_Override_ChatFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_OverrideChatPanel"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_OverrideChatSkinsOOMFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_Override_FramesFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_OverrideFramesPanel"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_KeysFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SelectSpellsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_DisabledBarPanel"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_GeneralSkinsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_GeneralSkinsFrameBlizz"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_ActionIconsAlertFrame"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_ActionIconsAlertFilterButtons"], 0.4)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_HealGroupsSkinsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EffectsSkinsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EffectBorder"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EffectBars"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EnemySkinsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_ColourSkinsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsColoursClass"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsColoursRole"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsColoursPower"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsColoursAdaptive"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EnemySkinsFrameUnitTargets"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EnemySkinsFrameAura"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EnemySkinsFrameTargetOfTarget"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EnemySkinsFrameEnemyUnits"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EnemyAuraEnemyFrame"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EnemyToTEnemyFrame"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EnemyToTPlayerFrames"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EnemyAuraPlayerFrames"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_FluidBarsPanel"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_HealthDropPanel"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_HotBarsPanel"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_FlashEffectFocusGroups"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_GroupBarsPanel"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_FlashEffectPanel"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EffectsBorderHazard"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EffectsGlowSize"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_FramesCopyOptions"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_FramesCopyOptionsTabs"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_FramesCopyOptionsFrames"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_ChatSkinsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_ChatSkinsGeneralFrame"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_ChatSkinsOOMFrame"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_FramesSkinsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_HeadersSkinsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameHeadersBar"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameHeadersFrame"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_BarsSkinsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFramesBarsGeneral"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFramesBarsColours"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFramesBarsSort"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFramesBarsTabNotAvail"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFramesBarsColoursCustom"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFramesBarsColoursCustomFriend"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFramesBarsColoursCustomEnemy"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFramesTextColoursCustom"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFramesBarTextColoursCustomFriend"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFramesBarTextColoursCustomEnemy"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFramesEmergencyTabNotAvail"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFramesIndicatorsTabNotAvail"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFramesBarsVisibility"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFramesBarsAggro"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFramesBarsAux"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFramesBarsAuxAssign"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFramesBarsAuxConfig"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsActionIconsTextCD"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsActionIconsTextStacks"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_TextSkinsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameTextState"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameTextStateText"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameTextStateColour"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameTextName"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameTextNameText"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameTextNameColour"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameTextHealth"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameTextHealthText"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameTextHealthColour"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameTextAux"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameTextAuxText"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameTextAuxColour"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameTextAggro"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameTextAggroText"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameTextAggroColour"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameTextExtraOverHeal"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameTextExtraInHeal"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_IconsSkinsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameIconsDebuff"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameIconsBuff"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameIconsExtra"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameIconsDebuffGeneral"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameIconsDebuffText"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameIconsBuffGeneral"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameIconsBuffText"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameIconsExtraClass"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameIconsExtraRank"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameIconsExtraTarget"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameIconsExtraCombat"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameIconsExtraReadyCheck"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameIconsExtraOORArrow"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_ActionIconsSkinsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameActionIconsGeneral"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameActionIconsIcons"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameActionIconsText"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameActionIconsConfig"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SelectActionIconsFrame"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_IndicatorsSkinsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameIndicatorsAggro"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameIndicatorsLowMana"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameIndicatorsSelfCast"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameIndicatorsPower"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameEmergGeneral"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SkinsFrameEmergencyColour"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_EmergencyFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_CureDispelCleanse"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_CustomCureFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_NewCustomCureFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_NewCustomCureByName"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_NewCustomCureByHistory"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_NewCustomCureBySelf"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_NewCustomCureByFriend"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_NewCustomCureByEnemy"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_WarningCureFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_BuffsPanel"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_BuffsPanelTimers"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_BuffIconFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_NewCustomBuffsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_NewCustomBuffByName"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_NewCustomBuffBySelf"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_NewCustomBuffByHistory"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_NewCustomBuffByClass"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_NewCustomBuffByOther"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_WarningBuffFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_TipsGeneralFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_TipsTargetFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_TipsSpellsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_InOut_SkinFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_ShareExternalEditBoxFrame"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_BuffsPanelGeneralBuffs"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_BuffsPanelExtraBuffs"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_BuffsPanelExtraBuffsWeaponEnchants"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_BuffsPanelExtraBuffsWellFed"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_BuffsPanelExtraBuffsManaDrink"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_BuffsPanelExtraBuffsExtras"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_InOut_CDbuffsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_ShareCDebuffExternalEditBoxFrame"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_InOut_BuffsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_ShareBuffsExternalEditBoxFrame"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_InOut_SpellsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_ShareSpellsExternalEditBoxFrame"], 0.5)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_InOut_PresetColsFrame"], 0.7)
    HealBot_Options_Content_InnerPanel(_G["HealBot_Options_SharePresetColsExternalEditBoxFrame"], 0.5)

    HealBot_Options_Content_Colour(nil,_G["HealBot_About_AuthorH"],true)
    HealBot_Options_Content_Colour(nil,_G["HealBot_About_URLH"],true)
    HealBot_Options_Content_Colour(nil,_G["HealBot_About_CatH"],true)
    HealBot_Options_Content_Colour(nil,_G["HealBot_About_LocalH"],true)
    HealBot_Options_Content_Colour(nil,_G["HealBot_About_Desc1"],true)
    HealBot_Options_Content_Colour(nil,_G["HealBot_Options_SkinURL"],true)
    HealBot_Options_Content_Colour(nil,_G["HealBot_Options_CopyTabsCurrentFrame"],true)
    HealBot_Options_Content_Colour(nil,_G["HealBot_AuxBarsConfigAssign2_FontStr"],true)
    HealBot_Options_Content_Colour(nil,_G["HealBot_AuxTextConfigAssign1_FontStr2"],true)
    HealBot_Options_Content_Colour(nil,_G["HealBot_AuxTextConfigAssign2_FontStr2"],true)

    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_OverrideEffectb"],_G["HealBot_Options_OverrideEffectbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_OverrideColourb"],_G["HealBot_Options_OverrideColourbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_OverrideChatb"],_G["HealBot_Options_OverrideChatbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_Overrideframesb"],_G["HealBot_Options_OverrideframesbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentOverridePanelButton"]],
                                   _G[hb_lVars["CurrentOverridePanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_TipsGeneralb"],_G["HealBot_Options_TipsGeneralbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_TipsTargetb"],_G["HealBot_Options_TipsTargetbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_TipsSpellsb"],_G["HealBot_Options_TipsSpellsbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentTipsPanelButton"]],
                                   _G[hb_lVars["CurrentTipsPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_OverrideEffectBorderb"],_G["HealBot_Options_OverrideEffectBorderbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_OverrideEffectBarsb"],_G["HealBot_Options_OverrideEffectBarsbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentOverrideEffectsPanelButton"]],
                                        _G[hb_lVars["CurrentOverrideEffectsPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_EffectBorderb"],_G["HealBot_Options_EffectBorderbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_EffectBarsb"],_G["HealBot_Options_EffectBarsbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentEffectsPanelButton"]],
                                        _G[hb_lVars["CurrentEffectsPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_OverrideColoursClassb"],_G["HealBot_Options_OverrideColoursClassbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_OverrideColoursRoleb"],_G["HealBot_Options_OverrideColoursRolebTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_OverrideColoursPowerb"],_G["HealBot_Options_OverrideColoursPowerbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_OverrideColoursAdaptiveb"],_G["HealBot_Options_OverrideColoursAdaptivebTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentOverrideColourPanelButton"]],
                                        _G[hb_lVars["CurrentOverrideColourPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsColoursClassb"],_G["HealBot_Options_SkinsColoursClassbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsColoursRoleb"],_G["HealBot_Options_SkinsColoursRolebTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsColoursPowerb"],_G["HealBot_Options_SkinsColoursPowerbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsColoursAdaptiveb"],_G["HealBot_Options_SkinsColoursAdaptivebTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsColourPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsColourPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_EnemySkinsFrameEnemyUnitsb"],_G["HealBot_Options_EnemySkinsFrameEnemyUnitsbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_EnemySkinsFrameAurab"],_G["HealBot_Options_EnemySkinsFrameAurabTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_EnemySkinsFrameUnitTargetsb"],_G["HealBot_Options_EnemySkinsFrameUnitTargetsbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_EnemySkinsFrameTargetOfTargetb"],_G["HealBot_Options_EnemySkinsFrameTargetOfTargetbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsEnemyPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsEnemyPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameHeadersBarb"],_G["HealBot_Options_SkinsFrameHeadersBarbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameHeadersFrameb"],_G["HealBot_Options_SkinsFrameHeadersFramebTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsHeaderPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsHeaderPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFramesBarsGeneralb"],_G["HealBot_Options_SkinsFramesBarsGeneralbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFramesBarsColoursb"],_G["HealBot_Options_SkinsFramesBarsColoursbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFramesBarsSortb"],_G["HealBot_Options_SkinsFramesBarsSortbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFramesBarsVisibilityb"],_G["HealBot_Options_SkinsFramesBarsVisibilitybTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFramesBarsAggrob"],_G["HealBot_Options_SkinsFramesBarsAggrobTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFramesBarsAuxb"],_G["HealBot_Options_SkinsFramesBarsAuxbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsBarsPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsBarsPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFramesBarsAuxAssignb"],_G["HealBot_Options_SkinsFramesBarsAuxAssignbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFramesBarsAuxConfigb"],_G["HealBot_Options_SkinsFramesBarsAuxConfigbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsBarsAuxPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsBarsAuxPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameTextStateb"],_G["HealBot_Options_SkinsFrameTextStatebTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameTextNameb"],_G["HealBot_Options_SkinsFrameTextNamebTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameTextHealthb"],_G["HealBot_Options_SkinsFrameTextHealthbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameTextAuxb"],_G["HealBot_Options_SkinsFrameTextAuxbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameTextAggrob"],_G["HealBot_Options_SkinsFrameTextAggrobTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameTextNameTextb"],_G["HealBot_Options_SkinsFrameTextNameTextbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameTextAuxTextb"],_G["HealBot_Options_SkinsFrameTextAuxTextbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameTextAggroTextb"],_G["HealBot_Options_SkinsFrameTextAggroTextbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameTextExtraOverHealb"],_G["HealBot_Options_SkinsFrameTextExtraOverHealbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameTextExtraInHealb"],_G["HealBot_Options_SkinsFrameTextExtraInHealbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameTextNameColourb"],_G["HealBot_Options_SkinsFrameTextNameColourbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameTextStateColourb"],_G["HealBot_Options_SkinsFrameTextStateColourbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameTextStateTextb"],_G["HealBot_Options_SkinsFrameTextStateTextbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameTextAuxColourb"],_G["HealBot_Options_SkinsFrameTextAuxColourbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameTextAggroColourb"],_G["HealBot_Options_SkinsFrameTextAggroColourbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameTextHealthTextb"],_G["HealBot_Options_SkinsFrameTextHealthTextbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameTextHealthColourb"],_G["HealBot_Options_SkinsFrameTextHealthColourbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsTextPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsTextPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsTextStatePanelButton"]],
                                        _G[hb_lVars["CurrentSkinsTextStatePanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsTextNamePanelButton"]],
                                        _G[hb_lVars["CurrentSkinsTextNamePanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsTextHealthPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsTextHealthPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsTextAuxPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsTextAuxPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsTextAggroPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsTextAggroPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameIconsDebuffb"],_G["HealBot_Options_SkinsFrameIconsDebuffbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameIconsBuffb"],_G["HealBot_Options_SkinsFrameIconsBuffbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameIconsExtrab"],_G["HealBot_Options_SkinsFrameIconsExtrabTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsIconsPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsIconsPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameIconsDebuffGeneralb"],_G["HealBot_Options_SkinsFrameIconsDebuffGeneralbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameIconsDebuffTextb"],_G["HealBot_Options_SkinsFrameIconsDebuffTextbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsIconsDebuffPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsIconsDebuffPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameIconsBuffGeneralb"],_G["HealBot_Options_SkinsFrameIconsBuffGeneralbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameIconsBuffTextb"],_G["HealBot_Options_SkinsFrameIconsBuffTextbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsIconsBuffPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsIconsBuffPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameIconsExtraClassb"],_G["HealBot_Options_SkinsFrameIconsExtraClassbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameIconsExtraRankb"],_G["HealBot_Options_SkinsFrameIconsExtraRankbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameIconsExtraTargetb"],_G["HealBot_Options_SkinsFrameIconsExtraTargetbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameIconsExtraCombatb"],_G["HealBot_Options_SkinsFrameIconsExtraCombatbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameIconsExtraReadyCheckb"],_G["HealBot_Options_SkinsFrameIconsExtraReadyCheckbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameIconsExtraOORArrowb"],_G["HealBot_Options_SkinsFrameIconsExtraOORArrowbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsIconsExtraPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsIconsExtraPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameActionIconsGeneralb"],_G["HealBot_Options_SkinsFrameActionIconsGeneralbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameActionIconsIconsb"],_G["HealBot_Options_SkinsFrameActionIconsIconsbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameActionIconsTextb"],_G["HealBot_Options_SkinsFrameActionIconsTextbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsActionIconsPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsActionIconsPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameActionIconsCond1"],_G["HealBot_Options_SkinsFrameActionIconsCond1Txt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameActionIconsCond2"],_G["HealBot_Options_SkinsFrameActionIconsCond2Txt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameActionIconsCond3"],_G["HealBot_Options_SkinsFrameActionIconsCond3Txt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameActionIconsCond4"],_G["HealBot_Options_SkinsFrameActionIconsCond4Txt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameActionIconsCond"..hb_lVars["ActionIconsCondNo"]],
                                        _G["HealBot_Options_SkinsFrameActionIconsCond"..hb_lVars["ActionIconsCondNo"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsActionIconsTextCDb"],_G["HealBot_Options_SkinsActionIconsTextCDbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsActionIconsTextStacksb"],_G["HealBot_Options_SkinsActionIconsTextStacksbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsActionIconsTextPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsActionIconsTextPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameIndicatorsAggrob"],_G["HealBot_Options_SkinsFrameIndicatorsAggrobTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameIndicatorsLowManab"],_G["HealBot_Options_SkinsFrameIndicatorsLowManabTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameIndicatorsSelfCastb"],_G["HealBot_Options_SkinsFrameIndicatorsSelfCastbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameIndicatorsPowerb"],_G["HealBot_Options_SkinsFrameIndicatorsPowerbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsIndicatorsPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsIndicatorsPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameEmergGeneralb"],_G["HealBot_Options_SkinsFrameEmergGeneralbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameEmergencyColourb"],_G["HealBot_Options_SkinsFrameEmergencyColourbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsEmergencyPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsEmergencyPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_InOutSkinb"],_G["HealBot_Options_InOutSkinbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_InOutCustomDebuffb"],_G["HealBot_Options_InOutCustomDebuffbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_InOutCustomBuffb"],_G["HealBot_Options_InOutCustomBuffbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_InOutSpellsb"],_G["HealBot_Options_InOutSpellsbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_InOutPresetColoursb"],_G["HealBot_Options_InOutPresetColoursbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentInOutPanelButton"]],
                                        _G[hb_lVars["CurrentInOutPanelButton"].."Txt"],true)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_BuffsPanelGeneralBuffsb"],_G["HealBot_Options_BuffsPanelGeneralBuffsbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_BuffsPanelExtraBuffsb"],_G["HealBot_Options_BuffsPanelExtraBuffsbTxt"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentBuffsGeneralPanelButton"]],
                                        _G[hb_lVars["CurrentBuffsGeneralPanelButton"].."Txt"],true)

    HealBot_Options_CDCCastByCustom:Disable()
    HealBot_Options_CDCIDMethodCustom:Disable()
    HealBot_Options_CDCPriorityCustom:Disable()
    HealBot_Options_CDebuffFilterCustom:Disable()
    HealBot_Options_CDCColCustom:Disable()
    HealBot_Options_CDCIconGlowCustom:Disable()
    HealBot_Options_CDCIconSetCustom:Disable()
end

hb_lVars["TabNo"]=0;
hb_lVars["CurrentTab"]="About"
function HealBot_Options_OnShow(self)
      --HealBot_setCall("HealBot_Options_OnShow")
    if not hb_lVars["OptionsLoaded"] then
        hb_lVars["OptionsLoaded"]=true
        HealBot_Options_SetTheme("OnLoad")
    end
    if not hb_lVars["MediaIndexedOnOptions"] then
        hb_lVars["MediaIndexedOnOptions"]=true
        HealBot_Media_UpdateIndexes()
    end
    HealBot_Options_UpdateTab(hb_lVars["TabNo"])
    HealBot_Options_InitExtras()
end

function HealBot_Options_Close()
      --HealBot_setCall("HealBot_Options_Close")
    if hb_lVars["SkinsPanelCopyBackName"] then HealBot_Options_ShowSkinsPanel("BACK", 0) end
    if hb_lVars["SelectSpellsFrame"] then HealBot_Options_SpellsSelect_OnClick(nil,"Cancel") end
    --HealBot_Timers_Set("PLAYER","SaveProfile")
    HealBot_Options_FramesActionIconsLists()
    HealBot_Options_ActionIconsBind_End()
end

hb_lVars["hbrCode"]=""
function HealBot_Options_Lang(region, msgchat)
      --HealBot_setCall("HealBot_Options_Lang")
    if region~=hb_lVars["hbrCode"] then
        hb_lVars["hbrCode"]=region
        if region == "ptBR" then
            HealBot_Lang_ptBR()
            if hb_lVars["TIPLOADED"] then HealBot_Lang_Options_ptBR() end
            if msgchat then HealBot_AddChat("Switching Lang to ptBR") end
            hb_lVars["hbLangs"]=11
        elseif region == "zhCN" then
            HealBot_Lang_zhCN()
            if hb_lVars["TIPLOADED"] then HealBot_Lang_Options_zhCN() end
            if msgchat then HealBot_AddChat("Switching Lang to zhCN") end
            hb_lVars["hbLangs"]=1
        elseif region == "deDE" then
            HealBot_Lang_deDE()
            if hb_lVars["TIPLOADED"] then HealBot_Lang_Options_deDE() end
            if msgchat then HealBot_AddChat("Switching Lang to deDE") end
            hb_lVars["hbLangs"]=5
        elseif region == "esES" then
            HealBot_Lang_esES()
            if hb_lVars["TIPLOADED"] then HealBot_Lang_Options_esALL() end
            if msgchat then HealBot_AddChat("Switching Lang to esES") end
            hb_lVars["hbLangs"]=13
        elseif region == "esMX" then
            HealBot_Lang_esMX()
            if hb_lVars["TIPLOADED"] then HealBot_Lang_Options_esALL() end
            if msgchat then HealBot_AddChat("Switching Lang to esMX") end
            hb_lVars["hbLangs"]=10
        elseif region == "frFR" then
            HealBot_Lang_frFR()
            if hb_lVars["TIPLOADED"] then HealBot_Lang_Options_frFR() end
            if msgchat then HealBot_AddChat("Switching Lang to frFR") end
            hb_lVars["hbLangs"]=4
        elseif region == "huHU" then
            HealBot_Lang_huHU()
            if hb_lVars["TIPLOADED"] then HealBot_Lang_Options_huHU() end
            if msgchat then HealBot_AddChat("Switching Lang to huHU") end
            hb_lVars["hbLangs"]=7
        elseif region == "koKR" then
            HealBot_Lang_koKR()
            if hb_lVars["TIPLOADED"] then HealBot_Lang_Options_koKR() end
            if msgchat then HealBot_AddChat("Switching Lang to koKR") end
            hb_lVars["hbLangs"]=9
        elseif region == "ruRU" then
            HealBot_Lang_ruRU()
            if hb_lVars["TIPLOADED"] then HealBot_Lang_Options_ruRU() end
            if msgchat then HealBot_AddChat("Switching Lang to ruRU") end
            hb_lVars["hbLangs"]=12
        elseif region == "zhTW" then
            HealBot_Lang_zhTW()
            if hb_lVars["TIPLOADED"] then HealBot_Lang_Options_zhTW() end
            if msgchat then HealBot_AddChat("Switching Lang to zhTW") end
            hb_lVars["hbLangs"]=14
        elseif region == "itIT" then
            HealBot_Lang_itIT()
            if hb_lVars["TIPLOADED"] then HealBot_Lang_Options_itIT() end
            if msgchat then HealBot_AddChat("Switching Lang to itIT") end
            hb_lVars["hbLangs"]=9
        elseif region == "grGR" then
            HealBot_Lang_grGR()
            if hb_lVars["TIPLOADED"] then HealBot_Lang_Options_grGR() end
            if msgchat then HealBot_AddChat("Switching Lang to grGR") end
            hb_lVars["hbLangs"]=7
        elseif region == "enUK" then
            HealBot_Lang_enUK()
            if hb_lVars["TIPLOADED"] then HealBot_Lang_Options_enALL() end
            if msgchat then HealBot_AddChat("Switching Lang to enUK") end
            hb_lVars["hbLangs"]=2
        elseif region == "enUS" then
            HealBot_Lang_enUS()
            if hb_lVars["TIPLOADED"] then HealBot_Lang_Options_enALL() end
            if msgchat then HealBot_AddChat("Switching Lang to enUS") end
            hb_lVars["hbLangs"]=3
        else
            HealBot_AddChat("Invalid Region code "..region)
        end
        HealBot_HealGroupsTrans={ [HEALBOT_OPTIONS_SELFHEALS_en]=HEALBOT_OPTIONS_SELFHEALS,
                                  [HEALBOT_OPTIONS_TANKHEALS_en]=HEALBOT_OPTIONS_TANKHEALS,
                                  [HEALBOT_CLASSES_HEALERS_en]=HEALBOT_CLASSES_HEALERS,
                                  [HEALBOT_OPTIONS_GROUPHEALS_en]=HEALBOT_SORTBY_GROUP,
                                  [HEALBOT_OPTIONS_MYTARGET_en]=HEALBOT_OPTIONS_MYTARGET,
                                  [HEALBOT_FOCUS_en]=HEALBOT_WORD_FOCUS,
                                  [HEALBOT_OPTIONS_EMERGENCYHEALS_en]=HEALBOT_OPTIONS_EMERGENCYHEALS,
                                  [HEALBOT_OPTIONS_PETHEALS_en]=HEALBOT_OPTIONS_PETHEALS,
                                  [HEALBOT_VEHICLE_en]=HEALBOT_WORD_VEHICLE,
                                  [HEALBOT_OPTIONS_TARGETHEALS_en]=HEALBOT_OPTIONS_TARGETHEALS,
                                  [HEALBOT_OPTIONS_TARGETOFTARGET_en]=HEALBOT_OPTIONS_TAB_TARGETOFTARGET,
                                  [HEALBOT_OPTIONS_TARGETOFFOCUS_en]=HEALBOT_OPTIONS_TARGETOFFOCUS,
                                  [HEALBOT_OPTIONS_TARGETOFPRIVFOCUSTARGET_en]=HEALBOT_OPTIONS_TARGETOFPRIVFOCUSTAR,
                                  [HEALBOT_OPTIONS_PRIVFOCUS_en]=HEALBOT_OPTIONS_PRIVFOCUS,
                                  [HEALBOT_CUSTOM_CASTBY_ENEMY_en]=HEALBOT_CUSTOM_CASTBY_ENEMY,
                                }
        HealBot_Options_SetSkins()
        HealBot_Globals.localLang=region
        HealBot_Timers_Set("INIT","UpdateLang")
    end
    if msgchat then HealBot_Timers_Set("PLAYER","SpecUpdate") end
end
function HealBot_Options_UpdateLang()
    local g=_G["HealBot_Contents_ButtonT0Txt"]
    g:SetText(HEALBOT_HEALBOT)
    g=_G["HealBot_Contents_ButtonT1Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_GENERAL)
    g=_G["HealBot_Contents_ButtonT10Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_OVERRIDES)
    g=_G["HealBot_Contents_ButtonT2Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_SPELLS)
    g=_G["HealBot_Contents_ButtonT3Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_SKINS)
    g=_G["HealBot_Contents_ButtonT301Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_SKINS_GENERAL)
    g=_G["HealBot_Contents_ButtonT303Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_SKINS_EFFECTS)
    g=_G["HealBot_Contents_ButtonT304Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_SKINS_COLOUR)
    g=_G["HealBot_Contents_ButtonT305Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_SKINS_ENEMY)
    g=_G["HealBot_Contents_ButtonT307Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_SKINS_CHAT)
    g=_G["HealBot_Contents_ButtonT308Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_SKINS_FRAMES)
    g=_G["HealBot_Contents_ButtonT309Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_GENERAL)
    g=_G["HealBot_Contents_ButtonT310Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_SKINS_HEALGROUP)
    g=_G["HealBot_Contents_ButtonT311Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_SKINS_HEADERS)
    g=_G["HealBot_Contents_ButtonT312Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_SKINS_BARS)
    g=_G["HealBot_Contents_ButtonT313Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_SKINS_TEXT)
    g=_G["HealBot_Contents_ButtonT314Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_SKINS_ICONS)
    g=_G["HealBot_Contents_ButtonT4Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_CURE)
    g=_G["HealBot_Contents_ButtonT41Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_CURE_DEBUFF)
    g=_G["HealBot_Contents_ButtonT42Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_CURE_CUSTOM)
    g=_G["HealBot_Contents_ButtonT43Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_CURE_WARNING)
    g=_G["HealBot_Contents_ButtonT5Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_BUFFS)
    g=_G["HealBot_Contents_ButtonT51Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_BUFFS_GENERAL)
    g=_G["HealBot_Contents_ButtonT52Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_BUFFS_HOTS)
    g=_G["HealBot_Contents_ButtonT53Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_CURE_WARNING)
    g=_G["HealBot_Contents_ButtonT6Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_TIPS)
    g=_G["HealBot_Contents_ButtonT8Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_TEST)
    g=_G["HealBot_Contents_ButtonT9Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_INOUT)
    g=_G["HealBot_Contents_ButtonT99Txt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_PLUGINS)
    g=_G["HealBot_Options_InOutSkinbTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_SKIN)
    g=_G["HealBot_Options_InOutCustomDebuffbTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_CUSTOM_DEBUFFS)
    g=_G["HealBot_Options_InOutCustomBuffbTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_CUSTOM_BUFFS)
    g=_G["HealBot_Options_InOutSpellsbTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_SPELLS)
    g=_G["HealBot_Options_InOutPresetColoursbTxt"]
    g:SetText(HEALBOT_OPTIONS_CONTENT_INOUT_PRESETCOL)
    g=_G["HealBot_Options_CloseButton"]
    g:SetText(HEALBOT_OPTIONS_CLOSE)
    g=_G["HealBot_Options_Defaults"]
    g:SetText(HEALBOT_OPTIONS_DEFAULTS)
    g=_G["HealBot_Options_Reload"]
    g:SetText(HEALBOT_OPTIONS_HARDRESET)
    g=_G["HealBot_Options_Reset"]
    g:SetText(HEALBOT_OPTIONS_SOFTRESET)
    g=_G["HealBot_Options_TooltipPosSettings"]
    g:SetText(HEALBOT_OPTIONS_SETTOOLTIP_POSITION)
    g=_G["HealBot_Options_SkinsFrameIconsDebuffGeneralbTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_GENERAL)
    g=_G["HealBot_Options_SkinsFrameTextStatebTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_STATETEXT)
    g=_G["HealBot_Options_SkinsFrameTextNamebTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_NAMETEXT)
    g=_G["HealBot_Options_SkinsFrameTextHealthbTxt"]
    g:SetText(HEALBOT_WORD_HEALTH)
    g=_G["HealBot_Options_SkinsFrameTextAuxbTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_AUX)
    g=_G["HealBot_Options_SkinsFrameTextAggrobTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_AGGRO)
    g=_G["HealBot_Options_SkinsFrameTextExtraOverHealbTxt"]
    g:SetText(HEALBOT_WORD_OVERHEALS)
    g=_G["HealBot_Options_SkinsFrameTextExtraInHealbTxt"]
    g:SetText(HEALBOT_OPTIONS_INCHEAL)
    g=_G["HealBot_Options_SkinsFrameIconsDebuffTextbTxt"]
    g:SetText(HEALBOT_WORD_TEXT)
    g=_G["HealBot_Options_SkinsFramesBarsGeneralbTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_GENERAL)
    g=_G["HealBot_Options_SkinsFramesBarsColoursbTxt"]
    g:SetText(HEALBOT_WORD_COLOURS)
    g=_G["healbotaggroindcoltxt"]
    g:SetText(HEALBOT_WORD_COLOUR)
    g=_G["healbotaggroindanchortxt"]
    g:SetText(HEALBOT_OPTIONS_AUXBARANCHOR)
    g=_G["healbotlowmanaindcoltxt"]
    g:SetText(HEALBOT_WORD_COLOUR)
    g=_G["healbotlowmanaindanchortxt"]
    g:SetText(HEALBOT_OPTIONS_AUXBARANCHOR)
    g=_G["healbotpowerindcoltxt"]
    g:SetText(HEALBOT_WORD_COLOUR)
    g=_G["healbotpowerindanchortxt"]
    g:SetText(HEALBOT_OPTIONS_AUXBARANCHOR)
    g=_G["HealBot_Options_SkinsFrameTextStateTextbTxt"]
    g:SetText(HEALBOT_WORD_TEXT)
    g=_G["HealBot_Options_SkinsFrameTextNameTextbTxt"]
    g:SetText(HEALBOT_WORD_TEXT)
    g=_G["HealBot_Options_SkinsFrameTextHealthTextbTxt"]
    g:SetText(HEALBOT_WORD_TEXT)
    g=_G["HealBot_Options_SkinsFrameTextAuxTextbTxt"]
    g:SetText(HEALBOT_WORD_TEXT)
    g=_G["HealBot_Options_SkinsFrameTextAggroTextbTxt"]
    g:SetText(HEALBOT_WORD_TEXT)
    g=_G["HealBot_Options_OverrideEffectbTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_EFFECTS)
    g=_G["HealBot_Options_OverrideColourbTxt"]
    g:SetText(HEALBOT_WORD_COLOURS)
    g=_G["HealBot_Options_OverrideChatbTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_CHAT)
    g=_G["HealBot_Options_OverrideframesbTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_FRAMES)
    g=_G["HealBot_Options_SkinsFrameTextStateColourbTxt"]
    g:SetText(HEALBOT_WORD_COLOURS)
    g=_G["HealBot_Options_SkinsFrameTextNameColourbTxt"]
    g:SetText(HEALBOT_WORD_COLOURS)
    g=_G["HealBot_Options_SkinsFrameEmergencyColourbTxt"]
    g:SetText(HEALBOT_WORD_COLOURS)
    g=_G["HealBot_Options_SkinsFrameTextHealthColourbTxt"]
    g:SetText(HEALBOT_WORD_COLOURS)
    g=_G["HealBot_Options_SkinsFrameTextAuxColourbTxt"]
    g:SetText(HEALBOT_WORD_COLOURS)
    g=_G["HealBot_Options_SkinsFrameTextAggroColourbTxt"]
    g:SetText(HEALBOT_WORD_COLOURS)
    g=_G["HealBot_Options_SkinsFramesBarsSortbTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_SORT)
    g=_G["HealBot_Options_SkinsFramesBarsVisibilitybTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_VISIBILITY)
    g=_G["HealBot_Options_SkinsFramesBarsAggrobTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_AGGRO)
    g=_G["HealBot_Options_Skins_NameTextOptTxt"]
    g:SetText(HEALBOT_OPTIONS_NAMEOPTTEXT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_NameTextRoleLabelTxt"]
    g:SetText(HEALBOT_OPTIONS_NAMEROLELABELTEXT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_StateTextOptTxt"]
    g:SetText(HEALBOT_OPTIONS_STATEOPTTEXT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_StateTextColNotAvail"]
    g:SetText(HEALBOT_OPTIONS_STATECOLNOTAVAIL)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_AggroTextOptTxt"]
    g:SetText(HEALBOT_OPTIONS_AGGROOPTTEXT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_HealthTextColOptTxt"]
    g:SetText(HEALBOT_OPTIONS_HEALTHOPTCOLOUR)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Override_ColClassTxt"]
    g:SetText(HEALBOT_OPTIONS_CLASSCOLOURS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Override_ColRoleTxt"]
    g:SetText(HEALBOT_OPTIONS_ROLECOLOURS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Override_ColPowerTxt"]
    g:SetText(HEALBOT_OPTIONS_POWERCOLOURS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Override_ColAdaptiveTxt"]
    g:SetText(HEALBOT_OPTIONS_ADAPTIVECOLOURS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_AggroTextColOptTxt"]
    g:SetText(HEALBOT_OPTIONS_AGGROOPTCOLOUR)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_AuxColourOptTxt"]
    g:SetText(HEALBOT_OPTIONS_AUXOPTCOLOUR)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_ExtraInHealOptTxt"]
    g:SetText(HEALBOT_OPTIONS_EXTRAHOPTINHEAL)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_StateTextColOptTxt"]
    g:SetText(HEALBOT_OPTIONS_STATEOPTCOLOUR)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_NameTextColOptTxt"]
    g:SetText(HEALBOT_OPTIONS_NAMEOPTCOLOUR)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_HealthTextOptTxt"]
    g:SetText(HEALBOT_OPTIONS_HEALTHOPTTEXT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_AuxTextOptTxt"]
    g:SetText(HEALBOT_OPTIONS_AUXOPTTEXT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_SkinsFrameIndicatorsAggroTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_AGGROINDICATORS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_SkinsFrameIndicatorsLowManaTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_LOWMANAINDICATORS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_SkinsFrameIndicatorsSelfCastTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_SELFCASTINDICATORS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_SkinsFrameIndicatorsPowerTxt"]
    g:SetText(HEALBOT_OPTIONS_TAB_POWERINDICATORS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_IndTabNotAvail_Text"]
    g:SetText(HEALBOT_OPTIONS_TABNOTAVAIL)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_EmergTabNotAvailTxt"]
    g:SetText(HEALBOT_OPTIONS_TABNOTAVAIL)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_EmergCustomColCritt"]
    g:SetText(HEALBOT_WORDS_CRITICAL)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_EmergCustomColInjt"]
    g:SetText(HEALBOT_WORDS_INJURED)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_EmergCustomColHealthyt"]
    g:SetText(HEALBOT_WORDS_HEALTHY)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_SkinsFrameEmergGeneralTxt"]
    g:SetText(HEALBOT_OPTIONS_EMERGGENERAL)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_SkinsFrameEmergColTxt"]
    g:SetText(HEALBOT_OPTIONS_EMERGCOLS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_FrameAliasColorpickt"]
    g:SetText(HEALBOT_SKIN_HEADERBARCOL)
    g=_G["HealBot_FrameAliasTextColorpickt"]
    g:SetText(HEALBOT_SKIN_HEADERTEXTCOL)
    g=_G["HealBot_HealButtons_FramesFrameText"]
    g:SetText(HEALBOT_OPTIONS_FRAMESOPTTEXT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_HealButtons_FramesCopyTabsText"]
    g:SetText(HEALBOT_OPTIONS_SET_ALL_FRAMES)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_HealButtons_FramesCopyTabsTxt"]
    g:SetText(HEALBOT_OPTIONS_COPY_TABS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_HealButtons_FramesToFramesText"]
    g:SetText(HEALBOT_OPTIONS_TO_FRAMES)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_SkinsFramesTextColoursCustom_Text"]
    g:SetText(HEALBOT_OPTIONS_CUSTOMCOLHEALTH)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_SkinsFramesBarsColoursCustom_Text"]
    g:SetText(HEALBOT_OPTIONS_CUSTOMCOLHEALTH)
    g:SetTextColor(1,1,1,1)
    g=_G["hbSkinsFramesBarsColCustomFriendTxt"]
    g:SetText(HEALBOT_CUSTOM_CASTBY_FRIEND)
    g:SetTextColor(1,1,1,1)
    g=_G["hbSkinsFramesBarTextColCustomFriendTxt"]
    g:SetText(HEALBOT_CUSTOM_CASTBY_FRIEND)
    g:SetTextColor(1,1,1,1)
    g=_G["hbSkinsFramesBarsColCustomEnemyTxt"]
    g:SetText(HEALBOT_CUSTOM_CASTBY_ENEMY)
    g:SetTextColor(1,1,1,1)
    g=_G["hbSkinsFramesBarTextColCustomEnemyTxt"]
    g:SetText(HEALBOT_CUSTOM_CASTBY_ENEMY)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_SkinsFramesBarsGeneralTxt"]
    g:SetText(HEALBOT_OPTIONS_SKINBARS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_BarColorsOptionsText3"]
    g:SetText(HEALBOT_OPTIONS_CDCBARS)
    g:SetTextColor(1,1,1,1)
    g=_G["healbotfocusincombatfontstr"]
    g:SetText(HEALBOT_WORD_FOCUS)
    g:SetTextColor(1,1,1,1)
    g=_G["healbottargetofocusincombatfontstr"]
    g:SetText(HEALBOT_OPTIONS_TARGETOFFOCUS)
    g:SetTextColor(1,1,1,1)
    g=_G["healbotprivfocusincombatfontstr"]
    g:SetText(HEALBOT_OPTIONS_PRIVFOCUS)
    g:SetTextColor(1,1,1,1)
    g=_G["healbottargetotargetincombatfontstr"]
    g:SetText(HEALBOT_OPTIONS_TAB_TARGETOFTARGET)
    g:SetTextColor(1,1,1,1)
    g=_G["healbottargetincombatfontstr"]
    g:SetText(HEALBOT_DISABLED_TARGET)
    g:SetTextColor(1,1,1,1)
    g=_G["healbotprivfocustotincombatfontstr"]
    g:SetText(HEALBOT_OPTIONS_TARGETOFPRIVFOCUSTAR)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_CopyTab24Txt"]
    g:SetText(HEALBOT_OPTIONS_FRAME)
    g:SetTextColor(0.4,1,0.5,1)
    g=_G["HealBot_Options_CopyTab1Txt"]
    g:SetText(HEALBOT_OPTIONS_TAB_GENERAL)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_CopyTab2Txt"]
    g:SetText(HEALBOT_OPTIONS_TAB_HEADERS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_CopyTab4Txt"]
    g:SetText(HEALBOT_OPTIONS_TAB_BARS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_CopyTab10Txt"]
    g:SetText(HEALBOT_OPTIONS_TEXTOPTIONS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_CopyTab14Txt"]
    g:SetText(HEALBOT_OPTIONS_TAB_ICONS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_CopyTab17Txt"]
    g:SetText(HEALBOT_OPTIONS_TAB_INDICATORS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_CopyTab20Txt"]
    g:SetText(HEALBOT_OPTIONS_TAB_EMERG)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_EnemySkin_FontStr"]
    g:SetText(HEALBOT_OPTIONS_ENEMYAURAS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_HealGroups_Text"]
    g:SetText(HEALBOT_OPTIONS_HEALGROUPS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_PrivLists_Text1"]
    g:SetText(HEALBOT_OPTIONS_PRIVLISTS1)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_PrivLists_Text2"]
    g:SetText(HEALBOT_OPTIONS_PRIVLISTS2)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_EnemyAuraEnemyFrame_FontStr"]
    g:SetText(HEALBOT_OPTIONS_ENEMYFRAME)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_EnemyToTEnemyFrame_FontStr"]
    g:SetText(HEALBOT_OPTIONS_ENEMYFRAME)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_EnemyAuraPlayerFrames_FontStr"]
    g:SetText(HEALBOT_OPTIONS_PLAYERFRAMES)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_EnemyToTPlayerFrames_FontStr"]
    g:SetText(HEALBOT_OPTIONS_PLAYERFRAMES)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_EnemySkinUnitTargets_FontStr"]
    g:SetText(HEALBOT_OPTIONS_TAB_UNITTARGETS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_EnemySkinEnemyUnits_FontStr"]
    g:SetText(HEALBOT_OPTIONS_TAB_ENEMYUNITS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_EnemySkinEnemyToT_FontStr"]
    g:SetText(HEALBOT_OPTIONS_TAB_TARGETOFTARGET)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_DebuffTxt"]
    g:SetText(HEALBOT_OPTIONS_ICONDEBUFFOPTTEXT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_IconBuffText_FontStr"]
    g:SetText(HEALBOT_OPTIONS_ICONBUFFOPTTEXT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_OORArrowTxt"]
    g:SetText(HEALBOT_OPTIONS_ICONOPTOORARROW)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_RankTxt"]
    g:SetText(HEALBOT_OPTIONS_ICONOPTRANK)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_CombatTxt"]
    g:SetText(HEALBOT_OPTIONS_ICONOPTCOMBAT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_ReadyCheckTxt"]
    g:SetText(HEALBOT_OPTIONS_ICONOPTREADYCHECK)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_TargetTxt"]
    g:SetText(HEALBOT_OPTIONS_ICONOPTRAIDTARGET)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_ClassTxt"]
    g:SetText(HEALBOT_OPTIONS_ICONOPTCLASSROLE)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_SortNotAvail_Text"]
    g:SetText(HEALBOT_OPTIONS_TABNOTAVAIL)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_AuxBarsConfig_FontStr"]
    g:SetText(HEALBOT_OPTIONS_AUXCONFIG)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_IconText_FontStr"]
    g:SetText(HEALBOT_OPTIONS_TAB_DEBUFFICONTEXT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_IconBuffText_FontStr"]
    g:SetText(HEALBOT_OPTIONS_TAB_BUFFICONTEXT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_Buffs2Txt"]
    g:SetText(HEALBOT_OPTIONS_ICONBUFFOPTTEXT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_fhbTxt"]
    g:SetText(HEALBOT_OPTIONS_BARHEADEROPTTEXT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_ColClassTxt"]
    g:SetText(HEALBOT_OPTIONS_CLASSCOLOURS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_ColRoleTxt"]
    g:SetText(HEALBOT_OPTIONS_ROLECOLOURS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_ColPowerTxt"]
    g:SetText(HEALBOT_OPTIONS_POWERCOLOURS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_ColAdaptiveTxt"]
    g:SetText(HEALBOT_OPTIONS_ADAPTIVECOLOURS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Skins_fhfTxt"]
    g:SetText(HEALBOT_OPTIONS_FRAMEHEADEROPTTEXT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_SkinsFrameActionIconsGeneralTxt"]
    g:SetText(HEALBOT_OPTIONS_ACTIONICONSGENOPTTEXT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_SkinsFrameActionIconsIconsTxt"]
    g:SetText(HEALBOT_OPTIONS_ACTIONICONSOPTTEXT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_SkinsFrameActionIconsConfigTxt"]
    g:SetText(HEALBOT_OPTIONS_ACTIONICONSCOPTTEXT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_ActionIconsAlertFrameStr"]
    g:SetText(HEALBOT_OPTION_ALERTCONDITIONS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_SkinsFrameActionIconsFrameTxt"]
    g:SetText(HEALBOT_OPTIONS_ABILITYSELECT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_SkinAuthorText"]
    g:SetText(HEALBOT_OPTIONS_SKINAUTHOR)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_CDCWarn_Text"]
    g:SetText(HEALBOT_OPTIONS_CDCWARNINGS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_DispellableDebuff_Text"]
    g:SetText(HEALBOT_OPTIONS_DEBUFFDISPELL)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_CustomAuto"]
    g:SetText(HEALBOT_CUSTOM_CAT_CUSTOM_AUTOMATIC)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_BuffWarn_Text"]
    g:SetText(HEALBOT_OPTIONS_BUFFWARNINGS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_BuffCustom_Text"]
    g:SetText(HEALBOT_OPTIONS_BUFFCUSTOM)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_BuffCustomShare_Text"]
    g:SetText(HEALBOT_OPTIONS_CBUFFS_DISCORD)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_BuffCustomShare_Text1"]
    g:SetText(HEALBOT_OPTIONS_CBUFFS_DISCORD)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_AddBuffCustom_Text"]
    g:SetText(HEALBOT_OPTIONS_ADDBUFFCUSTOM)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_AddBuffByName_Text"]
    g:SetText(HEALBOT_OPTIONS_ADDBUFFBYNAME)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_AddBuffByHistory_Text"]
    g:SetText(HEALBOT_OPTIONS_ADDBUFFBYHISTORY)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_AddBuffBySelf_Text"]
    g:SetText(HEALBOT_OPTIONS_ADDBUFFBYSELF)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_AddBuffByClass_Text"]
    g:SetText(HEALBOT_OPTIONS_ADDBUFFBYCLASS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_AddBuffByOther_Text"]
    g:SetText(HEALBOT_OPTIONS_ADDBUFFBYOTHER)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_DebuffCustomShare_Text"]
    g:SetText(HEALBOT_OPTIONS_CDEBUFFS_DISCORD)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_DebuffCustomShare_Text1"]
    g:SetText(HEALBOT_OPTIONS_CDEBUFFS_DISCORD)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_InOut_ShareSkins_Text"]
    g:SetText(HEALBOT_OPTIONS_SKINS_DISCORD)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_InOut_ShareCDbuffs_Text"]
    g:SetText(HEALBOT_OPTIONS_CDEBUFFS_DISCORD)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_InOut_ShareBuffs_Text"]
    g:SetText(HEALBOT_OPTIONS_CBUFFS_DISCORD)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_InOut_ShareSpells_Text"]
    g:SetText(HEALBOT_OPTIONS_SPELLS_DISCORD)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_InOut_SharePresetCols_Text"]
    g:SetText(HEALBOT_OPTIONS_PRECOLS_DISCORD)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_BuffAutoTxt"]
    g:SetText(HEALBOT_CUSTOM_CAT_CUSTOM_AUTOBUFFS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_BuffMissing_Text"]
    g:SetText(HEALBOT_OPTIONS_BUFFMISSING)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_BuffMissing_Text"]
    g:SetText(HEALBOT_OPTIONS_BUFFMISSING)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_BuffExtra_Text"]
    g:SetText(HEALBOT_OPTIONS_BUFFMISSING)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_BuffExtraWE_Text"]
    g:SetText(HEALBOT_OPTIONS_BUFFSTEXTWE)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_BuffExtraWellFed_Text"]
    g:SetText(HEALBOT_WELL_FED)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_BuffExtraManaDrink_Text"]
    g:SetText(HEALBOT_MANA_DRINK)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_BuffExtraBuffs_Text"]
    g:SetText(HEALBOT_OPTIONS_TAB_EXTRAS)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_DebuffCustom_Text"]
    g:SetText(HEALBOT_OPTIONS_DEBUFFCUSTOM)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_AddDebuffCustom_Text"]
    g:SetText(HEALBOT_OPTIONS_ADDDEBUFFCUSTOM)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_AddDebuffByName_Text"]
    g:SetText(HEALBOT_OPTIONS_ADDDEBUFFBYNAME)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_AddDebuffBySelf_Text"]
    g:SetText(HEALBOT_OPTIONS_ADDDEBUFFBYSELF)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_AddCureByHistory_Text"]
    g:SetText(HEALBOT_OPTIONS_ADDDEBUFFBYHISTORY)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_AddDebuffByFriend_Text"]
    g:SetText(HEALBOT_OPTIONS_ADDDEBUFFBYFRIEND)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_AddDebuffByEnemy_Text"]
    g:SetText(HEALBOT_OPTIONS_ADDDEBUFFBYENEMY)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Panel6_1"]
    g:SetText(HEALBOT_OPTIONS_TIPTEXT)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Panel6_2"]
    g:SetText(HEALBOT_OPTIONS_TIPTEXT2)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_Panel6_3"]
    g:SetText(HEALBOT_OPTIONS_TIPTEXT3)
    g:SetTextColor(1,1,1,1)
    g=_G["HealBot_Options_PrioDebuffDisease_FontStr"]
    g:SetText(HEALBOT_DISEASE)
    g=_G["HealBot_Options_PrioDebuffMagic_FontStr"]
    g:SetText(HEALBOT_MAGIC)
    g=_G["HealBot_Options_PrioDebuffPoison_FontStr"]
    g:SetText(HEALBOT_POISON)
    g=_G["HealBot_Options_PrioDebuffCurse_FontStr"]
    g:SetText(HEALBOT_CURSE)
    g=_G["healbotcustomdebuffclassfontstr"]
    g:SetText(HEALBOT_WORD_COLOUR)
    g=_G["healbotcustombuffclassfontstr"]
    g:SetText(HEALBOT_WORD_COLOUR)
    hbv_SetClass()
    HealBot_Timers_InitExtraOptions()
end

function healbotOverride_ColoursAdaptiveUp_OnClick(self, id)
      --HealBot_setCall("healbotOverride_ColoursAdaptiveUp_OnClick")
    local tmpId=HealBot_Globals.OverrideAdaptiveOrder[id]
    HealBot_Globals.OverrideAdaptiveOrder[id]=HealBot_Globals.OverrideAdaptiveOrder[id-1]
    HealBot_Globals.OverrideAdaptiveOrder[id-1]=tmpId
    HealBot_Options_SetAdpatvieColoursOrder(true)
    HealBot_Update_AdaptiveUp(id)
end

function healbotOverride_ColoursAdaptiveDown_OnClick(self, id)
      --HealBot_setCall("healbotOverride_ColoursAdaptiveDown_OnClick")
    local tmpId=HealBot_Globals.OverrideAdaptiveOrder[id]
    HealBot_Globals.OverrideAdaptiveOrder[id]=HealBot_Globals.OverrideAdaptiveOrder[id+1]
    HealBot_Globals.OverrideAdaptiveOrder[id+1]=tmpId
    HealBot_Options_SetAdpatvieColoursOrder(true)
    HealBot_Update_AdaptiveDown(id)
end

function HealBot_Options_ColoursAdaptiveUp_OnClick(self, id)
      --HealBot_setCall("HealBot_Options_ColoursAdaptiveUp_OnClick")
    local tmpId=Healbot_Config_Skins.AdaptiveOrder[Healbot_Config_Skins.Current_Skin][id]
    Healbot_Config_Skins.AdaptiveOrder[Healbot_Config_Skins.Current_Skin][id]=Healbot_Config_Skins.AdaptiveOrder[Healbot_Config_Skins.Current_Skin][id-1]
    Healbot_Config_Skins.AdaptiveOrder[Healbot_Config_Skins.Current_Skin][id-1]=tmpId
    HealBot_Options_SetAdpatvieColoursOrder(false)
    HealBot_Update_AdaptiveUp(id)
end

function HealBot_Options_ColoursAdaptiveDown_OnClick(self, id)
      --HealBot_setCall("HealBot_Options_ColoursAdaptiveDown_OnClick")
    local tmpId=Healbot_Config_Skins.AdaptiveOrder[Healbot_Config_Skins.Current_Skin][id]
    Healbot_Config_Skins.AdaptiveOrder[Healbot_Config_Skins.Current_Skin][id]=Healbot_Config_Skins.AdaptiveOrder[Healbot_Config_Skins.Current_Skin][id+1]
    Healbot_Config_Skins.AdaptiveOrder[Healbot_Config_Skins.Current_Skin][id+1]=tmpId
    HealBot_Options_SetAdpatvieColoursOrder(false)
    HealBot_Update_AdaptiveDown(id)
end

function HealBot_Options_SetActionIconCondition(cond)
      --HealBot_setCall("HealBot_Options_SetActionIconCondition")
    hb_lVars["ActionIconsCondNo"]=cond
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameActionIconsCond1"],_G["HealBot_Options_SkinsFrameActionIconsCond1Txt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameActionIconsCond2"],_G["HealBot_Options_SkinsFrameActionIconsCond2Txt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameActionIconsCond3"],_G["HealBot_Options_SkinsFrameActionIconsCond3Txt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameActionIconsCond4"],_G["HealBot_Options_SkinsFrameActionIconsCond4Txt"],false)
    HealBot_Options_InnerContent_Colour(_G["HealBot_Options_SkinsFrameActionIconsCond"..hb_lVars["ActionIconsCondNo"]],
                                        _G["HealBot_Options_SkinsFrameActionIconsCond"..hb_lVars["ActionIconsCondNo"].."Txt"],true)
    if hb_lVars["ActionIconsCondNo"] == 4 then
        HealBot_Options_ActionIconsAlertFilterHideShow(hbv_ActionIcons_GetData("SelfAlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"]), true)        
        UIDropDownMenu_SetText(HealBot_Options_ActionIconsSelfAlertFilter, HealBot_Options_Lists["ActionIconsSelfAlertFilter"][hbv_ActionIcons_GetData("SelfAlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"])])
    else
        HealBot_Options_ActionIconsAlertFilterHideShow(hbv_ActionIcons_GetData("AlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))
        UIDropDownMenu_SetText(HealBot_Options_ActionIconsAlertFilter, HealBot_Options_Lists["ActionIconsAlertFilter"][hbv_ActionIcons_GetData("AlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])])
    end
    HealBot_Options_SkinsFramesActionIconsConfigTab("SkinsFramesActionIconsConfig", true)
end

function HealBot_Options_SetAdpatvieColoursOrder(override)
      --HealBot_setCall("HealBot_Options_SetAdpatvieColoursOrder")
    if override then
        local prefix="healbotOverride_ColoursAdaptive"
        local g=_G[prefix..HealBot_Globals.OverrideAdaptiveOrder[1]]
        g:SetPoint("TOPLEFT",150,-100)
        for x=2,11 do
            g=_G[prefix..HealBot_Globals.OverrideAdaptiveOrder[x]]
            g:SetPoint("TOPLEFT",150,-60-(40*x))
        end
    else
        local prefix="HealBot_Options_ColoursAdaptive"
        local g=_G[prefix..Healbot_Config_Skins.AdaptiveOrder[Healbot_Config_Skins.Current_Skin][1]]
        g:SetPoint("TOPLEFT",100,-50)
        for x=2,11 do
            g=_G[prefix..Healbot_Config_Skins.AdaptiveOrder[Healbot_Config_Skins.Current_Skin][x]]
            g:SetPoint("TOPLEFT",100,-10-(40*x))
        end
    end
end

function HealBot_Options_ShowTab(tab, subtab)
      --HealBot_setCall("HealBot_Options_ShowTab")
    if tab == "About" then
        HealBot_Options_UpdateTab(0, nil, "About")
    elseif tab == "General" then
        HealBot_Options_UpdateTab(1, nil, "General")
    elseif tab == "Overrides" then
        HealBot_Options_UpdateTab(10, nil, "Overrides", true)
        if subtab then
            if subtab == "EffectsBorder" then
                HealBot_Options_ShowOverridePanel("HealBot_Options_Override_EffectsFrame", "HealBot_Options_OverrideEffectb", "OverridesEffectsBorder")
                HealBot_Options_ShowOverrideEffectsPanel("HealBot_Options_OverrideEffectBorder", "HealBot_Options_OverrideEffectBorderb", "OverridesEffectsBorder")
            elseif subtab == "EffectsBars" then
                HealBot_Options_ShowOverridePanel("HealBot_Options_Override_EffectsFrame", "HealBot_Options_OverrideEffectb", "OverridesEffectsBars")
                HealBot_Options_ShowOverrideEffectsPanel("HealBot_Options_OverrideEffectBars", "HealBot_Options_OverrideEffectBarsb", "OverridesEffectsBars")
            elseif subtab == "ColsClass" then
                HealBot_Options_ShowOverridePanel("HealBot_Options_Override_ColourFrame", "HealBot_Options_OverrideColourb", "OverridesColourClass")
                HealBot_Options_ShowOverrideColourPanel("HealBot_Options_OverrideColoursClass", "HealBot_Options_OverrideColoursClassb", "SkinsColourClass")
            elseif subtab == "ColsRole" then
                HealBot_Options_ShowOverridePanel("HealBot_Options_Override_ColourFrame", "HealBot_Options_OverrideColourb", "OverridesColourRole")
                HealBot_Options_ShowOverrideColourPanel("HealBot_Options_OverrideColoursRole", "HealBot_Options_OverrideColoursRoleb", "OverridesColourRole")
            elseif subtab == "ColsPower" then
                HealBot_Options_ShowOverridePanel("HealBot_Options_Override_ColourFrame", "HealBot_Options_OverrideColourb", "OverridesColourPower")
                HealBot_Options_ShowOverrideColourPanel("HealBot_Options_OverrideColoursPower", "HealBot_Options_OverrideColoursPowerb", "OverridesColourPower")
            elseif subtab == "ColsAdaptive" then
                HealBot_Options_ShowOverridePanel("HealBot_Options_Override_ColourFrame", "HealBot_Options_OverrideColourb", "OverridesColourAdaptive")
                HealBot_Options_ShowOverrideColourPanel("HealBot_Options_OverrideColoursAdaptive", "HealBot_Options_OverrideColoursAdaptiveb", "OverridesColourAdaptive")
            elseif subtab == "Chat" then
                HealBot_Options_ShowOverridePanel("HealBot_Options_Override_ChatFrame", "HealBot_Options_OverrideChatb", "OverrideChat")
            elseif subtab == "Frames" then
                HealBot_Options_ShowOverridePanel("HealBot_Options_Override_FramesFrame", "HealBot_Options_Overrideframesb", "OverrideFrames")
            end
        end
    elseif tab == "Spells" then
        HealBot_Options_UpdateTab(2, nil, "Spells")
    elseif tab == "SkinsGeneral" then
        HealBot_Options_UpdateTab(3, 301, "SkinsGeneral"); HealBot_Options_ShowSkinsPanel("HealBot_Options_GeneralSkinsFrame", 1001)
    elseif tab == "SkinsEffects" then
        HealBot_Options_UpdateTab(3, 303, "SkinsEffects", true); HealBot_Options_ShowSkinsPanel("HealBot_Options_EffectsSkinsFrame", 1003)
        if subtab then
            if subtab == "Border" then
                HealBot_Options_ShowEffectsPanel("HealBot_Options_EffectBorder", "HealBot_Options_EffectBorderb", "SkinsEffectsBorder")
            elseif subtab == "Bars" then
                HealBot_Options_ShowEffectsPanel("HealBot_Options_EffectBars", "HealBot_Options_EffectBarsb", "SkinsEffectsBars")
            end
        end
    elseif tab == "SkinsColour" then
        HealBot_Options_UpdateTab(3, 304, "SkinsColour", true); HealBot_Options_ShowSkinsPanel("HealBot_Options_ColourSkinsFrame", 1004)
        if subtab then
            if subtab == "Class" then
                HealBot_Options_ShowColourPanel("HealBot_Options_SkinsColoursClass", "HealBot_Options_SkinsColoursClassb", "SkinsColourClass")
            elseif subtab == "Role" then
                HealBot_Options_ShowColourPanel("HealBot_Options_SkinsColoursRole", "HealBot_Options_SkinsColoursRoleb", "SkinsColourRole")
            elseif subtab == "Power" then
                HealBot_Options_ShowColourPanel("HealBot_Options_SkinsColoursPower", "HealBot_Options_SkinsColoursPowerb", "SkinsColourPower")
            elseif subtab == "Adaptive" then
                HealBot_Options_ShowColourPanel("HealBot_Options_SkinsColoursAdaptive", "HealBot_Options_SkinsColoursAdaptiveb", "SkinsColoursAdaptive")
            end
        end
    elseif tab == "SkinsEnemy" then
        HealBot_Options_UpdateTab(3, 305, "SkinsFramesEnemy", true); HealBot_Options_ShowSkinsPanel("HealBot_Options_EnemySkinsFrame", 1005)
        --HealBot_Options_UpdateTab(3, 310, "SkinsFramesEnemy", true); HealBot_Options_ShowSkinsPanel("HealBot_Options_EnemySkinsFrame", 1005)
    elseif tab == "SkinsChat" then
        HealBot_Options_UpdateTab(3, 307, "SkinsChat"); HealBot_Options_ShowSkinsPanel("HealBot_Options_ChatSkinsFrame", 1007)
    elseif tab == "SkinsFramesGeneral" then
        HealBot_Options_UpdateTab(3, 309, "SkinsFramesGeneral"); HealBot_Options_ShowSkinsPanel("HealBot_Options_FramesSkinsFrame", 1008)
    elseif tab == "SkinsFramesHealGroups" then
        HealBot_Options_UpdateTab(3, 310, "SkinsFramesHealGroups"); HealBot_Options_ShowSkinsPanel("HealBot_Options_HealGroupsSkinsFrame", 1009)
    elseif tab == "SkinsFramesHeaders" then
        HealBot_Options_UpdateTab(3, 311, "SkinsFramesHeaders", true); HealBot_Options_ShowSkinsPanel("HealBot_Options_HeadersSkinsFrame", 1010)
    elseif tab == "SkinsFramesBars" then
        HealBot_Options_UpdateTab(3, 312, "SkinsFramesBars", true); HealBot_Options_ShowSkinsPanel("HealBot_Options_BarsSkinsFrame", 1011)
        if subtab then
            if subtab == "AuxConfig" then
                HealBot_Options_ShowBarsPanel("HealBot_Options_SkinsFramesBarsAux", "HealBot_Options_SkinsFramesBarsAuxb", "SkinsFramesBarsAuxConfig", false); HealBot_Options_ShowBarsAuxPanel("HealBot_Options_SkinsFramesBarsAuxConfig", "HealBot_Options_SkinsFramesBarsAuxConfigb", "SkinsFramesBarsAuxConfig")
            end
        end
    elseif tab == "SkinsFramesText" then
        HealBot_Options_UpdateTab(3, 313, "SkinsFramesText", true); HealBot_Options_ShowSkinsPanel("HealBot_Options_TextSkinsFrame", 1013)
    elseif tab == "SkinsFramesIcons" then
        HealBot_Options_UpdateTab(3, 314, "SkinsFramesIcons", true); HealBot_Options_ShowSkinsPanel("HealBot_Options_IconsSkinsFrame", 1014)
    elseif tab == "SkinsFramesActionIcons" then
        HealBot_Options_UpdateTab(3, 315, "SkinsFramesActionIcons", true); HealBot_Options_ShowSkinsPanel("HealBot_Options_ActionIconsSkinsFrame", 1015)
    elseif tab == "SkinsFramesIndicators" then
        HealBot_Options_UpdateTab(3, 316, "SkinsFramesIndicators", true); HealBot_Options_ShowSkinsPanel("HealBot_Options_IndicatorsSkinsFrame", 1016)
        if subtab then
            if subtab == "SelfCast" then
                HealBot_Options_ShowIndicatorsPanel("HealBot_Options_SkinsFrameIndicatorsSelfCast", "HealBot_Options_SkinsFrameIndicatorsSelfCastb", "SkinsFramesIndicatorsSelfCast")
            elseif subtab == "Aggro" then
                HealBot_Options_ShowIndicatorsPanel("HealBot_Options_SkinsFrameIndicatorsAggro", "HealBot_Options_SkinsFrameIndicatorsAggrob", "SkinsFramesIndicatorsAggro")
            end
        end
    elseif tab == "SkinsFramesEmergency" then
        HealBot_Options_UpdateTab(3, 317, "SkinsFramesEmergency", true); HealBot_Options_ShowSkinsPanel("HealBot_Options_EmergencyFrame", 1017)
    elseif tab == "DebuffsGeneralRoot" then
        HealBot_Options_UpdateTab(4, nil, "DebuffsGeneral")
    elseif tab == "DebuffsGeneral" then
        HealBot_Options_UpdateTab(4, 41, "DebuffsGeneral"); HealBot_Options_ShowCurePanel("HealBot_Options_CureDispelCleanse")
    elseif tab == "DebuffsCustom" then
        HealBot_Options_UpdateTab(4, 42, "DebuffsCustom"); HealBot_Options_ShowCurePanel("HealBot_Options_CustomCureFrame")
    elseif tab == "DebuffsWarning" then
        HealBot_Options_UpdateTab(4, 43, "DebuffsWarning"); HealBot_Options_ShowCurePanel("HealBot_Options_WarningCureFrame")
    elseif tab == "BuffsGeneralRoot" then
        HealBot_Options_UpdateTab(5, nil, "BuffsGeneral", true)
    elseif tab == "BuffsGeneral" then
        HealBot_Options_UpdateTab(5, 51, "BuffsGeneral", true); HealBot_Options_ShowBuffPanel("HealBot_Options_BuffsPanel")
    elseif tab == "BuffsCustom" then
        HealBot_Options_UpdateTab(5, 52, "BuffsCustom"); HealBot_Options_ShowBuffPanel("HealBot_Options_BuffIconFrame")
    elseif tab == "BuffsWarning" then
        HealBot_Options_UpdateTab(5, 53, "BuffsWarning"); HealBot_Options_ShowBuffPanel("HealBot_Options_WarningBuffFrame")
    elseif tab == "Tips" then
        HealBot_Options_UpdateTab(6, nil, "Tips", true)
    elseif tab == "Test" then
        HealBot_Options_UpdateTab(8, nil, "Test")
    elseif tab == "ImportExport" then
        HealBot_Options_UpdateTab(9, nil, "ImportExport", true)
    elseif tab == "Plugins" then
        HealBot_Options_UpdateTab(99, nil, "Plugins")
    end
end

hb_lVars["OnLoad"]=true
function HealBot_Options_AboutTab(tab)
      --HealBot_setCall("HealBot_Options_AboutTab")
    if not HealBot_Options_TabRunOnce[tab] then
        local g=_G["HealBot_About_Header"]
        g:SetTextColor(1,1,1,1)
        HealBot_Options_FAQ.initialize=HealBot_Options_FAQ_DropDown
        UIDropDownMenu_SetText(HealBot_Options_FAQ, HEALBOT_ABOUT_FAQ_QUESTIONS[1])
        g=_G["HealBot_Options_FAQAnswerTextD"]
        g:SetTextColor(1,1,1,1);
        g:SetText(HEALBOT_ABOUT_FAQ_ANSWERS[hb_lVars["hbFAQ"]])
        g=_G["HealBot_About_AuthorH"]
        g:SetText(HEALBOT_ABOUT_AUTHORH)
        g=_G["HealBot_About_URLH"]
        g:SetText(HEALBOT_ABOUT_WEBSITE)
        g=_G["HealBot_About_CatH"]
        g:SetText(HEALBOT_ABOUT_CATH)
        g=_G["HealBot_About_CatD"]
        g=_G["HealBot_About_LocalH"]
        g:SetText(HEALBOT_ABOUT_LOCALH)
        g=_G["HealBot_About_FAQH"]
        g:SetText(HEALBOT_ABOUT_FAQH)
        g=_G["HBIncHealsColHeader1"]
        g:SetText(HEALBOT_WORD_HEALER)
        g=_G["HBIncHealsColHeader2"]
        g:SetText(HEALBOT_WORD_VERSION)
        g=_G["HBIncHealsColHeader3"]
        g:SetText(HEALBOT_ABOUT_CREDITH)
        HealBot_Comms_Print_Supports()
        HealBot_Options_SetLabel("HealBot_About_Desc1",HEALBOT_ABOUT_DESC1)
        HealBot_Options_SetLabel("HealBot_Info_SuppressSounds",HEALBOT_SUPPRESSSOUND)
        HealBot_Options_SetLabel("HealBot_Info_SuppressErrors",HEALBOT_SUPPRESSERROR)
        HealBot_Options_SetLabel("HealBot_Info_PerfLevel",HEALBOT_PERFLEVEL)
        HealBot_Options_SetLabel("HealBot_About_AuthorD",HEALBOT_ABOUT_AUTHORD)
        HealBot_Options_SetLabel("HealBot_About_URLD",HEALBOT_ABOUT_URL)
        HealBot_Options_SetLabel("HealBot_Options_FAQTxt",HEALBOT_ABOUT_FAQ_QUESTION)
        HealBot_Options_SetLabel("HealBot_Options_FAQAnswerTextH",HEALBOT_ABOUT_FAQ_ANSWER)
        HealBot_Options_SetLabel("HealBot_About_LocalD",HEALBOT_ABOUT_LOCALD)
        HealBot_Options_SetLabel("HealBot_About_CatD",HEALBOT_ABOUT_CATD)
        HealBot_Options_TabRunOnce[tab]=true
    end
    if hb_lVars["OnLoad"] then
        HealBot_Timers_Lang()
        local g=_G["UsedToInitFonts"]
        g:SetTextColor(0,0,0,0)
        HealBot_Media_InitFonts()
        hb_lVars["OnLoad"]=false
    end
end

function HealBot_Options_GeneralTab(tab)
      --HealBot_setCall("HealBot_Options_GeneralTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_Theme.initialize=HealBot_Options_Theme_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Theme, HealBot_Options_Lists["Themes"][HealBot_Globals.OptionsTheme])
        HealBot_Options_hbCommands.initialize=HealBot_Options_hbCommands_DropDown
        UIDropDownMenu_SetText(HealBot_Options_hbCommands, HealBot_Options_hbCommands_List[hb_lVars["hbCommands"]])
        HealBot_Options_EmergencyFClass.initialize=HealBot_Options_EmergencyFClass_DropDown
        UIDropDownMenu_SetText(HealBot_Options_EmergencyFClass, HealBot_Options_EmergencyFClass_List[HealBot_Globals.EmergencyFClass])
        HealBot_Options_hbLangs.initialize=HealBot_Options_hbLangs_DropDown
        UIDropDownMenu_SetText(HealBot_Options_hbLangs, HealBot_Options_hbLangs_List[hb_lVars["hbLangs"]])
        HealBot_Options_NoAuraWhenRested:SetChecked(HealBot_Config_Buffs.NoAuraWhenRested)
        local mmButtonShown=false
        if HealBot_Globals.MinimapIcon.hide == false then mmButtonShown=true end
        HealBot_Options_ShowMinimapButton:SetChecked(mmButtonShown)
        HealBot_Options_TalentInspect:SetChecked(HealBot_Globals.TalentInspect)
        HealBot_Options_HideOptions:SetChecked(HealBot_Globals.HideOptions)
        HealBot_Options_HideUnlocked:SetChecked(HealBot_Globals.HideUnlockedTag)
        HealBot_Options_RightButtonOptions:SetChecked(HealBot_Globals.RightButtonOptions)
        HealBot_Options_sliderlabels_Init(HealBot_Options_OptionsOpacityAdj,HEALBOT_OPTIONS_OPTIONSOPACITY,1,75,1,5,HEALBOT_WORD_LOW,HEALBOT_WORD_HIGH)
        HealBot_Options_OptionsOpacityAdj:SetValue(HealBot_Globals.OptionsOpacityAdj or 35)
        HealBot_Options_CommandsButton:SetText(HEALBOT_WORD_RUN)
        HealBot_Options_LangsButton:SetText(HEALBOT_WORD_SET)
        HealBot_Options_hbProfileButtonText:SetText(HEALBOT_WORD_SET)
        HealBot_Options_hbProfile.initialize=HealBot_Options_hbProfile_DropDown
        UIDropDownMenu_SetText(HealBot_Options_hbProfile, HealBot_Options_hbProfile_List[HealBot_Config.Profile])
        HealBot_Options_FrameStrata.initialize=HealBot_Options_FrameStrata_DropDown
        UIDropDownMenu_SetText(HealBot_Options_FrameStrata, HealBot_Globals.FrameStrata)
        HealBot_Options_FrameStrataIC.initialize=HealBot_Options_FrameStrataIC_DropDown
        UIDropDownMenu_SetText(HealBot_Options_FrameStrataIC, HealBot_Globals.FrameStrataIC)
        HealBot_Options_SetText(HealBot_Options_NoAuraWhenRested,HEALBOT_OPTION_IGNORE_AURA_RESTED)
        HealBot_Options_SetText(HealBot_Options_ShowMinimapButton,HEALBOT_OPTIONS_SHOWMINIMAPBUTTON)
        HealBot_Options_SetText(HealBot_Options_TalentInspect,HEALBOT_TALENTINSPECT)
        HealBot_Options_SetText(HealBot_Options_HideOptions,HEALBOT_OPTIONS_HIDEOPTIONS)
        HealBot_Options_SetText(HealBot_Options_HideUnlocked,HEALBOT_OPTIONS_HIDEUNLOCKEDTAG)
        HealBot_Options_SetText(HealBot_Options_RightButtonOptions,HEALBOT_OPTIONS_RIGHTBOPTIONS)
        HealBot_Options_SetText(HealBot_Options_OptionsOpacityAdj,HEALBOT_OPTIONS_OPTIONSOPACITY)
        HealBot_Options_SetText(HealBot_Options_DisableHealBotOpt,HEALBOT_OPTIONS_DISABLEHEALBOT)
        HealBot_Options_SetText(HealBot_Options_DisableHealBotSolo,HEALBOT_OPTIONS_DISABLEHEALBOTSOLO)
        HealBot_Options_SetText(HealBot_Options_DisableHealBotSpec,HEALBOT_OPTIONS_DISABLEHEALBOTSPEC..HealBot_Config.Spec)
        HealBot_Options_SetLabel("healbotcmdfontstr",HEALBOT_OPTIONS_COMMANDS)
        HealBot_Options_SetText(HealBot_Options_EFClassDruid,HEALBOT_DRUID)
        HealBot_Options_SetText(HealBot_Options_EFClassHunter,HEALBOT_HUNTER)
        HealBot_Options_SetText(HealBot_Options_EFClassMage,HEALBOT_MAGE)
        HealBot_Options_SetText(HealBot_Options_EFClassPaladin,HEALBOT_PALADIN)
        HealBot_Options_SetText(HealBot_Options_EFClassPriest,HEALBOT_PRIEST)
        HealBot_Options_SetText(HealBot_Options_EFClassRogue,HEALBOT_ROGUE)
        HealBot_Options_SetText(HealBot_Options_EFClassShaman,HEALBOT_SHAMAN)
        HealBot_Options_SetText(HealBot_Options_EFClassWarlock,HEALBOT_WARLOCK)
        HealBot_Options_SetText(HealBot_Options_EFClassWarrior,HEALBOT_WARRIOR)
        HealBot_Options_SetText(HealBot_Options_EFClassDeathKnight,HEALBOT_DEATHKNIGHT)
        HealBot_Options_SetText(HealBot_Options_EFClassDemonHunter,HEALBOT_DEMONHUNTER)
        HealBot_Options_SetText(HealBot_Options_EFClassMonk,HEALBOT_MONK)
        HealBot_Options_SetText(HealBot_Options_EFClassEvoker,HEALBOT_EVOKER)
        HealBot_Options_SetLabel("healbotlangfontstr",HEALBOT_OPTIONS_LANG)
        HealBot_Options_SetLabel("healbotcrolesfontstr",HEALBOT_OPTIONS_EMERGFCLASS)
        HealBot_Options_SetLabel("healbotprofilefontstr",HEALBOT_OPTIONS_PROFILE)
        HealBot_Options_SetLabel("HealBot_OptionThemet",HEALBOT_OPTIONS_THEME)
        HealBot_Options_SetLabel("HealBot_Options_FrameStratat",HEALBOT_OPTIONS_FRAMESTRATA)
        HealBot_Options_SetLabel("HealBot_Options_FrameStrataOOCTxt",HEALBOT_OPTIONS_OUTOFCOMBAT)
        HealBot_Options_SetLabel("HealBot_Options_FrameStrataICTxt",HEALBOT_OPTIONS_ENTERINGCOMBAT)
        if HEALBOT_GAME_VERSION<3 then
            HealBot_Options_EFClassEvoker:Hide()
            HealBot_Options_EFClassDeathKnight:Hide()
            HealBot_Options_EFClassDemonHunter:Hide()
            HealBot_Options_EFClassMonk:Hide()
            HealBot_Options_EFClassDruid:ClearAllPoints()
            HealBot_Options_EFClassDruid:SetPoint("TOPLEFT","HealBot_Options_EmergencyFClass","BOTTOMLEFT",-135,-10)
            HealBot_Options_EFClassHunter:ClearAllPoints()
            HealBot_Options_EFClassHunter:SetPoint("TOPLEFT","HealBot_Options_EFClassDruid","TOPRIGHT",120,0)
            HealBot_Options_EFClassMage:ClearAllPoints()
            HealBot_Options_EFClassMage:SetPoint("TOPLEFT","HealBot_Options_EFClassHunter","TOPRIGHT",120,0)
            HealBot_Options_EFClassPaladin:ClearAllPoints()
            HealBot_Options_EFClassPaladin:SetPoint("TOPLEFT","HealBot_Options_EFClassDruid","BOTTOMLEFT",0,-7)
            HealBot_Options_EFClassRogue:ClearAllPoints()
            HealBot_Options_EFClassRogue:SetPoint("TOPLEFT","HealBot_Options_EFClassPriest","TOPRIGHT",120,0)
            HealBot_Options_EFClassShaman:ClearAllPoints()
            HealBot_Options_EFClassShaman:SetPoint("TOPLEFT","HealBot_Options_EFClassPaladin","BOTTOMLEFT",0,-7)
        elseif HEALBOT_GAME_VERSION<5 then
            HealBot_Options_EFClassEvoker:Hide()
            HealBot_Options_EFClassDemonHunter:Hide()
            HealBot_Options_EFClassMonk:Hide()
            HealBot_Options_EFClassDeathKnight:ClearAllPoints()
            HealBot_Options_EFClassDeathKnight:SetPoint("TOPLEFT","HealBot_Options_EmergencyFClass","BOTTOMLEFT",-215,-10)
            HealBot_Options_EFClassDruid:ClearAllPoints()
            HealBot_Options_EFClassDruid:SetPoint("TOPLEFT","HealBot_Options_EFClassDeathKnight","TOPRIGHT",120,0)
            HealBot_Options_EFClassHunter:ClearAllPoints()
            HealBot_Options_EFClassHunter:SetPoint("TOPLEFT","HealBot_Options_EFClassDruid","TOPRIGHT",120,0)
            HealBot_Options_EFClassMage:ClearAllPoints()
            HealBot_Options_EFClassMage:SetPoint("TOPLEFT","HealBot_Options_EFClassHunter","TOPRIGHT",120,0)
            HealBot_Options_EFClassPaladin:ClearAllPoints()
            HealBot_Options_EFClassPaladin:SetPoint("TOPLEFT","HealBot_Options_EFClassDeathKnight","BOTTOMLEFT",0,-7)
            HealBot_Options_EFClassRogue:ClearAllPoints()
            HealBot_Options_EFClassRogue:SetPoint("TOPLEFT","HealBot_Options_EFClassPriest","TOPRIGHT",120,0)
            HealBot_Options_EFClassWarlock:ClearAllPoints()
            HealBot_Options_EFClassWarlock:SetPoint("TOPLEFT","HealBot_Options_EFClassPriest","BOTTOMLEFT",0,-7)
            HealBot_Options_EFClassShaman:ClearAllPoints()
            HealBot_Options_EFClassShaman:SetPoint("TOPLEFT","HealBot_Options_EFClassRogue","TOPRIGHT",120,0)
        end
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_OverridesEffectsTabBorder(tab)
      --HealBot_setCall("HealBot_Options_OverridesEffectsTabBorder")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_sliderlabels_Init(HealBot_Options_OverrideHealthDropPct,HEALBOT_OPTION_HEALTHDROPPCT,250,750,10,5,"25%","75%")
        HealBot_Options_OverrideHealthDropPct:SetValue(HealBot_Globals.OverrideEffects["HEALTHDROPPCT"] or 500)
        HealBot_Options_SetText(HealBot_Options_OverrideHealthDropPct, HEALBOT_OPTION_HEALTHDROPPCT..floor(HealBot_Globals.OverrideEffects["HEALTHDROPPCT"]/10).."%")
        HealBot_Options_sliderlabels_Init(HealBot_Options_OverrideHealthDropSpeed,HEALBOT_OPTION_HEALTHDROPSPEED,1,30,1,2,1,30)
        HealBot_Options_OverrideHealthDropSpeed:SetValue(HealBot_Globals.OverrideEffects["HEALTHDROPTIME"])
        HealBot_Options_SetText(HealBot_Options_OverrideHealthDropSpeed, HEALBOT_OPTION_HEALTHDROPSPEED..": "..HealBot_Globals.OverrideEffects["HEALTHDROPTIME"].." "..HEALBOT_WORDS_SEC)
        HealBot_Options_sliderlabels_Init(HealBot_Options_OverrideHealthDropCancel,HEALBOT_OPTION_HEALTHDROPCANCEL,100,500,10,5,"10%","50%")
        HealBot_Options_OverrideHealthDropCancel:SetValue(HealBot_Globals.OverrideEffects["HEALTHDROPCANCEL"])
        HealBot_Options_SetText(HealBot_Options_OverrideHealthDropCancel, HEALBOT_OPTION_HEALTHDROPCANCEL..": "..floor(HealBot_Globals.OverrideEffects["HEALTHDROPCANCEL"]/10).."%")
        HealBot_Options_sliderlabels_Init(HealBot_Options_OverrideAuxBarFlashFreq,HEALBOT_OPTIONS_AGGROFLASHFREQ,1,40,1,2,HEALBOT_OPTIONS_WORD_SLOWER,HEALBOT_OPTIONS_WORD_FASTER)
        HealBot_Options_OverrideAuxBarFlashFreq:SetValue(HealBot_Globals.OverrideEffects["OFREQ"]*100)
        HealBot_Options_SetText(HealBot_Options_OverrideAuxBarFlashFreq, HEALBOT_OPTIONS_AGGROFLASHFREQ)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_OverrideAuxBarFlashAlphaMax,HEALBOT_OPTIONS_MAXALPHA,0.2,1,0.05,2)
        HealBot_Options_OverrideAuxBarFlashAlphaMax:SetValue(HealBot_Globals.OverrideEffects["OMAX"])
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_OverrideAuxBarFlashAlphaMax)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_OverrideAuxBarFlashAlphaMin,HEALBOT_OPTIONS_MINALPHA,0,0.8,0.05,2)
        HealBot_Options_OverrideAuxBarFlashAlphaMin:SetValue(HealBot_Globals.OverrideEffects["OMIN"])
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_OverrideAuxBarFlashAlphaMin)
        HealBot_Options_Override_EffectsUse.initialize=HealBot_Options_Override_EffectsUse_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Override_EffectsUse, HealBot_Options_UseOverrides_List[HealBot_Globals.OverrideEffects["USE"]])
        HealBot_Options_sliderlabels_Init(HealBot_Options_OverrideBorderHazardFreq,HEALBOT_OPTIONS_AGGROFLASHFREQ,5,85,5,2,HEALBOT_OPTIONS_WORD_SLOWER,HEALBOT_OPTIONS_WORD_FASTER)
        HealBot_Options_OverrideBorderHazardFreq:SetValue((1-(HealBot_Globals.OverrideEffects["HAZARDFREQ"] or 0.3))*100)
        HealBot_Options_SetText(HealBot_Options_OverrideBorderHazardFreq, HEALBOT_OPTIONS_AGGROFLASHFREQ)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_OverrideBorderHazardMinAlpha,HEALBOT_OPTIONS_MINALPHA,0,0.75,0.05,2)
        HealBot_Options_OverrideBorderHazardMinAlpha:SetValue(HealBot_Globals.OverrideEffects["HAZARDMINALPHA"] or 0.25)
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_OverrideBorderHazardMinAlpha)
        HealBot_Options_sliderlabels_Init(HealBot_Options_OverrideGlowSizeBar,HEALBOT_OPTIONS_ONBARS,1,5,1,1,HEALBOT_WORDS_SMALLER,HEALBOT_WORDS_LARGER)
        HealBot_Options_OverrideGlowSizeBar:SetValue(HealBot_Globals.OverrideEffects["GLOW"])
        HealBot_Options_SetText(HealBot_Options_OverrideGlowSizeBar, HEALBOT_OPTIONS_ONBARS..": "..HealBot_Options_Lists["GlowSize"][HealBot_Globals.OverrideEffects["GLOW"]])
        HealBot_Options_sliderlabels_Init(HealBot_Options_OverrideGlowSizeIcon,HEALBOT_OPTIONS_ONICONS,1,5,1,1,HEALBOT_WORDS_SMALLER,HEALBOT_WORDS_LARGER)
        HealBot_Options_OverrideGlowSizeIcon:SetValue(HealBot_Globals.OverrideEffects["ICONGLOW"])
        HealBot_Options_SetText(HealBot_Options_OverrideGlowSizeIcon, HEALBOT_OPTIONS_ONICONS..": "..HealBot_Options_Lists["GlowSize"][HealBot_Globals.OverrideEffects["ICONGLOW"]])
        g=_G["HealBot_OverrideEffects_FontStr"]
        g:SetText(HEALBOT_SKIN_BORDERTEXT.." "..HEALBOT_OPTIONS_TAB_EFFECTS)
        g:SetTextColor(1,1,1,1)
        g=_G["HealBot_OverrideAuxBarsAssign_FontStr"]
        g:SetText(HEALBOT_OPTIONS_AUXFLASH)
        g=_G["HealBot_OverrideHealthDrop_FontStr"]
        g:SetText(HEALBOT_OPTION_HEALTHDROPALERT)
        HealBot_Options_SetLabel("healbotOverride_Effectsfontstr",HEALBOT_OPTIONS_OVERRIDE_EFFECTS)
        HealBot_Options_OverrideUseHealthDrop:SetChecked(HealBot_Globals.OverrideEffects["HEALTHDROP"])
        HealBot_Options_SetText(HealBot_Options_OverrideUseHealthDrop,HEALBOT_OPTION_USE)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_OverridesEffectsTabBars(tab)
      --HealBot_setCall("HealBot_Options_OverridesEffectsTabBorder")
    if not HealBot_Options_TabRunOnce[tab] then
        g=_G["HealBot_OverrideEffectsBars_FontStr"]
        g:SetText(HEALBOT_OPTIONS_TAB_BARS.." "..HEALBOT_OPTIONS_TAB_EFFECTS)
        g:SetTextColor(1,1,1,1)
        g=_G["HealBot_OverrideHotBars_FontStr"]
        g:SetText(HEALBOT_OPTION_HOTBARS)
        g=_G["HealBot_OverrideEffectsFluid_FontStr"]
        g:SetText(HEALBOT_OPTION_FLUIDBARS)
        g=_G["HealBot_OverrideGroupBars_FontStr"]
        g:SetText(HEALBOT_OPTIONS_GROUPHEALS)
        HealBot_Options_SetLabel("HealBot_SkinsOverrideFocusGroupsIncText",HEALBOT_OPTIONS_EMERGFILTERGROUPS)
        HealBot_Options_OverrideUseFluidBars:SetChecked(HealBot_Globals.OverrideEffects["FLUIDBARS"])
        HealBot_Options_SetText(HealBot_Options_OverrideUseFluidBars,HEALBOT_OPTION_USE)
        HealBot_Options_Override_EffectsBarsUse.initialize=HealBot_Options_Override_EffectsBarsUse_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Override_EffectsBarsUse, HealBot_Options_UseOverrides_List[HealBot_Globals.OverrideEffects["USEBARS"]])
        HealBot_Options_SetLabel("healbotOverride_EffectsBarsfontstr",HEALBOT_OPTIONS_OVERRIDE_EFFECTS)
        HealBot_Options_sliderlabels_Init(HealBot_Options_OverrideHotBarHealthThres,HEALBOT_OPTION_HOTBARHEALTHPCT,0,50,1,5,"0%","50%")
        HealBot_Options_OverrideHotBarHealthThres:SetValue(HealBot_Globals.OverrideEffects["HOTBARHLTH"] or 10)
        HealBot_Options_SetText(HealBot_Options_OverrideHotBarHealthThres, HEALBOT_OPTION_HOTBARHEALTHPCT..HealBot_Globals.OverrideEffects["HOTBARHLTH"].."%")
        HealBot_Options_sliderlabels_Init(HealBot_Options_OverrideFocusGroupDimming,HEALBOT_OPTION_FOCUSGROUPDIMMING,12,44,1,4,HEALBOT_WORD_LOW,HEALBOT_WORD_HIGH)
        HealBot_Options_OverrideFocusGroupDimming:SetValue((HealBot_Globals.OverrideEffects["FGDIMMING"] or 2.8)*10)
        HealBot_Options_SetText(HealBot_Options_OverrideFocusGroupDimming, HEALBOT_OPTION_FOCUSGROUPDIMMING)
        HealBot_Options_OverrideEFGroupRaidOnly:SetChecked(HealBot_Globals.OverrideEffects["FGRAIDONLY"])
        HealBot_Options_SetText(HealBot_Options_OverrideEFGroupRaidOnly,HEALBOT_OPTIONS_EMERGFILTERGROUPSRAID)
        HealBot_Options_sliderlabels_Init(HealBot_Options_OverrideBarUpdateFreq,HEALBOT_OPTION_BARUPDFREQ,1,19,1,2,HEALBOT_OPTIONS_WORD_SLOWER,HEALBOT_OPTIONS_WORD_FASTER)
        HealBot_Options_OverrideBarUpdateFreq:SetValue(HealBot_Globals.OverrideEffects["FLUIDFREQ"] or 10)
        HealBot_Options_SetText(HealBot_Options_OverrideBarUpdateFreq, HEALBOT_OPTION_BARUPDFREQ)
        HealBot_Options_sliderlabels_Init(HealBot_Options_OverrideHotBarDimming,HEALBOT_OPTION_NONHOTBARSDIMMING,12,44,1,4,HEALBOT_WORD_LOW,HEALBOT_WORD_HIGH)
        HealBot_Options_OverrideHotBarDimming:SetValue((HealBot_Globals.OverrideEffects["HBDIMMING"] or 2.2)*10)
        HealBot_Options_SetText(HealBot_Options_OverrideHotBarDimming, HEALBOT_OPTION_NONHOTBARSDIMMING)
        HealBot_Options_sliderlabels_Init(HealBot_Options_OverrideGroupHealthMinUnits,HEALBOT_OPTIONS_MINUNITS,3,25,1,3,3,25)
        HealBot_Options_OverrideGroupHealthMinUnits:SetValue(HealBot_Globals.OverrideEffects["GHMINUNITS"])
        HealBot_Options_SetText(HealBot_Options_OverrideGroupHealthMinUnits, HEALBOT_OPTIONS_MINUNITS.." "..HealBot_Globals.OverrideEffects["GHMINUNITS"])
        HealBot_Options_sliderlabels_Init(HealBot_Options_OverrideGroupHealthThres,HEALBOT_PLUGIN_AURAWATCHHEALTHBELOW,20,80,1,5,"20%","80%")
        HealBot_Options_OverrideGroupHealthThres:SetValue(HealBot_Globals.OverrideEffects["GHTHRESHOLD"])
        HealBot_Options_SetText(HealBot_Options_OverrideGroupHealthThres, HEALBOT_PLUGIN_AURAWATCHHEALTHBELOW.." "..HealBot_Globals.OverrideEffects["GHTHRESHOLD"].."%")
        HealBot_Options_sliderlabels_Init(HealBot_Options_OverrideGroupHealthDimming,HEALBOT_OPTION_NONGHDIMMING,0,44,1,4,HEALBOT_WORDS_NONE,HEALBOT_WORD_HIGH)
        HealBot_Options_OverrideGroupHealthDimming:SetValue((HealBot_Globals.OverrideEffects["GHDIMMING"])*10)
        HealBot_Options_SetText(HealBot_Options_OverrideGroupHealthDimming, HEALBOT_OPTION_NONGHDIMMING)
        HealBot_Options_SetLabel("HealBot_Options_OverrideHotBarDebuffPrio_FontStr",HEALBOT_OPTION_HOTBARSDEBUFFPRIO)
        HealBot_Options_SetLabel("HealBot_Options_OverrideGroupHealthRange_FontStr",HEALBOT_PLUGIN_ALERTRANGE)
        HealBot_Options_Override_EffectsUse_Toggle()
        HealBot_Options_DoEffects_DropDowns()
        HealBot_Options_SetEFGroups()
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_OverridesColourClassTab(tab)
      --HealBot_setCall("HealBot_Options_OverridesColourClassTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_TabRunOnce[tab]=true
        HealBot_Options_Override_ColoursClassUse.initialize=HealBot_Options_Override_ColoursClassUse_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Override_ColoursClassUse, HealBot_Options_UseOverrides_List[HealBot_Globals.OverrideColours["USECLASS"]])
        HealBot_Options_SetLabel("healbotOverride_ColoursClassfontstr",HEALBOT_OPTIONS_OVERRIDE_CLASSCOLS)
        HealBot_Options_SetLabel("HealBot_OverrideColClassDeathKnightpickt",HEALBOT_DEATHKNIGHT)
        HealBot_Options_SetLabel("HealBot_OverrideColClassDemonHunterpickt",HEALBOT_DEMONHUNTER)
        HealBot_Options_SetLabel("HealBot_OverrideColClassDruidpickt",HEALBOT_DRUID)
        HealBot_Options_SetLabel("HealBot_OverrideColClassEvokerpickt",HEALBOT_EVOKER)
        HealBot_Options_SetLabel("HealBot_OverrideColClassHunterpickt",HEALBOT_HUNTER)
        HealBot_Options_SetLabel("HealBot_OverrideColClassMagepickt",HEALBOT_MAGE)
        HealBot_Options_SetLabel("HealBot_OverrideColClassMonkpickt",HEALBOT_MONK)
        HealBot_Options_SetLabel("HealBot_OverrideColClassPaladinpickt",HEALBOT_PALADIN)
        HealBot_Options_SetLabel("HealBot_OverrideColClassPriestpickt",HEALBOT_PRIEST)
        HealBot_Options_SetLabel("HealBot_OverrideColClassRoguepickt",HEALBOT_ROGUE)
        HealBot_Options_SetLabel("HealBot_OverrideColClassShamanpickt",HEALBOT_SHAMAN)
        HealBot_Options_SetLabel("HealBot_OverrideColClassWarlockpickt",HEALBOT_WARLOCK)
        HealBot_Options_SetLabel("HealBot_OverrideColClassWarriorpickt",HEALBOT_WARRIOR)
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColClassDeathKnightpick, "Options_OverridesColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColClassDemonHunterpick, "Options_OverridesColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColClassDruidpick, "Options_OverridesColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColClassEvokerpick, "Options_OverridesColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColClassHunterpick, "Options_OverridesColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColClassMagepick, "Options_OverridesColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColClassMonkpick, "Options_OverridesColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColClassPaladinpick, "Options_OverridesColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColClassPriestpick, "Options_OverridesColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColClassRoguepick, "Options_OverridesColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColClassShamanpick, "Options_OverridesColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColClassWarlockpick, "Options_OverridesColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColClassWarriorpick, "Options_OverridesColourClassTab")
        HealBot_Options_OverrideColoursHidePowerAlt:SetChecked(HealBot_Globals.OverrideColours["HIDEALT"])
        HealBot_Options_SetText(HealBot_Options_OverrideColoursHidePowerAlt,HEALBOT_OPTION_HIDEPOWERALT)
        if HEALBOT_GAME_VERSION<5 then
            HealBot_OverrideColClassMonkpick:Hide()
            HealBot_Options_OverrideColClassMonkPresetColour:Hide()
            HealBot_Options_OverrideColClassMonkResetColour:Hide()
            HealBot_OverrideColClassEvokerpick:Hide()
            HealBot_Options_OverrideColClassEvokerPresetColour:Hide()
            HealBot_Options_OverrideColClassEvokerResetColour:Hide()
            HealBot_OverrideColClassDemonHunterpick:Hide()
            HealBot_Options_OverrideColClassDemonHunterPresetColour:Hide()
            HealBot_Options_OverrideColClassDemonHunterResetColour:Hide()
            if HEALBOT_GAME_VERSION<3 then
                HealBot_Options_OverrideColoursHidePowerAlt:Hide()
                HealBot_OverrideColClassDeathKnightpick:Hide()
                HealBot_Options_OverrideColClassDeathKnightPresetColour:Hide()
                HealBot_Options_OverrideColClassDeathKnightResetColour:Hide()
                HealBot_OverrideColClassDruidpick:SetPoint("TOPLEFT",120,-165)
                HealBot_OverrideColClassHunterpick:SetPoint("TOPLEFT",120,-220)
                HealBot_OverrideColClassMagepick:SetPoint("TOPLEFT",120,-275)
                HealBot_OverrideColClassPaladinpick:SetPoint("TOPLEFT",120,-330)
                HealBot_OverrideColClassPriestpick:SetPoint("TOPLEFT",120,-385)
                HealBot_OverrideColClassRoguepick:SetPoint("TOPLEFT",400,-165)
                HealBot_OverrideColClassShamanpick:SetPoint("TOPLEFT",400,-220)
                HealBot_OverrideColClassWarlockpick:SetPoint("TOPLEFT",400,-275)
                HealBot_OverrideColClassWarriorpick:SetPoint("TOPLEFT",400,-330)
            else
                HealBot_OverrideColClassDeathKnightpick:SetPoint("TOPLEFT",120,-165)
                HealBot_OverrideColClassHunterpick:SetPoint("TOPLEFT",120,-275)
                HealBot_OverrideColClassMagepick:SetPoint("TOPLEFT",120,-330)
                HealBot_OverrideColClassPaladinpick:SetPoint("TOPLEFT",120,-385)
            end
        end
        HealBot_Options_Override_ColoursClassUse_Toggle()
    end
end

function HealBot_Options_OverridesColourRoleTab(tab)
      --HealBot_setCall("HealBot_Options_OverridesColourRoleTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_TabRunOnce[tab]=true
        HealBot_Options_Override_ColoursRoleUse.initialize=HealBot_Options_Override_ColoursRoleUse_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Override_ColoursRoleUse, HealBot_Options_UseOverrides_List[HealBot_Globals.OverrideColours["USEROLE"]])
        HealBot_Options_SetLabel("healbotOverride_ColoursRolefontstr",HEALBOT_OPTIONS_OVERRIDE_ROLECOLS)
        HealBot_Options_SetLabel("HealBot_OverrideColRoleTankpickt",HEALBOT_WORD_TANK)
        HealBot_Options_SetLabel("HealBot_OverrideColRoleHealpickt",HEALBOT_WORD_HEALER)
        HealBot_Options_SetLabel("HealBot_OverrideColRoleDPSpickt",HEALBOT_WORD_DAMAGER)
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColRoleTankpick, "Options_OverridesColourRoleTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColRoleHealpick, "Options_OverridesColourRoleTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColRoleDPSpick, "Options_OverridesColourRoleTab")
        HealBot_Options_Override_ColoursRoleUse_Toggle()
    end
end

function HealBot_Options_OverridesColourPowerTab(tab)
      --HealBot_setCall("HealBot_Options_OverridesColourPowerTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_TabRunOnce[tab]=true
        HealBot_Options_Override_ColoursPowerUse.initialize=HealBot_Options_Override_ColoursPowerUse_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Override_ColoursPowerUse, HealBot_Options_UseOverrides_List[HealBot_Globals.OverrideColours["USEPOWER"]])
        HealBot_Options_SetLabel("healbotOverride_ColoursPowerfontstr",HEALBOT_OPTIONS_OVERRIDE_POWERCOLS)
        HealBot_Options_SetLabel("healbotOverride_ColoursPowerAltfontstr",HEALBOT_OPTION_POWERALT)
        HealBot_Options_SetLabel("HealBot_OverrideColPowerAstralpickt",HEALBOT_ASTRALPOWER)
        HealBot_Options_SetLabel("HealBot_OverrideColPowerEnergypickt",HEALBOT_ENERGY)
        HealBot_Options_SetLabel("HealBot_OverrideColPowerFocuspickt",HEALBOT_WORD_FOCUS)
        HealBot_Options_SetLabel("HealBot_OverrideColPowerFurypickt",HEALBOT_FURY)
        HealBot_Options_SetLabel("HealBot_OverrideColPowerManapickt",HEALBOT_MANA)
        HealBot_Options_SetLabel("HealBot_OverrideColPowerRagepickt",HEALBOT_RAGE)
        HealBot_Options_SetLabel("HealBot_OverrideColPowerRunicpickt",HEALBOT_RUNICPOWER)
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColPowerAstralpick, "Options_OverridesColourPowerTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColPowerEnergypick, "Options_OverridesColourPowerTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColPowerFocuspick, "Options_OverridesColourPowerTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColPowerFurypick, "Options_OverridesColourPowerTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColPowerManapick, "Options_OverridesColourPowerTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColPowerRagepick, "Options_OverridesColourPowerTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_OverrideColPowerRunicpick, "Options_OverridesColourPowerTab")
        if HEALBOT_GAME_VERSION<5 then
            HealBot_OverrideColPowerAstralpick:Hide()
            HealBot_Options_OverrideColPowerAstralPresetColour:Hide()
            HealBot_Options_OverrideColPowerAstralResetColour:Hide()
            HealBot_OverrideColPowerFocuspick:Hide()
            HealBot_Options_OverrideColPowerFocusPresetColour:Hide()
            HealBot_Options_OverrideColPowerFocusResetColour:Hide()
            HealBot_OverrideColPowerFurypick:Hide()
            HealBot_Options_OverrideColPowerFuryPresetColour:Hide()
            HealBot_Options_OverrideColPowerFuryResetColour:Hide()
            if HEALBOT_GAME_VERSION<3 then
                HealBot_OverrideColPowerRunicpick:Hide()
                HealBot_Options_OverrideColPowerRunicPresetColour:Hide()
                HealBot_Options_OverrideColPowerRunicResetColour:Hide()
                HealBot_OverrideColPowerEnergypick:SetPoint("TOPLEFT",180,-190)
                HealBot_OverrideColPowerManapick:SetPoint("TOPLEFT",180,-270)
                HealBot_OverrideColPowerRagepick:SetPoint("TOPLEFT",180,-350)
            else
                HealBot_OverrideColPowerEnergypick:SetPoint("TOPLEFT",180,-170)
                HealBot_OverrideColPowerManapick:SetPoint("TOPLEFT",180,-240)
                HealBot_OverrideColPowerRagepick:SetPoint("TOPLEFT",180,-310)
                HealBot_OverrideColPowerRunicpick:SetPoint("TOPLEFT",180,-380)
            end
        end
        HealBot_Options_Override_ColoursPowerUse_Toggle()
    end
end

function HealBot_Options_OverridesColourAdaptiveTab(tab)
      --HealBot_setCall("HealBot_Options_OverridesColourAdaptiveTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_SetAdpatvieColoursOrder(true)
        HealBot_Options_Override_ColoursAdaptiveUse.initialize=HealBot_Options_Override_ColoursAdaptiveUse_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Override_ColoursAdaptiveUse, HealBot_Options_UseOverrides_List[HealBot_Globals.OverrideColours["USEADAPTIVE"]])
        HealBot_Options_SetLabel("healbotOverride_ColoursAdaptivefontstr",HEALBOT_OPTIONS_OVERRIDE_ADAPTIVECOLS)
        HealBot_Options_Override_ColoursAdaptiveUse_Toggle()

        healbotOverride_ColoursAdaptivePlugin:SetChecked(HealBot_Globals.OverrideAdaptive["Plugin"])
        HealBot_Options_SetText(healbotOverride_ColoursAdaptivePlugin,HEALBOT_OPTIONS_PLUGINS)
        healbotOverride_ColoursAdaptiveRecentHeals:SetChecked(HealBot_Globals.OverrideAdaptive["RecentHeals"])
        HealBot_Options_SetText(healbotOverride_ColoursAdaptiveRecentHeals,HEALBOT_RECENTHEALS)
        healbotOverride_ColoursAdaptiveThreat:SetChecked(HealBot_Globals.OverrideAdaptive["Threat"])
        HealBot_Options_SetText(healbotOverride_ColoursAdaptiveThreat,HEALBOT_WORD_THREAT)
        healbotOverride_ColoursAdaptiveDebuffs:SetChecked(HealBot_Globals.OverrideAdaptive["Debuffs"])
        HealBot_Options_SetText(healbotOverride_ColoursAdaptiveDebuffs,HEALBOT_OPTIONS_TAB_DEBUFFS)
        healbotOverride_ColoursAdaptiveAggro:SetChecked(HealBot_Globals.OverrideAdaptive["Aggro"])
        HealBot_Options_SetText(healbotOverride_ColoursAdaptiveAggro,HEALBOT_OPTIONS_TAB_AGGRO)
        healbotOverride_ColoursAdaptiveHighlight:SetChecked(HealBot_Globals.OverrideAdaptive["Highlight"])
        HealBot_Options_SetText(healbotOverride_ColoursAdaptiveHighlight,HEALBOT_OPTION_HIGHLIGHTACTIVEBAR)
        healbotOverride_ColoursAdaptiveTarget:SetChecked(HealBot_Globals.OverrideAdaptive["Target"])
        HealBot_Options_SetText(healbotOverride_ColoursAdaptiveTarget,HEALBOT_OPTIONS_TARGETHEALS)
        healbotOverride_ColoursAdaptiveOOR:SetChecked(HealBot_Globals.OverrideAdaptive["OOR"])
        HealBot_Options_SetText(healbotOverride_ColoursAdaptiveOOR,HEALBOT_OUTOFRANGE_LABEL)
        healbotOverride_ColoursAdaptiveBuffs:SetChecked(HealBot_Globals.OverrideAdaptive["Buffs"])
        HealBot_Options_SetText(healbotOverride_ColoursAdaptiveBuffs,HEALBOT_OPTIONS_TAB_BUFFS)
        healbotOverride_ColoursAdaptiveOverheals:SetChecked(HealBot_Globals.OverrideAdaptive["Overheals"])
        HealBot_Options_SetText(healbotOverride_ColoursAdaptiveOverheals,HEALBOT_WORD_OVERHEALS)
        healbotOverride_ColoursAdaptiveAbsorbs:SetChecked(HealBot_Globals.OverrideAdaptive["Absorbs"])
        HealBot_Options_SetText(healbotOverride_ColoursAdaptiveAbsorbs,HEALBOT_WORD_ABSORBS)

        HealBot_Media_UpdateDefaultTexture(healbotOverride_ColoursAdaptiveRecentHealspick, "Options_OverridesColourAdaptiveTab")
        HealBot_Media_UpdateDefaultTexture(healbotOverride_ColoursAdaptiveThreatpick, "Options_OverridesColourAdaptiveTab")
        HealBot_Media_UpdateDefaultTexture(healbotOverride_ColoursAdaptiveAggropick, "Options_OverridesColourAdaptiveTab")
        HealBot_Media_UpdateDefaultTexture(healbotOverride_ColoursAdaptiveHighlightpick, "Options_OverridesColourAdaptiveTab")
        HealBot_Media_UpdateDefaultTexture(healbotOverride_ColoursAdaptiveTargetpick, "Options_OverridesColourAdaptiveTab")
        HealBot_Media_UpdateDefaultTexture(healbotOverride_ColoursAdaptiveOORpick, "Options_OverridesColourAdaptiveTab")
        HealBot_Media_UpdateDefaultTexture(healbotOverride_ColoursAdaptiveOverhealspick, "Options_OverridesColourAdaptiveTab")
        HealBot_Media_UpdateDefaultTexture(healbotOverride_ColoursAdaptiveAbsorbspick, "Options_OverridesColourAdaptiveTab")
        healbotOverride_ColoursAdaptivePluginButton:SetText(HEALBOT_OPTIONS_PLUGINCOLS)
        healbotOverride_ColoursAdaptiveDebuffButton:SetText(HEALBOT_OPTIONS_DEBUFFCOLS)
        healbotOverride_ColoursAdaptiveBuffsButton:SetText(HEALBOT_OPTIONS_BUFFCOLS)
        HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
    end
end

function HealBot_Options_OverrideChatTab(tab)
      --HealBot_setCall("HealBot_Options_OverrideChatTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_Override_ChatUse.initialize=HealBot_Options_Override_ChatUse_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Override_ChatUse, HealBot_Options_UseOverrides_List[HealBot_Globals.OverrideChat["USE"]])
        g=_G["HealBot_OverrideChat_FontStr"]
        g:SetTextColor(1,1,1,1)
        g:SetText(HEALBOT_OPTIONS_TAB_CHAT)
        HealBot_Options_SetLabel("healbotOverride_Chatfontstr",HEALBOT_OPTIONS_OVERRIDE_CHAT)
        HealBot_Options_SetLabel("HealBot_Options_OverrideNotifyOtherMsgTxt",HEALBOT_OPTIONS_NOTIFY_MSG.."  ("..HEALBOT_OPTIONS_CASTNOTIFYTAGS..")")
        HealBot_Options_val_OnLoad(HealBot_Options_OverrideAfterCombatOOMValue,HEALBOT_OPTIONS_EOC_OOM_VALUE,1,50,1,5)
        HealBot_Options_OverrideAfterCombatOOMValue:SetValue(HealBot_Globals.OverrideChat["EOCOOMV"] or 20)
        HealBot_Options_SetText(HealBot_Options_OverrideAfterCombatOOMValue,HEALBOT_OPTIONS_EOC_OOM_VALUE..": "..HealBot_Globals.OverrideChat["EOCOOMV"].."%")
        HealBot_Options_OverrideAfterCombatOOM:SetChecked(HealBot_Globals.OverrideChat["EOCOOM"])
        HealBot_Options_SetText(HealBot_Options_OverrideAfterCombatOOM,HEALBOT_OPTIONS_EOC_OOM)
        HealBot_Options_OverrideCastNotify_OnClick(nil,HealBot_Globals.OverrideChat["NOTIFY"])
        HealBot_Options_OverrideNotifyOtherMsg:SetText(HealBot_Globals.OverrideChat["MSG"])
        HealBot_Options_OverrideCastNotifyResOnly:SetChecked(HealBot_Globals.OverrideChat["RESONLY"])
        HealBot_Options_SetText(HealBot_Options_OverrideCastNotifyResOnly,HEALBOT_OPTIONS_CASTNOTIFYRESONLY)
        HealBot_Options_SetText(HealBot_Options_OverrideCastNotify1,HEALBOT_OPTIONS_CASTNOTIFY1)
        HealBot_Options_SetText(HealBot_Options_OverrideCastNotify2,HEALBOT_OPTIONS_CASTNOTIFY2)
        HealBot_Options_SetText(HealBot_Options_OverrideCastNotify3,HEALBOT_OPTIONS_CASTNOTIFY3)
        HealBot_Options_SetText(HealBot_Options_OverrideCastNotify4,HEALBOT_OPTIONS_CASTNOTIFY4)
        HealBot_Options_SetText(HealBot_Options_OverrideCastNotify5,HEALBOT_OPTIONS_CASTNOTIFY5)
        HealBot_Options_SetText(HealBot_Options_OverrideCastNotify6,HEALBOT_OPTIONS_CASTNOTIFY6)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_OverrideFramesTab(tab)
      --HealBot_setCall("HealBot_Options_OverrideFramesTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_Override_FramesUse.initialize=HealBot_Options_Override_FramesUse_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Override_FramesUse, HealBot_Options_UseOverrides_List[HealBot_Globals.OverrideFrames["USE"]])
        g=_G["HealBot_OverrideFrames_FontStr"]
        g:SetTextColor(1,1,1,1)
        g:SetText(HEALBOT_OPTIONS_TAB_FRAMES)
        HealBot_Options_SetLabel("healbotOverride_Framesfontstr",HEALBOT_OPTIONS_OVERRIDE_FRAMES)
        HealBot_Options_OverridePartyFrames:SetChecked(HealBot_Globals.OverrideFrames["HIDEPARTYF"])
        HealBot_Options_SetText(HealBot_Options_OverridePartyFrames,HEALBOT_OPTIONS_HIDEPARTYFRAMES)
        HealBot_Options_OverrideAlwaysRunEvents:SetChecked(HealBot_Globals.OverrideFrames["RUNBLIZZEVENTS"])
        HealBot_Options_SetText(HealBot_Options_OverrideAlwaysRunEvents,HEALBOT_OPTIONS_ALWAYRUNEVENTS)
        HealBot_Options_OverridePlayerTargetFrames:SetChecked(HealBot_Globals.OverrideFrames["HIDEPTF"])
        HealBot_Options_SetText(HealBot_Options_OverridePlayerTargetFrames,HEALBOT_OPTIONS_HIDEPLAYERTARGET)

        if HEALBOT_GAME_VERSION<2 then
            HealBot_Options_OverrideFocusFrame:Hide()
            HealBot_Options_OverrideMiniBossFrames:Hide()
            HealBot_Options_OverrideAlwaysRunEvents:SetPoint("TOP",-55,-150)
            HealBot_Options_OverridePartyFrames:SetPoint("TOP",-55,-240)
            HealBot_Options_OverrideRaidFrames:SetPoint("TOPLEFT",HealBot_Options_OverridePartyFrames,"BOTTOMLEFT",0,-55)
        else
            HealBot_Options_OverrideMiniBossFrames:SetChecked(HealBot_Globals.OverrideFrames["HIDEBOSSF"])
            HealBot_Options_SetText(HealBot_Options_OverrideMiniBossFrames,HEALBOT_OPTIONS_HIDEMINIBOSSFRAMES)
            HealBot_Options_OverrideFocusFrame:SetChecked(HealBot_Globals.OverrideFrames["HIDEFOCUSF"])
            HealBot_Options_SetText(HealBot_Options_OverrideFocusFrame,HEALBOT_OPTIONS_HIDEFOCUSFRAME)
        end
        HealBot_Options_OverrideRaidFrames:SetChecked(HealBot_Globals.OverrideFrames["HIDERAIDF"])
        HealBot_Options_SetText(HealBot_Options_OverrideRaidFrames,HEALBOT_OPTIONS_HIDERAIDFRAMES)
        g=_G["HealBot_Options_OverrideEffectbTxt"]
        g:SetText(HEALBOT_OPTIONS_TAB_EFFECTS)
        g=_G["HealBot_OverrideGeneralSkinBlizz_FontStr"]
        g:SetText(HEALBOT_OPTIONS_BLIZZARD_FRAMES)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_WarnOnSelfCast(wId)
      --HealBot_setCall("HealBot_Options_WarnOnSelfCast")
    if hb_lVars["SpellsTabOpenWarnId"] == wId then
        if GetModifiedClick("SELFCAST")~="NONE" then
            healbotSelfCastWarning:SetText("WARNING: Self Cast Key is set to modifier "..GetModifiedClick("SELFCAST").." in your UI settings")
        else
            local autoSelfCast=C_CVar.GetCVar("autoSelfCast")
            if autoSelfCast and tonumber(autoSelfCast) == 1 then
                healbotSelfCastWarning:SetText("WARNING: Auto Self Cast is turned on in your UI settings")
            else
                healbotSelfCastWarning:SetText("")
            end
        end
        C_Timer.After(1, function() HealBot_Options_WarnOnSelfCast(wId) end)
    end
end

function HealBot_Options_SpellsTab(tab)
      --HealBot_setCall("HealBot_Options_SpellsTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Timers_Set("INIT","SpellsTabText")
        local g=_G["healbotspellshelphealfontstr"]
        g:SetText(HEALBOT_OPTIONS_TAB_SPELLS)
        HealBot_Options_SetLabel("HealBot_Options_SelectSpellsFrame_TextH1",hbOptionText[1])
        HealBot_Options_SetLabel("HealBot_Options_SelectSpellsFrame_TextH2",hbOptionText[2])
        HealBot_Options_UseIconCmds:SetChecked(HealBot_Globals.UseIconCommands)
        HealBot_Options_SetText(HealBot_Options_UseIconCmds,HEALBOT_OPTIONS_USEICONCMDS)
        HealBot_Options_ModKeyShift:SetChecked(hb_lVars["ModKeyShift"])
        HealBot_Options_SetText(HealBot_Options_ModKeyShift,HEALBOT_OPTIONS_SHIFT)
        HealBot_Options_ModKeyCtrl:SetChecked(hb_lVars["ModKeyCtrl"])
        HealBot_Options_SetText(HealBot_Options_ModKeyCtrl,HEALBOT_OPTIONS_CTRL)
        HealBot_Options_ModKeyAlt:SetChecked(hb_lVars["ModKeyAlt"])
        HealBot_Options_SetText(HealBot_Options_ModKeyAlt,HEALBOT_OPTIONS_ALT)
        HealBot_Options_SpellTargetLastTarget:SetChecked(HealBot_Config_Spells.SpellTargetLastTarget[hb_lVars["ActionBarsComboTxt"]])
        HealBot_Options_SetText(HealBot_Options_SpellTargetLastTarget,HEALBOT_OPTIONS_SPELLSTARGETLASTTARGET)
        g=_G["HealBot_Options_HealSpellsSelect"]
        g:SetText(HEALBOT_WORD_SELECT)
        HealBot_Options_SetLabel("healbotspellshelpmacrofontstr",HEALBOT_WORD_MACROS)
        g=_G["HealBot_Options_MacrosSelect"]
        g:SetText(HEALBOT_WORD_SELECT)
        HealBot_Options_SetLabel("healbotspellshelpitemsfontstr",HEALBOT_OPTIONS_ITEMS)
        g=_G["HealBot_Options_ItemsSelect"]
        g:SetText(HEALBOT_WORD_SELECT)
        HealBot_Options_SetLabel("healbotspellshelpcmdsfontstr",HEALBOT_WORD_COMMANDS)
        g=_G["HealBot_Options_CmdsSelect"]
        g:SetText(HEALBOT_WORD_SELECT)
        g=_G["HealBot_Options_EmotesSelect"]
        g:SetText(HEALBOT_WORD_SELECT)
        HealBot_Options_SetLabel("healbotspellshelpemotesfontstr",HEALBOT_EMOTES)
        g=_G["HealBot_Options_CancelHelpSelect"]
        g:SetText(HEALBOT_WORD_CANCEL)
        HealBot_Options_SetLabel("HealBot_Options_SmartCastSpellTxt",HEALBOT_OPTIONS_SMARTCASTSPELLS)
        HealBot_Options_ButtonCastMethod.initialize=HealBot_Options_ButtonCastMethod_DropDown
        UIDropDownMenu_SetText(HealBot_Options_ButtonCastMethod, HealBot_Options_ButtonCastMethod_List[HealBot_Config_Spells.ButtonCastMethod])
        HealBot_Options_ActionBarsCombo.initialize=HealBot_Options_ActionBarsCombo_DropDown
        UIDropDownMenu_SetText(HealBot_Options_ActionBarsCombo, HealBot_Options_ActionBarsCombo_List[hb_lVars["ActionBarsCombo"]])
        HealBot_Options_SmartCastBuff:SetChecked(HealBot_Globals.SmartCastBuff)
        HealBot_Options_SetText(HealBot_Options_SmartCastBuff,HEALBOT_OPTIONS_SMARTCASTBUFF)
        HealBot_Options_SmartCastRes:SetChecked(HealBot_Globals.SmartCastRes)
        HealBot_Options_SetText(HealBot_Options_SmartCastRes,HealBot_WoWAPI_SpellName(HEALBOT_RESURRECTION))
        HealBot_Options_SmartCastDisspell:SetChecked(HealBot_Globals.SmartCastDebuff)
        HealBot_Options_SetText(HealBot_Options_SmartCastDisspell,HEALBOT_OPTIONS_SMARTCASTDISPELL)
        HealBot_Options_ProtectPvP:SetChecked(HealBot_Globals.ProtectPvP)
        HealBot_Options_SetText(HealBot_Options_ProtectPvP,HEALBOT_OPTIONS_PROTECTPVP)
        HealBot_Options_EnableSmartCast:SetChecked(HealBot_Globals.SmartCast)
        HealBot_Options_SetText(HealBot_Options_EnableSmartCast,HEALBOT_OPTIONS_ENABLESMARTCAST)
        HealBot_Options_SetLabel("healbotspellshelphealfontstr",HEALBOT_OPTIONS_TAB_SPELLS)
        HealBot_Options_SetLabel("healbotsetspellsfontstr",HEALBOT_OPTIONS_SETSPELLS)
        HealBot_Options_SetLabel("HealBot_AutoTarget_ButtonText",HEALBOT_OPTIONS_COMBOAUTOTARGET)
        HealBot_Options_SetLabel("HealBot_AutoTrinket_ButtonText",HEALBOT_OPTIONS_COMBOAUTOTRINKET)
        HealBot_Options_SetLabel("HealBot_AvoidBC_ButtonText",HEALBOT_OPTIONS_AVOIDBLUECURSOR)
        HealBot_Options_SetLabel("healbotcastmethodfontstr",HEALBOT_OPTIONS_BUTTONCASTMETHOD)
        HealBot_Options_SetLabel("healbotmodkeyfontstr",HEALBOT_OPTIONS_MODIFIERKEYS)
        HealBot_Options_SetText(HealBot_SpellAutoTrinket1,HEALBOT_ONE)
        HealBot_Options_SetText(HealBot_SpellAutoTrinket2,HEALBOT_TWO)
        HealBot_Options_SetText(HealBot_ShiftSpellAutoTrinket1,HEALBOT_ONE)
        HealBot_Options_SetText(HealBot_ShiftSpellAutoTrinket2,HEALBOT_TWO)
        HealBot_Options_SetText(HealBot_CtrlSpellAutoTrinket1,HEALBOT_ONE)
        HealBot_Options_SetText(HealBot_CtrlSpellAutoTrinket2,HEALBOT_TWO)
        HealBot_Options_SetText(HealBot_AltSpellAutoTrinket1,HEALBOT_ONE)
        HealBot_Options_SetText(HealBot_AltSpellAutoTrinket2,HEALBOT_TWO)
        HealBot_Options_SetText(HealBot_CtrlShiftSpellAutoTrinket1,HEALBOT_ONE)
        HealBot_Options_SetText(HealBot_CtrlShiftSpellAutoTrinket2,HEALBOT_TWO)
        HealBot_Options_SetText(HealBot_Options_Button1,HEALBOT_OPTIONS_BUTTONLEFT)
        HealBot_Options_SetLabel("healbotspellshelpcmds1fontstr",HEALBOT_OPTIONS_BUTTONLEFT)
        HealBot_Options_SetLabel("healbotspellshelpcmds2fontstr",HEALBOT_OPTIONS_BUTTONMIDDLE)
        HealBot_Options_SetLabel("healbotspellshelpcmds3fontstr",HEALBOT_OPTIONS_BUTTONRIGHT)
        HealBot_Options_SetLabel("healbotspellshelpcmds4fontstr",HEALBOT_OPTIONS_BUTTON4)
        HealBot_Options_SetLabel("healbotspellshelpcmds5fontstr",HEALBOT_OPTIONS_BUTTON5)
        HealBot_Options_SetText(HealBot_Options_Button2,HEALBOT_OPTIONS_BUTTONMIDDLE)
        HealBot_Options_SetText(HealBot_Options_Button3,HEALBOT_OPTIONS_BUTTONRIGHT)
        HealBot_Options_SetText(HealBot_Options_Button4,HEALBOT_OPTIONS_BUTTON4)
        HealBot_Options_SetText(HealBot_Options_Button5,HEALBOT_OPTIONS_BUTTON5)
        HealBot_Options_SelectHealSpellsCombo.initialize=HealBot_Options_SelectHealSpellsCombo_DropDown
        UIDropDownMenu_SetText(HealBot_Options_SelectHealSpellsCombo, HEALBOT_OPTIONS_TAB_SPELLS)
        HealBot_Options_SelectMacrosCombo.initialize=HealBot_Options_SelectMacrosCombo_DropDown
        UIDropDownMenu_SetText(HealBot_Options_SelectMacrosCombo, HEALBOT_WORD_MACROS)
        HealBot_Options_SelectItemsCombo.initialize=HealBot_Options_SelectItemsCombo_DropDown
        UIDropDownMenu_SetText(HealBot_Options_SelectItemsCombo, HEALBOT_OPTIONS_ITEMS)
        HealBot_Options_SelectCmdsCombo.initialize=HealBot_Options_SelectCmdsCombo_DropDown
        UIDropDownMenu_SetText(HealBot_Options_SelectCmdsCombo, HEALBOT_WORD_COMMANDS)
        HealBot_Options_SelectEmotesCombo.initialize=HealBot_Options_SelectEmotesCombo_DropDown
        UIDropDownMenu_SetText(HealBot_Options_SelectEmotesCombo, HEALBOT_EMOTES)
        HealBot_Options_SelectIconCmds1Combo.initialize=HealBot_Options_SelectIconCmds1Combo_DropDown
        UIDropDownMenu_SetText(HealBot_Options_SelectIconCmds1Combo, HEALBOT_WORD_COMMANDS)
        HealBot_Options_SelectIconCmds2Combo.initialize=HealBot_Options_SelectIconCmds2Combo_DropDown
        UIDropDownMenu_SetText(HealBot_Options_SelectIconCmds2Combo, HEALBOT_WORD_COMMANDS)
        HealBot_Options_SelectIconCmds3Combo.initialize=HealBot_Options_SelectIconCmds3Combo_DropDown
        UIDropDownMenu_SetText(HealBot_Options_SelectIconCmds3Combo, HEALBOT_WORD_COMMANDS)
        HealBot_Options_SelectIconCmds4Combo.initialize=HealBot_Options_SelectIconCmds4Combo_DropDown
        UIDropDownMenu_SetText(HealBot_Options_SelectIconCmds4Combo, HEALBOT_WORD_COMMANDS)
        HealBot_Options_SelectIconCmds5Combo.initialize=HealBot_Options_SelectIconCmds5Combo_DropDown
        UIDropDownMenu_SetText(HealBot_Options_SelectIconCmds5Combo, HEALBOT_WORD_COMMANDS)
        healbotSelfCastWarning:SetTextColor(1,0.55,0.2,1)
        healbotSelfCastWarning:SetText("")
        HealBot_Options_InitBinds()
        HealBot_Options_SetLabel("healbotbinds1fontstr",HEALBOT_OPTIONS_COMBOBINDS)
        HealBot_Options_TabRunOnce[tab]=true
    end
    hb_lVars["SpellsTabOpenWarnId"]=GetTime()
    HealBot_Options_WarnOnSelfCast(hb_lVars["SpellsTabOpenWarnId"])
end

function HealBot_Options_SkinsGeneralTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsGeneralTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_SkinDefaultSolo:SetChecked(hbv_SkinDefault_GetData(Healbot_Config_Skins.Current_Skin,HEALBOT_WORD_SOLO) or false)
        HealBot_Options_SetText(HealBot_Options_SkinDefaultSolo,HEALBOT_WORD_SOLO)
        HealBot_Options_SkinDefaultParty:SetChecked(hbv_SkinDefault_GetData(Healbot_Config_Skins.Current_Skin,HEALBOT_WORD_PARTY))
        HealBot_Options_SetText(HealBot_Options_SkinDefaultParty,HEALBOT_WORD_PARTY)
        HealBot_Options_SkinDefaultRaid10:SetChecked(hbv_SkinDefault_GetData(Healbot_Config_Skins.Current_Skin,HEALBOT_OPTIONS_RAID10))
        HealBot_Options_SetText(HealBot_Options_SkinDefaultRaid10,HEALBOT_OPTIONS_RAID10)
        HealBot_Options_SkinDefaultRaid15:SetChecked(hbv_SkinDefault_GetData(Healbot_Config_Skins.Current_Skin,HEALBOT_OPTIONS_RAID15))
        HealBot_Options_SetText(HealBot_Options_SkinDefaultRaid15,HEALBOT_OPTIONS_RAID15)
        HealBot_Options_SkinDefaultRaid20:SetChecked(hbv_SkinDefault_GetData(Healbot_Config_Skins.Current_Skin,HEALBOT_OPTIONS_RAID20))
        HealBot_Options_SetText(HealBot_Options_SkinDefaultRaid20,HEALBOT_OPTIONS_RAID20)
        HealBot_Options_SkinDefaultRaid25:SetChecked(hbv_SkinDefault_GetData(Healbot_Config_Skins.Current_Skin,HEALBOT_OPTIONS_RAID25))
        HealBot_Options_SetText(HealBot_Options_SkinDefaultRaid25,HEALBOT_OPTIONS_RAID25)
        if HEALBOT_GAME_VERSION<2 then
            HealBot_Options_FocusFrame:Hide()
            HealBot_Options_MiniBossFrames:Hide()
            HealBot_Options_PartyFrames:SetPoint("TOPLEFT",50,-62)
            HealBot_Options_RaidFrames:SetPoint("TOPLEFT",HealBot_Options_PartyFrames,"TOPRIGHT",240,0)
        else
            HealBot_Options_MiniBossFrames:SetChecked(hbv_Skins_GetBoolean("General", "HIDEBOSSF"))
            HealBot_Options_SetText(HealBot_Options_MiniBossFrames,HEALBOT_OPTIONS_HIDEMINIBOSSFRAMES)
            HealBot_Options_FocusFrame:SetChecked(hbv_Skins_GetBoolean("General", "HIDEFOCUSF"))
            HealBot_Options_SetText(HealBot_Options_FocusFrame,HEALBOT_OPTIONS_HIDEFOCUSFRAME)
        end
        if HEALBOT_GAME_VERSION<4 then
            HealBot_Options_SkinDefaultPet:Hide()
            HealBot_Options_SkinDefaultArena:SetPoint("TOPLEFT",HealBot_Options_SkinDefaultSolo,"BOTTOMLEFT",40,-8)
        else
            HealBot_Options_SkinDefaultPet:SetChecked(hbv_SkinDefault_GetData(Healbot_Config_Skins.Current_Skin,HEALBOT_WORD_PETBATTLE))
            HealBot_Options_SetText(HealBot_Options_SkinDefaultPet,HEALBOT_WORD_PETBATTLE)
        end
        HealBot_Options_SkinDefaultRaid40:SetChecked(hbv_SkinDefault_GetData(Healbot_Config_Skins.Current_Skin,HEALBOT_OPTIONS_RAID40))
        HealBot_Options_SetText(HealBot_Options_SkinDefaultRaid40,HEALBOT_OPTIONS_RAID40)
        HealBot_Options_SkinDefaultArena:SetChecked(hbv_SkinDefault_GetData(Healbot_Config_Skins.Current_Skin,HEALBOT_WORD_ARENA))
        HealBot_Options_SetText(HealBot_Options_SkinDefaultArena,HEALBOT_WORD_ARENA)
        HealBot_Options_SkinDefaultBG10:SetChecked(hbv_SkinDefault_GetData(Healbot_Config_Skins.Current_Skin,HEALBOT_WORD_BG10))
        HealBot_Options_SetText(HealBot_Options_SkinDefaultBG10,HEALBOT_WORD_BG10)
        HealBot_Options_SkinDefaultBG15:SetChecked(hbv_SkinDefault_GetData(Healbot_Config_Skins.Current_Skin,HEALBOT_WORD_BG15))
        HealBot_Options_SetText(HealBot_Options_SkinDefaultBG15,HEALBOT_WORD_BG15)
        HealBot_Options_SkinDefaultBG20:SetChecked(hbv_SkinDefault_GetData(Healbot_Config_Skins.Current_Skin,HEALBOT_WORD_BG20))
        HealBot_Options_SetText(HealBot_Options_SkinDefaultBG20,HEALBOT_WORD_BG20)
        HealBot_Options_SkinDefaultBG25:SetChecked(hbv_SkinDefault_GetData(Healbot_Config_Skins.Current_Skin,HEALBOT_WORD_BG25))
        HealBot_Options_SetText(HealBot_Options_SkinDefaultBG25,HEALBOT_WORD_BG25)
        HealBot_Options_SkinDefaultBG40:SetChecked(hbv_SkinDefault_GetData(Healbot_Config_Skins.Current_Skin,HEALBOT_WORD_BG40))
        HealBot_Options_SetText(HealBot_Options_SkinDefaultBG40,HEALBOT_WORD_BG40)
        HealBot_Options_UseStickyFrames:SetChecked(hbv_Skins_GetBoolean("General", "STICKYFRAME"))
        HealBot_Options_SetText(HealBot_Options_UseStickyFrames,HEALBOT_OPTIONS_STICKYFRAMES)
        HealBot_Options_sliderlabels_Init(HealBot_Options_NotInUseOpacity,HEALBOT_OPTION_GLOBALDIMMING,10,40,1,5,HEALBOT_WORDS_NONE,HEALBOT_WORD_HIGH)
        HealBot_Options_NotInUseOpacity:SetValue(hbv_Skins_GetVar("General", "GLOBALDIMMING")*10)
        HealBot_Options_SetText(HealBot_Options_NotInUseOpacity,HEALBOT_OPTION_GLOBALDIMMING)
        HealBot_Options_PartyFrames:SetChecked(hbv_Skins_GetBoolean("General", "HIDEPARTYF"))
        HealBot_Options_SetText(HealBot_Options_PartyFrames,HEALBOT_OPTIONS_HIDEPARTYFRAMES)
        HealBot_Options_AlwaysRunEvents:SetChecked(hbv_Skins_GetBoolean("General", "RUNBLIZZEVENTS"))
        HealBot_Options_SetText(HealBot_Options_AlwaysRunEvents,HEALBOT_OPTIONS_ALWAYRUNEVENTS)
        HealBot_Options_UnitInCombat.initialize=HealBot_Options_UnitInCombat_DropDown
        UIDropDownMenu_SetText(HealBot_Options_UnitInCombat, HealBot_Options_Lists["UnitInCombat"][hbv_Skins_GetVar("General", "UNITINCOMBAT")])
        HealBot_Options_SetLabel("HealBot_UnitInCombat_Txt",HEALBOT_OPTIONS_UNITINCOMBAT)
        HealBot_Options_PlayerTargetFrames:SetChecked(hbv_Skins_GetBoolean("General", "HIDEPTF"))
        HealBot_Options_SetText(HealBot_Options_PlayerTargetFrames,HEALBOT_OPTIONS_HIDEPLAYERTARGET)
        HealBot_Options_RaidFrames:SetChecked(hbv_Skins_GetBoolean("General", "HIDERAIDF"))
        HealBot_Options_SetText(HealBot_Options_RaidFrames,HEALBOT_OPTIONS_HIDERAIDFRAMES)
        g=_G["HealBot_GeneralSkin_FontStr"]
        g:SetText(HEALBOT_OPTIONS_TAB_GENERAL)
        g:SetTextColor(1,1,1,1)
        g=_G["HealBot_GeneralSkinBlizz_FontStr"]
        g:SetText(HEALBOT_OPTIONS_BLIZZARD_FRAMES)
        HealBot_Options_SetLabel("HealBot_GeneralDefaultSkin_FontStr",HEALBOT_OPTIONS_SKINDEFAULTFOR)
        if strlen(HealBot_Config.Spec)>0 then
            HealBot_Options_SkinDefaultZone:ClearAllPoints();
            HealBot_Options_SkinDefaultZone:SetPoint("TOP",25,-120)
            HealBot_Options_SkinDefaultSpec:ClearAllPoints();
            HealBot_Options_SkinDefaultSpec:SetPoint("TOP",-125,-120)
            HealBot_Options_SkinDefaultSpec:Show()
            HealBot_Options_SkinDefaultZone_SetText()
            HealBot_Options_SkinDefaultSpec_SetText()
        else
            HealBot_Options_SkinDefaultZone:ClearAllPoints();
            HealBot_Options_SkinDefaultZone:SetPoint("TOP",-50,-120)
            HealBot_Options_SkinDefaultSpec:Hide()
            HealBot_Options_SkinDefaultZone_SetText()
        end
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsEffectsBorderTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsEffectsBorderTab")
    if not HealBot_Options_TabRunOnce[tab] then
        g=_G["HealBot_AuxBarsAssign_FontStr"]
        g:SetText(HEALBOT_OPTIONS_AUXFLASH)
        g=_G["HealBot_SkinsBorderHazardText"]
        g:SetText(HEALBOT_SKIN_BORDER_HAZARDU)
        g=_G["HealBot_SkinsGlowSizeText"]
        g:SetText(HEALBOT_SKIN_GLOWSIZE)
        g=_G["HealBot_HealthDrop_FontStr"]
        g:SetText(HEALBOT_OPTION_HEALTHDROPALERT)
        HealBot_Options_UseHealthDrop:SetChecked(hbv_Skins_GetBoolean("General", "FLUIDBARS"))
        HealBot_Options_SetText(HealBot_Options_UseHealthDrop,HEALBOT_OPTION_USE)
        HealBot_Options_sliderlabels_Init(HealBot_Options_HealthDropPct,HEALBOT_OPTION_HEALTHDROPPCT,250,750,10,5,"25%","75%")
        HealBot_Options_HealthDropPct:SetValue(hbv_Skins_GetVar("General", "HEALTHDROPPCT"))
        HealBot_Options_SetText(HealBot_Options_HealthDropPct, HEALBOT_OPTION_HEALTHDROPPCT..floor(hbv_Skins_GetVar("General", "HEALTHDROPPCT")/10).."%")
        HealBot_Options_sliderlabels_Init(HealBot_Options_HealthDropSpeed,HEALBOT_OPTION_HEALTHDROPSPEED,1,30,1,2,1,30)
        HealBot_Options_HealthDropSpeed:SetValue(hbv_Skins_GetVar("General", "HEALTHDROPTIME"))
        HealBot_Options_SetText(HealBot_Options_HealthDropSpeed, HEALBOT_OPTION_HEALTHDROPSPEED..": "..hbv_Skins_GetVar("General", "HEALTHDROPTIME").." "..HEALBOT_WORDS_SEC)
        HealBot_Options_sliderlabels_Init(HealBot_Options_HealthDropCancel,HEALBOT_OPTION_HEALTHDROPCANCEL,100,500,10,5,"10%","50%")
        HealBot_Options_HealthDropCancel:SetValue(hbv_Skins_GetVar("General", "HEALTHDROPCANCEL"))
        HealBot_Options_SetText(HealBot_Options_HealthDropCancel, HEALBOT_OPTION_HEALTHDROPCANCEL..": "..floor(hbv_Skins_GetVar("General", "HEALTHDROPCANCEL")/10).."%")
        HealBot_Options_sliderlabels_Init(HealBot_Options_AuxBarFlashFreq,HEALBOT_OPTIONS_AGGROFLASHFREQ,1,40,1,2,HEALBOT_OPTIONS_WORD_SLOWER,HEALBOT_OPTIONS_WORD_FASTER)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_AuxBarFlashAlphaMax,HEALBOT_OPTIONS_MAXALPHA,0.2,1,0.05,2)
        HealBot_Options_AuxBarFlashAlphaMax:SetValue(hbv_Skins_GetVar("General", "OMAX"))
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_AuxBarFlashAlphaMax)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_AuxBarFlashAlphaMin,HEALBOT_OPTIONS_MINALPHA,0,0.8,0.05,2)
        HealBot_Options_AuxBarFlashAlphaMin:SetValue(hbv_Skins_GetVar("General", "OMIN"))
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_AuxBarFlashAlphaMin)
        HealBot_Options_AuxBarFlashFreq:SetValue(hbv_Skins_GetVar("General", "OFREQ")*100)
        HealBot_Options_SetText(HealBot_Options_AuxBarFlashFreq,HEALBOT_OPTIONS_AGGROFLASHFREQ)
        HealBot_Options_sliderlabels_Init(HealBot_Options_BorderHazardFreq,HEALBOT_OPTIONS_AGGROFLASHFREQ,10,90,5,2,HEALBOT_OPTIONS_WORD_SLOWER,HEALBOT_OPTIONS_WORD_FASTER)
        HealBot_Options_BorderHazardFreq:SetValue((1-hbv_Skins_GetVar("General", "HAZARDFREQ"))*100)
        HealBot_Options_SetText(HealBot_Options_BorderHazardFreq, HEALBOT_OPTIONS_AGGROFLASHFREQ)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_BorderHazardMinAlpha,HEALBOT_OPTIONS_MINALPHA,0,0.75,0.05,2)
        HealBot_Options_BorderHazardMinAlpha:SetValue(hbv_Skins_GetVar("General", "HAZARDMINALPHA"))
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_BorderHazardMinAlpha)
        HealBot_Options_sliderlabels_Init(HealBot_Options_GlowSizeBar,HEALBOT_OPTIONS_ONBARS,1,5,1,1,HEALBOT_WORDS_SMALLER,HEALBOT_WORDS_LARGER)
        HealBot_Options_GlowSizeBar:SetValue(hbv_Skins_GetFrameVar("Frame", "GLOW", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_GlowSizeBar, HEALBOT_OPTIONS_ONBARS..": "..HealBot_Options_Lists["GlowSize"][hbv_Skins_GetFrameVar("Frame", "GLOW", hb_lVars["Frame"])])
        HealBot_Options_sliderlabels_Init(HealBot_Options_GlowSizeIcon,HEALBOT_OPTIONS_ONICONS,1,5,1,1,HEALBOT_WORDS_SMALLER,HEALBOT_WORDS_LARGER)
        HealBot_Options_GlowSizeIcon:SetValue(hbv_Skins_GetFrameVar("Frame", "ICONGLOW", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_GlowSizeIcon, HEALBOT_OPTIONS_ONICONS..": "..HealBot_Options_Lists["GlowSize"][hbv_Skins_GetFrameVar("Frame", "ICONGLOW", hb_lVars["Frame"])])

        g=_G["HealBot_Effects_FontStr"]
        g:SetTextColor(1,1,1,1)
        g:SetText(HEALBOT_SKIN_BORDERTEXT.." "..HEALBOT_OPTIONS_TAB_EFFECTS)
        
        HealBot_Options_Override_EffectsUse_Toggle()
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsEffectsBarsTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsEffectsBorderTab")
    if not HealBot_Options_TabRunOnce[tab] then
        g=_G["HealBot_SkinsFocusGroupsText"]
        g:SetText(HEALBOT_OPTIONS_FOCUSGROUPS)
        g=_G["HealBot_EffectsFluid_FontStr"]
        g:SetText(HEALBOT_OPTION_FLUIDBARS)
        g=_G["HealBot_HotBars_FontStr"]
        g:SetText(HEALBOT_OPTION_HOTBARS)
        g=_G["HealBot_GroupBars_FontStr"]
        g:SetText(HEALBOT_OPTIONS_GROUPHEALS)
        HealBot_Options_UseFluidBars:SetChecked(hbv_Skins_GetBoolean("General", "FLUIDBARS"))
        HealBot_Options_SetText(HealBot_Options_UseFluidBars,HEALBOT_OPTION_USE)
        HealBot_Options_sliderlabels_Init(HealBot_Options_BarUpdateFreq,HEALBOT_OPTION_BARUPDFREQ,1,19,1,2,HEALBOT_OPTIONS_WORD_SLOWER,HEALBOT_OPTIONS_WORD_FASTER)
        HealBot_Options_BarUpdateFreq:SetValue(hbv_Skins_GetVar("General", "FLUIDFREQ"))
        HealBot_Options_SetText(HealBot_Options_BarUpdateFreq,HEALBOT_OPTION_BARUPDFREQ)
        HealBot_Options_sliderlabels_Init(HealBot_Options_HotBarHealthThres,HEALBOT_OPTION_HOTBARHEALTHPCT,0,50,1,5,"0%","50%")
        HealBot_Options_HotBarHealthThres:SetValue(hbv_Skins_GetVar("General", "HOTBARHLTH"))
        HealBot_Options_SetText(HealBot_Options_HotBarHealthThres, HEALBOT_OPTION_HOTBARHEALTHPCT..hbv_Skins_GetVar("General", "HOTBARHLTH").."%")
        HealBot_Options_sliderlabels_Init(HealBot_Options_HotBarDimming,HEALBOT_OPTION_NONHOTBARSDIMMING,12,44,1,4,HEALBOT_WORD_LOW,HEALBOT_WORD_HIGH)
        HealBot_Options_HotBarDimming:SetValue(hbv_Skins_GetVar("General", "HBDIMMING")*10)
        HealBot_Options_SetText(HealBot_Options_HotBarDimming, HEALBOT_OPTION_NONHOTBARSDIMMING)
        HealBot_Options_EFGroupRaidOnly:SetChecked(hbv_Skins_GetBoolean("General", "FGRAIDONLY"))
        HealBot_Options_SetText(HealBot_Options_EFGroupRaidOnly,HEALBOT_OPTIONS_EMERGFILTERGROUPSRAID)
        HealBot_Options_sliderlabels_Init(HealBot_Options_FocusGroupDimming,HEALBOT_OPTION_FOCUSGROUPDIMMING,12,44,1,4,HEALBOT_WORD_LOW,HEALBOT_WORD_HIGH)
        HealBot_Options_FocusGroupDimming:SetValue(hbv_Skins_GetVar("General", "FGDIMMING")*10)
        
        HealBot_Options_sliderlabels_Init(HealBot_Options_GroupHealthMinUnits,HEALBOT_OPTIONS_MINUNITS,3,25,1,3,3,25)
        HealBot_Options_GroupHealthMinUnits:SetValue(hbv_Skins_GetVar("General", "GHMINUNITS"))
        HealBot_Options_SetText(HealBot_Options_GroupHealthMinUnits, HEALBOT_OPTIONS_MINUNITS.." "..hbv_Skins_GetVar("General", "GHMINUNITS"))
        HealBot_Options_sliderlabels_Init(HealBot_Options_GroupHealthThres,HEALBOT_PLUGIN_AURAWATCHHEALTHBELOW,20,80,1,5,"20%","80%")
        HealBot_Options_GroupHealthThres:SetValue(hbv_Skins_GetVar("General", "GHTHRESHOLD"))
        HealBot_Options_SetText(HealBot_Options_GroupHealthThres, HEALBOT_PLUGIN_AURAWATCHHEALTHBELOW.." "..hbv_Skins_GetVar("General", "GHTHRESHOLD").."%")
        HealBot_Options_sliderlabels_Init(HealBot_Options_GroupHealthDimming,HEALBOT_OPTION_NONGHDIMMING,0,44,1,4,HEALBOT_WORDS_NONE,HEALBOT_WORD_HIGH)
        HealBot_Options_GroupHealthDimming:SetValue(hbv_Skins_GetVar("General", "GHDIMMING")*10)
        HealBot_Options_SetText(HealBot_Options_GroupHealthDimming, HEALBOT_OPTION_NONGHDIMMING)
        HealBot_Options_SetText(HealBot_Options_FocusGroupDimming,HEALBOT_OPTION_FOCUSGROUPDIMMING)
        HealBot_Options_SetLabel("HealBot_SkinsFocusGroupsIncText",HEALBOT_OPTIONS_EMERGFILTERGROUPS)
        HealBot_Options_SetLabel("HealBot_Options_HotBarDebuffPrio_FontStr",HEALBOT_OPTION_HOTBARSDEBUFFPRIO)
        HealBot_Options_SetLabel("HealBot_Options_GroupHealthRange_FontStr",HEALBOT_PLUGIN_ALERTRANGE)
        HealBot_Options_DoEffects_DropDowns()
        HealBot_Options_SetEFGroups()
        g=_G["HealBot_EffectsBars_FontStr"]
        g:SetTextColor(1,1,1,1)
        g:SetText(HEALBOT_OPTIONS_TAB_BARS.." "..HEALBOT_OPTIONS_TAB_EFFECTS)
        HealBot_Options_Override_EffectsUse_Toggle()
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsColourClassTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsColourClassTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_TabRunOnce[tab]=true
        HealBot_Options_SetLabel("HealBot_ColClassDeathKnightpickt",HEALBOT_DEATHKNIGHT)
        HealBot_Options_SetLabel("HealBot_ColClassDemonHunterpickt",HEALBOT_DEMONHUNTER)
        HealBot_Options_SetLabel("HealBot_ColClassDruidpickt",HEALBOT_DRUID)
        HealBot_Options_SetLabel("HealBot_ColClassEvokerpickt",HEALBOT_EVOKER)
        HealBot_Options_SetLabel("HealBot_ColClassHunterpickt",HEALBOT_HUNTER)
        HealBot_Options_SetLabel("HealBot_ColClassMagepickt",HEALBOT_MAGE)
        HealBot_Options_SetLabel("HealBot_ColClassMonkpickt",HEALBOT_MONK)
        HealBot_Options_SetLabel("HealBot_ColClassPaladinpickt",HEALBOT_PALADIN)
        HealBot_Options_SetLabel("HealBot_ColClassPriestpickt",HEALBOT_PRIEST)
        HealBot_Options_SetLabel("HealBot_ColClassRoguepickt",HEALBOT_ROGUE)
        HealBot_Options_SetLabel("HealBot_ColClassShamanpickt",HEALBOT_SHAMAN)
        HealBot_Options_SetLabel("HealBot_ColClassWarlockpickt",HEALBOT_WARLOCK)
        HealBot_Options_SetLabel("HealBot_ColClassWarriorpickt",HEALBOT_WARRIOR)
        HealBot_Media_UpdateDefaultTexture(HealBot_ColClassDeathKnightpick, "Options_SkinsColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColClassDemonHunterpick, "Options_SkinsColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColClassDruidpick, "Options_SkinsColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColClassEvokerpick, "Options_SkinsColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColClassHunterpick, "Options_SkinsColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColClassMagepick, "Options_SkinsColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColClassMonkpick, "Options_SkinsColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColClassPaladinpick, "Options_SkinsColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColClassPriestpick, "Options_SkinsColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColClassRoguepick, "Options_SkinsColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColClassShamanpick, "Options_SkinsColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColClassWarlockpick, "Options_SkinsColourClassTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColClassWarriorpick, "Options_SkinsColourClassTab")
        if HEALBOT_GAME_VERSION<5 then
            HealBot_ColClassMonkpick:Hide()
            HealBot_Options_SkinColClassMonkPresetColour:Hide()
            HealBot_Options_SkinColClassMonkResetColour:Hide()
            HealBot_ColClassEvokerpick:Hide()
            HealBot_Options_SkinColClassEvokerPresetColour:Hide()
            HealBot_Options_SkinColClassEvokerResetColour:Hide()
            HealBot_ColClassDemonHunterpick:Hide()
            HealBot_Options_SkinColClassDemonHunterPresetColour:Hide()
            HealBot_Options_SkinColClassDemonHunterResetColour:Hide()
            if HEALBOT_GAME_VERSION<3 then
                HealBot_ColClassDeathKnightpick:Hide()
                HealBot_Options_SkinColClassDeathKnightPresetColour:Hide()
                HealBot_Options_SkinColClassDeathKnightResetColour:Hide()
                HealBot_ColClassDruidpick:SetPoint("TOPLEFT",120,-125)
                HealBot_ColClassHunterpick:SetPoint("TOPLEFT",120,-175)
                HealBot_ColClassMagepick:SetPoint("TOPLEFT",120,-225)
                HealBot_ColClassPaladinpick:SetPoint("TOPLEFT",120,-275)
                HealBot_ColClassPriestpick:SetPoint("TOPLEFT",120,-325)
                HealBot_ColClassRoguepick:SetPoint("TOPLEFT",400,-125)
                HealBot_ColClassShamanpick:SetPoint("TOPLEFT",400,-175)
                HealBot_ColClassWarlockpick:SetPoint("TOPLEFT",400,-225)
                HealBot_ColClassWarriorpick:SetPoint("TOPLEFT",400,-275)
            else
                HealBot_ColClassDeathKnightpick:SetPoint("TOPLEFT",120,-125)
                HealBot_ColClassHunterpick:SetPoint("TOPLEFT",120,-225)
                HealBot_ColClassMagepick:SetPoint("TOPLEFT",120,-275)
                HealBot_ColClassPaladinpick:SetPoint("TOPLEFT",120,-325)
            end
        end
        HealBot_Options_Override_ColoursClassUse_Toggle()
    end
end

function HealBot_Options_SkinsColourRoleTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsColourRoleTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_TabRunOnce[tab]=true
        HealBot_Options_SetLabel("HealBot_ColRoleTankpickt",HEALBOT_WORD_TANK)
        HealBot_Options_SetLabel("HealBot_ColRoleHealpickt",HEALBOT_WORD_HEALER)
        HealBot_Options_SetLabel("HealBot_ColRoleDPSpickt",HEALBOT_WORD_DAMAGER)
        HealBot_Media_UpdateDefaultTexture(HealBot_ColRoleTankpick, "Options_SkinsColourRoleTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColRoleHealpick, "Options_SkinsColourRoleTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColRoleDPSpick, "Options_SkinsColourRoleTab")
        HealBot_Options_Override_ColoursRoleUse_Toggle()
    end
end

function HealBot_Options_SkinsColourPowerTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsColourPowerTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_TabRunOnce[tab]=true
        HealBot_Options_SkinColHidePowerAlt:SetChecked(hbv_Skins_GetBoolean("General", "HIDEALT"))
        HealBot_Options_SetText(HealBot_Options_SkinColHidePowerAlt,HEALBOT_OPTION_HIDEPOWERALT)
        HealBot_Options_SetLabel("HealBot_ColPowerAstralpickt",HEALBOT_ASTRALPOWER)
        HealBot_Options_SetLabel("HealBot_ColPowerEnergypickt",HEALBOT_ENERGY)
        HealBot_Options_SetLabel("HealBot_ColPowerFocuspickt",HEALBOT_WORD_FOCUS)
        HealBot_Options_SetLabel("HealBot_ColPowerFurypickt",HEALBOT_FURY)
        HealBot_Options_SetLabel("HealBot_ColPowerManapickt",HEALBOT_MANA)
        HealBot_Options_SetLabel("HealBot_ColPowerRagepickt",HEALBOT_RAGE)
        HealBot_Options_SetLabel("HealBot_ColPowerRunicpickt",HEALBOT_RUNICPOWER)
        HealBot_Options_SetLabel("healbotSkinColPowerAltfontstr",HEALBOT_OPTIONS_OVERRIDE_POWERCOLS)
        HealBot_Media_UpdateDefaultTexture(HealBot_ColPowerAstralpick, "Options_SkinsColourPowerTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColPowerEnergypick, "Options_SkinsColourPowerTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColPowerFocuspick, "Options_SkinsColourPowerTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColPowerFurypick, "Options_SkinsColourPowerTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColPowerManapick, "Options_SkinsColourPowerTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColPowerRagepick, "Options_SkinsColourPowerTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_ColPowerRunicpick, "Options_SkinsColourPowerTab")
        if HEALBOT_GAME_VERSION<5 then
            HealBot_ColPowerAstralpick:Hide()
            HealBot_Options_SkinColPowerAstralPresetColour:Hide()
            HealBot_Options_SkinColPowerAstralResetColour:Hide()
            HealBot_ColPowerFocuspick:Hide()
            HealBot_Options_SkinColPowerFocusPresetColour:Hide()
            HealBot_Options_SkinColPowerFocusResetColour:Hide()
            HealBot_ColPowerFurypick:Hide()
            HealBot_Options_SkinColPowerFuryPresetColour:Hide()
            HealBot_Options_SkinColPowerFuryResetColour:Hide()
            if HEALBOT_GAME_VERSION<3 then
                HealBot_Options_SkinColHidePowerAlt:Hide()
                HealBot_ColPowerRunicpick:Hide()
                HealBot_Options_SkinColPowerRunicPresetColour:Hide()
                HealBot_Options_SkinColPowerRunicResetColour:Hide()
                HealBot_ColPowerEnergypick:SetPoint("TOPLEFT",180,-140)
                HealBot_ColPowerManapick:SetPoint("TOPLEFT",180,-220)
                HealBot_ColPowerRagepick:SetPoint("TOPLEFT",180,-300)
            else
                HealBot_ColPowerEnergypick:SetPoint("TOPLEFT",180,-100)
                HealBot_ColPowerManapick:SetPoint("TOPLEFT",180,-180)
                HealBot_ColPowerRagepick:SetPoint("TOPLEFT",180,-260)
                HealBot_ColPowerRunicpick:SetPoint("TOPLEFT",180,-340)
            end
        end
        HealBot_Options_Override_ColoursPowerUse_Toggle()
    end
end

function HealBot_Options_SkinsColourAdaptiveTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsColourAdaptiveTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_SetAdpatvieColoursOrder(false)
        HealBot_Options_Override_ColoursAdaptiveUse_Toggle()

        HealBot_Options_ColoursAdaptivePlugin:SetChecked(hbv_Skins_GetBoolean("Adaptive", "Plugin"))
        HealBot_Options_SetText(HealBot_Options_ColoursAdaptivePlugin,HEALBOT_OPTIONS_PLUGINS)
        HealBot_Options_ColoursAdaptiveRecentHeals:SetChecked(hbv_Skins_GetBoolean("Adaptive", "RecentHeals"))
        HealBot_Options_SetText(HealBot_Options_ColoursAdaptiveRecentHeals,HEALBOT_RECENTHEALS)
        HealBot_Options_ColoursAdaptiveThreat:SetChecked(hbv_Skins_GetBoolean("Adaptive", "Threat"))
        HealBot_Options_SetText(HealBot_Options_ColoursAdaptiveThreat,HEALBOT_WORD_THREAT)
        HealBot_Options_ColoursAdaptiveDebuffs:SetChecked(hbv_Skins_GetBoolean("Adaptive", "Debuffs"))
        HealBot_Options_SetText(HealBot_Options_ColoursAdaptiveDebuffs,HEALBOT_OPTIONS_TAB_DEBUFFS)
        HealBot_Options_ColoursAdaptiveAggro:SetChecked(hbv_Skins_GetBoolean("Adaptive", "Aggro"))
        HealBot_Options_SetText(HealBot_Options_ColoursAdaptiveAggro,HEALBOT_OPTIONS_TAB_AGGRO)
        HealBot_Options_ColoursAdaptiveHighlight:SetChecked(hbv_Skins_GetBoolean("Adaptive", "Highlight"))
        HealBot_Options_SetText(HealBot_Options_ColoursAdaptiveHighlight,HEALBOT_OPTION_HIGHLIGHTACTIVEBAR)
        HealBot_Options_ColoursAdaptiveTarget:SetChecked(hbv_Skins_GetBoolean("Adaptive", "Target"))
        HealBot_Options_SetText(HealBot_Options_ColoursAdaptiveTarget,HEALBOT_OPTIONS_TARGETHEALS)
        HealBot_Options_ColoursAdaptiveOOR:SetChecked(hbv_Skins_GetBoolean("Adaptive", "OOR"))
        HealBot_Options_SetText(HealBot_Options_ColoursAdaptiveOOR,HEALBOT_OUTOFRANGE_LABEL)
        HealBot_Options_ColoursAdaptiveBuffs:SetChecked(hbv_Skins_GetBoolean("Adaptive", "Buffs"))
        HealBot_Options_SetText(HealBot_Options_ColoursAdaptiveBuffs,HEALBOT_OPTIONS_TAB_BUFFS)
        HealBot_Options_ColoursAdaptiveOverheals:SetChecked(hbv_Skins_GetBoolean("Adaptive", "Overheals"))
        HealBot_Options_SetText(HealBot_Options_ColoursAdaptiveOverheals,HEALBOT_WORD_OVERHEALS)
        HealBot_Options_ColoursAdaptiveAbsorbs:SetChecked(hbv_Skins_GetBoolean("Adaptive", "Absorbs"))
        HealBot_Options_SetText(HealBot_Options_ColoursAdaptiveAbsorbs,HEALBOT_WORD_ABSORBS)

        HealBot_Media_UpdateDefaultTexture(HealBot_Options_ColoursAdaptiveRecentHealspick, "Options_SkinsColourAdaptiveTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_Options_ColoursAdaptiveThreatpick, "Options_SkinsColourAdaptiveTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_Options_ColoursAdaptiveAggropick, "Options_SkinsColourAdaptiveTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_Options_ColoursAdaptiveHighlightpick, "Options_SkinsColourAdaptiveTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_Options_ColoursAdaptiveTargetpick, "Options_SkinsColourAdaptiveTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_Options_ColoursAdaptiveOORpick, "Options_SkinsColourAdaptiveTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_Options_ColoursAdaptiveOverhealspick, "Options_SkinsColourAdaptiveTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_Options_ColoursAdaptiveAbsorbspick, "Options_SkinsColourAdaptiveTab")
        HealBot_Options_ColoursAdaptivePluginButton:SetText(HEALBOT_OPTIONS_PLUGINCOLS)
        HealBot_Options_ColoursAdaptiveDebuffButton:SetText(HEALBOT_OPTIONS_DEBUFFCOLS)
        HealBot_Options_ColoursAdaptiveBuffsButton:SetText(HEALBOT_OPTIONS_BUFFCOLS)
        HealBot_Timers_Set("LAST","AdaptiveColourUpdate")
    end
end

function HealBot_Options_SkinsEnemyAuraTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsEnemyAuraTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_EnemyShowBuffs:SetChecked(hbv_Skins_GetBoolean("Enemy", "SHOWBUFFS"))
        HealBot_Options_SetText(HealBot_Options_EnemyShowBuffs,HEALBOT_OPTIONS_TAB_BUFFS)
        HealBot_Options_EnemyShowBuffsSelfOnly:SetChecked(hbv_Skins_GetBoolean("Enemy", "SELFBUFFS"))
        HealBot_Options_SetText(HealBot_Options_EnemyShowBuffsSelfOnly,HEALBOT_OPTIONS_SELFCASTS)
        HealBot_Options_EnemyShowDebuffs:SetChecked(hbv_Skins_GetBoolean("Enemy", "SHOWDEBUFFS"))
        HealBot_Options_SetText(HealBot_Options_EnemyShowDebuffs,HEALBOT_OPTIONS_TAB_DEBUFFS)
        HealBot_Options_EnemyShowDebuffsSelfOnly:SetChecked(hbv_Skins_GetBoolean("Enemy", "SELFDEBUFFS"))
        HealBot_Options_SetText(HealBot_Options_EnemyShowDebuffsSelfOnly,HEALBOT_OPTIONS_SELFCASTS)
        HealBot_Options_EnemyShowBuffsPlayerFrames:SetChecked(hbv_Skins_GetBoolean("Enemy", "SHOWBUFFSPLAYERFRAMES"))
        HealBot_Options_SetText(HealBot_Options_EnemyShowBuffsPlayerFrames,HEALBOT_OPTIONS_TAB_BUFFS)
        HealBot_Options_EnemyShowBuffsSelfOnlyPlayerFrames:SetChecked(hbv_Skins_GetBoolean("Enemy", "SELFBUFFSPLAYERFRAMES"))
        HealBot_Options_SetText(HealBot_Options_EnemyShowBuffsSelfOnlyPlayerFrames,HEALBOT_OPTIONS_SELFCASTS)
        HealBot_Options_EnemyShowDebuffsPlayerFrames:SetChecked(hbv_Skins_GetBoolean("Enemy", "SHOWDEBUFFSPLAYERFRAMES"))
        HealBot_Options_SetText(HealBot_Options_EnemyShowDebuffsPlayerFrames,HEALBOT_OPTIONS_TAB_DEBUFFS)
        HealBot_Options_EnemyShowDebuffsSelfOnlyPlayerFrames:SetChecked(hbv_Skins_GetBoolean("Enemy", "SELFDEBUFFSPLAYERFRAMES"))
        HealBot_Options_SetText(HealBot_Options_EnemyShowDebuffsSelfOnlyPlayerFrames,HEALBOT_OPTIONS_SELFCASTS)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsUnitTargetsTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsUnitTargetsTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ShowEnemyIncSelf:SetChecked(hbv_Skins_GetBoolean("Enemy", "INCSELF"))
        HealBot_Options_SetText(HealBot_Options_ShowEnemyIncSelf,HEALBOT_ENEMY_INCLUDE_SELF)
        HealBot_Options_ShowEnemyIncTanks:SetChecked(hbv_Skins_GetBoolean("Enemy", "INCTANKS"))
        HealBot_Options_SetText(HealBot_Options_ShowEnemyIncTanks,HEALBOT_ENEMY_INCLUDE_TANKS)
        HealBot_Options_ShowEnemyIncGroup:SetChecked(hbv_Skins_GetVar("Enemy", "INCGROUP"))
        HealBot_Options_SetText(HealBot_Options_ShowEnemyIncGroup,HEALBOT_ENEMY_INCLUDE_GROUP)
        HealBot_Options_ShowEnemyIncRaid:SetChecked(hbv_Skins_GetVar("Enemy", "INCRAID"))
        HealBot_Options_SetText(HealBot_Options_ShowEnemyIncRaid,HEALBOT_ENEMY_INCLUDE_RAID)
        HealBot_Options_ShowEnemyIncMyTargets:SetChecked(hbv_Skins_GetBoolean("Enemy", "INCMYTAR"))
        HealBot_Options_SetText(HealBot_Options_ShowEnemyIncMyTargets,HEALBOT_ENEMY_INCLUDE_MYTARGETS)
        HealBot_Options_TargetUsesEnemyCols:SetChecked(hbv_Skins_GetBoolean("Enemy", "TARUSEENEMYCOLS"))
        HealBot_Options_SetText(HealBot_Options_TargetUsesEnemyCols,HEALBOT_ENEMY_TARUSESENEMYCOLS)
        HealBot_Options_EnemyCombatSelf.initialize=HealBot_Options_EnemyCombatSelf_DropDown
        UIDropDownMenu_SetText(HealBot_Options_EnemyCombatSelf, HealBot_Options_EnemyCombat_List[hbv_Skins_GetVar("Enemy", "INCOMBATSHOWSELF")])
        HealBot_Options_EnemyCombatTanks.initialize=HealBot_Options_EnemyCombatTanks_DropDown
        UIDropDownMenu_SetText(HealBot_Options_EnemyCombatTanks, HealBot_Options_EnemyCombat_List[hbv_Skins_GetVar("Enemy", "INCOMBATSHOWTANK")])
        HealBot_Options_EnemyCombatGroup.initialize=HealBot_Options_EnemyCombatGroup_DropDown
        UIDropDownMenu_SetText(HealBot_Options_EnemyCombatGroup, HealBot_Options_EnemyCombat_List[hbv_Skins_GetVar("Enemy", "INCOMBATSHOWGROUP")])
        HealBot_Options_EnemyCombatRaid.initialize=HealBot_Options_EnemyCombatRaid_DropDown
        UIDropDownMenu_SetText(HealBot_Options_EnemyCombatRaid, HealBot_Options_EnemyCombat_List[hbv_Skins_GetVar("Enemy", "INCOMBATSHOWRAID")])
        HealBot_Options_EnemyCombatMyTargets.initialize=HealBot_Options_EnemyCombatMyTargets_DropDown
        UIDropDownMenu_SetText(HealBot_Options_EnemyCombatMyTargets, HealBot_Options_EnemyCombat_List[hbv_Skins_GetVar("Enemy", "INCOMBATSHOWLIST")])
        HealBot_Options_EnemyExistsPlayerTargets.initialize=HealBot_Options_EnemyExistsPlayerTargets_DropDown
        UIDropDownMenu_SetText(HealBot_Options_EnemyExistsPlayerTargets, HealBot_Options_EnemyOOC_List[hbv_Skins_GetVar("Enemy", "EXISTSHOWPTAR")])
        HealBot_Options_EnemyExistsTankTargets.initialize=HealBot_Options_EnemyExistsTankTargets_DropDown
        UIDropDownMenu_SetText(HealBot_Options_EnemyExistsTankTargets, HealBot_Options_EnemyOOC_List[hbv_Skins_GetVar("Enemy", "EXISTSHOWTANK")])
        HealBot_Options_EnemyExistsGroupTargets.initialize=HealBot_Options_EnemyExistsGroupTargets_DropDown
        UIDropDownMenu_SetText(HealBot_Options_EnemyExistsGroupTargets, HealBot_Options_EnemyOOC_List[hbv_Skins_GetVar("Enemy", "EXISTSHOWGROUP")])
        HealBot_Options_EnemyExistsRaidTargets.initialize=HealBot_Options_EnemyExistsRaidTargets_DropDown
        UIDropDownMenu_SetText(HealBot_Options_EnemyExistsRaidTargets, HealBot_Options_EnemyOOC_List[hbv_Skins_GetVar("Enemy", "EXISTSHOWRAID")])
        HealBot_Options_EnemyExistsMyTargets.initialize=HealBot_Options_EnemyExistsMyTargets_DropDown
        UIDropDownMenu_SetText(HealBot_Options_EnemyExistsMyTargets, HealBot_Options_EnemyOOC_List[hbv_Skins_GetVar("Enemy", "EXISTSHOWMYTAR")])
        HealBot_Options_UseFrameGroup.initialize=HealBot_Options_UseFrameGroup_DropDown
        UIDropDownMenu_SetText(HealBot_Options_UseFrameGroup, HealBot_Options_Lists["EnemyUseFrame"][hbv_Skins_GetVar("Enemy", "GROUPUSEFRAME")])
        HealBot_Options_UseFrameRaid.initialize=HealBot_Options_UseFrameRaid_DropDown
        UIDropDownMenu_SetText(HealBot_Options_UseFrameRaid, HealBot_Options_Lists["EnemyUseFrame"][hbv_Skins_GetVar("Enemy", "RAIDUSEFRAME")])
        HealBot_Options_UseFrameTanks.initialize=HealBot_Options_UseFrameTanks_DropDown
        UIDropDownMenu_SetText(HealBot_Options_UseFrameTanks, HealBot_Options_Lists["EnemyUseFrame"][hbv_Skins_GetVar("Enemy", "TANKUSEFRAME")])
        HealBot_Options_UseFrameMyTargets.initialize=HealBot_Options_UseFrameMyTargets_DropDown
        UIDropDownMenu_SetText(HealBot_Options_UseFrameMyTargets, HealBot_Options_Lists["EnemyUseFrame"][hbv_Skins_GetVar("Enemy", "PRIVATELISTUSEFRAME")])
        HealBot_Options_UseFrameSelf.initialize=HealBot_Options_UseFrameSelf_DropDown
        UIDropDownMenu_SetText(HealBot_Options_UseFrameSelf, HealBot_Options_Lists["EnemyUseFrame"][hbv_Skins_GetVar("Enemy", "SELFUSEFRAME")])
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_PlayerTargetSize,HEALBOT_PLAYER_TARGET_SIZE,0.1,2,0.01,5)
        HealBot_Options_PlayerTargetSize:SetValue(hbv_Skins_GetVar("Enemy", "PLAYERTARGETSIZE"))
        HealBot_Options_SetText(HealBot_Options_PlayerTargetSize,HEALBOT_PLAYER_TARGET_SIZE..": "..(hbv_Skins_GetVar("Enemy", "PLAYERTARGETSIZE")*100).."%")
        for x=1,5 do
            HealBot_Options_SetLabel("HealBot_EnemyOOC_FontStr"..x,HEALBOT_OPTIONS_OUTOFCOMBAT)
            HealBot_Options_SetLabel("HealBot_EnemyCombat_FontStr"..x,HEALBOT_OPTIONS_ENTERINGCOMBAT)
            HealBot_Options_SetLabel("HealBot_EnemyUseFrame_FontStr"..x,HEALBOT_ENEMY_USE_FRAME)
        end
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsEnemyUnitsTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsEnemyUnitsTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ShowEnemyIncArena:SetChecked(hbv_Skins_GetBoolean("Enemy", "INCARENA"))
        HealBot_Options_SetText(HealBot_Options_ShowEnemyIncArena,HEALBOT_ENEMY_INCLUDE_ARENA)
        HealBot_Options_ShowEnemyIncFocus:SetChecked(hbv_Skins_GetBoolean("Enemy", "INCFOCUS"))
        HealBot_Options_SetText(HealBot_Options_ShowEnemyIncFocus,HEALBOT_ENEMY_INCLUDE_FOCUS)
        HealBot_Options_ShowEnemyIncArenaPets:SetChecked(hbv_Skins_GetBoolean("Enemy", "INCARENAPETS"))
        HealBot_Options_SetText(HealBot_Options_ShowEnemyIncArenaPets,HEALBOT_ENEMY_INCLUDE_ARENAPETS)
        HealBot_Options_val_OnLoad(HealBot_Options_ShowEnemyNumBoss,HEALBOT_ENEMY_NUMBER_BOSSES,0,8,1,1)
        HealBot_Options_ShowEnemyNumBoss:SetValue(hbv_Skins_GetVar("Enemy", "NUMBOSS"))
        HealBot_Options_SetText(HealBot_Options_ShowEnemyNumBoss,HEALBOT_ENEMY_NUMBER_BOSSES..": "..hbv_Skins_GetVar("Enemy", "NUMBOSS"))
        HealBot_Options_EnemyExistsBosses:SetChecked(hbv_Skins_GetBoolean("Enemy", "EXISTSHOWBOSS"))
        HealBot_Options_SetText(HealBot_Options_EnemyExistsBosses,HEALBOT_ENEMY_EXISTS_SHOW)
        HealBot_Options_EnemyCombatArena.initialize=HealBot_Options_EnemyCombatArena_DropDown
        UIDropDownMenu_SetText(HealBot_Options_EnemyCombatArena, HealBot_Options_EnemyCombat_List[hbv_Skins_GetVar("Enemy", "INCOMBATSHOWARENA")])
        HealBot_Options_EnemyExistsArena.initialize=HealBot_Options_EnemyExistsArena_DropDown
        UIDropDownMenu_SetText(HealBot_Options_EnemyExistsArena, HealBot_Options_EnemyOOC_List[hbv_Skins_GetVar("Enemy", "EXISTSHOWARENA")])
        HealBot_Options_EnemyCombatFocus.initialize=HealBot_Options_EnemyCombatFocus_DropDown
        UIDropDownMenu_SetText(HealBot_Options_EnemyCombatFocus, HealBot_Options_EnemyCombat_List[hbv_Skins_GetVar("Enemy", "INCOMBATSHOWFOCUS")])
        HealBot_Options_EnemyExistsFocus.initialize=HealBot_Options_EnemyExistsFocus_DropDown
        UIDropDownMenu_SetText(HealBot_Options_EnemyExistsFocus, HealBot_Options_EnemyOOC_List[hbv_Skins_GetVar("Enemy", "EXISTSHOWFOCUS")])
        for x=1,2 do
            HealBot_Options_SetLabel("HealBot_EnemyUnitsOOC_FontStr"..x,HEALBOT_OPTIONS_OUTOFCOMBAT)
            HealBot_Options_SetLabel("HealBot_EnemyUnitsCombat_FontStr"..x,HEALBOT_OPTIONS_ENTERINGCOMBAT)
        end
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsEnemyTargetOfTargetTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsEnemyTargetOfTargetTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ShowEnemyTargets:SetChecked(hbv_Skins_GetBoolean("Enemy", "ENEMYTARGET"))
        HealBot_Options_SetText(HealBot_Options_ShowEnemyTargets,HEALBOT_ENEMY_SHOW_TARGET)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_EnemyTargetSize,HEALBOT_ENEMY_TARGET_SIZE,0.2,0.8,0.01,5)
        HealBot_Options_EnemyTargetSize:SetValue(hbv_Skins_GetVar("Enemy", "ENEMYTARGETSIZE"))
        HealBot_Options_SetText(HealBot_Options_EnemyTargetSize,HEALBOT_ENEMY_TARGET_SIZE..": "..(hbv_Skins_GetVar("Enemy", "ENEMYTARGETSIZE")*100).."%")
        HealBot_Options_ShowEnemyTargetsPlayerFrames:SetChecked(hbv_Skins_GetVar("Enemy", "ENEMYTARGETPLAYERFRAMES"))
        HealBot_Options_SetText(HealBot_Options_ShowEnemyTargetsPlayerFrames,HEALBOT_ENEMY_SHOW_TARGET)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_EnemyTargetSizePlayerFrames,HEALBOT_ENEMY_TARGET_SIZE,0.2,0.8,0.01,5)
        HealBot_Options_EnemyTargetSizePlayerFrames:SetValue(hbv_Skins_GetVar("Enemy", "ENEMYTARGETSIZEPLAYERFRAMES"))
        HealBot_Options_SetText(HealBot_Options_EnemyTargetSizePlayerFrames,HEALBOT_ENEMY_TARGET_SIZE..": "..(hbv_Skins_GetVar("Enemy", "ENEMYTARGETSIZEPLAYERFRAMES")*100).."%")
        HealBot_Options_ToTUsesEnemyCols:SetChecked(hbv_Skins_GetBoolean("Enemy", "TOTUSEENEMYCOLS"))
        HealBot_Options_SetText(HealBot_Options_ToTUsesEnemyCols,HEALBOT_ENEMY_TOTUSESENEMYCOLS)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsChatTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsChatTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_CastNotify_OnClick(nil,hbv_Skins_GetVar("Chat", "NOTIFY"))
        HealBot_Options_NotifyOtherMsg:SetText(hbv_Skins_GetVar("Chat", "MSG"))
        HealBot_Options_CastNotifyResOnly:SetChecked(hbv_Skins_GetBoolean("Chat", "RESONLY"))
        HealBot_Options_SetText(HealBot_Options_CastNotifyResOnly,HEALBOT_OPTIONS_CASTNOTIFYRESONLY)
        HealBot_Options_SetText(HealBot_Options_CastNotify1,HEALBOT_OPTIONS_CASTNOTIFY1)
        HealBot_Options_SetText(HealBot_Options_CastNotify2,HEALBOT_OPTIONS_CASTNOTIFY2)
        HealBot_Options_SetText(HealBot_Options_CastNotify3,HEALBOT_OPTIONS_CASTNOTIFY3)
        HealBot_Options_SetText(HealBot_Options_CastNotify4,HEALBOT_OPTIONS_CASTNOTIFY4)
        HealBot_Options_SetText(HealBot_Options_CastNotify5,HEALBOT_OPTIONS_CASTNOTIFY5)
        HealBot_Options_SetText(HealBot_Options_CastNotify6,HEALBOT_OPTIONS_CASTNOTIFY6)
        HealBot_Options_SetLabel("HealBot_Options_NotifyOtherMsgTxt",HEALBOT_OPTIONS_NOTIFY_MSG.."  ("..HEALBOT_OPTIONS_CASTNOTIFYTAGS..")")
        g=_G["HealBot_HealButtons_ChatFrameTxt"]
        g:SetText(HEALBOT_OPTIONS_HEAL_CHATOPT)
        g:SetTextColor(1,1,1,1)
        HealBot_Options_AfterCombatOOM:SetChecked(hbv_Skins_GetBoolean("Chat", "EOCOOM"))
        HealBot_Options_SetText(HealBot_Options_AfterCombatOOM,HEALBOT_OPTIONS_EOC_OOM)
        HealBot_Options_val_OnLoad(HealBot_Options_AfterCombatOOMValue,HEALBOT_OPTIONS_EOC_OOM_VALUE,1,50,1,5)
        HealBot_Options_AfterCombatOOMValue:SetValue(hbv_Skins_GetVar("Chat", "EOCOOMV") or 20)
        HealBot_Options_SetText(HealBot_Options_AfterCombatOOMValue,HEALBOT_OPTIONS_EOC_OOM_VALUE..": "..hbv_Skins_GetVar("Chat", "EOCOOMV").."%")
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesGeneralTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesGeneralTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ActionAnchor.initialize=HealBot_Options_ActionAnchor_DropDown
        UIDropDownMenu_SetText(HealBot_Options_ActionAnchor, HealBot_Options_ActionAnchor_List[hbv_Skins_GetFrameVar("Anchors", "FRAME", hb_lVars["Frame"])])
        HealBot_Options_ActionBarsAnchor.initialize=HealBot_Options_ActionBarsAnchor_DropDown
        UIDropDownMenu_SetText(HealBot_Options_ActionBarsAnchor, HealBot_Options_ActionAnchor_List[hbv_Skins_GetFrameVar("Anchors", "BARS", hb_lVars["Frame"])])
        HealBot_Options_TooltipPos.initialize=HealBot_Options_TooltipPos_DropDown
        UIDropDownMenu_SetText(HealBot_Options_TooltipPos, HealBot_Options_Lists["TooltipPos"][hbv_Skins_GetFrameVar("Frame", "TIPLOC", hb_lVars["Frame"])])
        HealBot_Options_SetLabel("healbotframelockedfontstr",HEALBOT_OPTIONS_ACTIONLOCKED)
        HealBot_Options_SetLabel("HealBot_Options_FrameAliasFixedFrame",HealBot_Options_HealGroupsFrame_List[hb_lVars["Frame"]])
        HealBot_Options_SetLabel("healbotframeautoshowfontstr",HEALBOT_OPTIONS_AUTOSHOW)
        HealBot_Options_SetLabel("healbotframeanchorfontstr",HEALBOT_OPTIONS_ANCHOR)
        HealBot_Options_SetLabel("healbotbarsanchorfontstr",HEALBOT_OPTIONS_BARSANCHOR)
        HealBot_Options_SetLabel("healbotbarsgrowdirectionfontstr",HEALBOT_OPTIONS_GROW_DIRECTION)
        HealBot_Options_SetLabel("healbotbarsorientationfontstr",HEALBOT_OPTIONS_BARSORIENTATION)
        HealBot_Options_val2_OnLoad(HealBot_FrameScale,HEALBOT_OPTIONS_FRAMESCALE,2.5,40,0.5,10,5)
        HealBot_FrameScale:SetValue(hbv_Skins_GetFrameVar("Frame", "SCALE", hb_lVars["Frame"])*10)
        HealBot_Options_SetText(HealBot_FrameScale,HEALBOT_OPTIONS_FRAMESCALE..": "..hbv_Skins_GetFrameVar("Frame", "SCALE", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_FrameStickyOffsetHorizontal,HEALBOT_OPTIONS_STICKFRAMEOFFSETH,-150,150,1,10)
        HealBot_FrameStickyOffsetHorizontal:SetValue(hbv_Skins_GetFrameVar("Frame", "SFOFFSETH", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_FrameStickyOffsetHorizontal,HEALBOT_OPTIONS_STICKFRAMEOFFSETH..": "..hbv_Skins_GetFrameVar("Frame", "SFOFFSETH", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_FrameStickyOffsetVertical,HEALBOT_OPTIONS_STICKFRAMEOFFSETV,-100,100,1,10)
        HealBot_FrameStickyOffsetVertical:SetValue(hbv_Skins_GetFrameVar("Frame", "SFOFFSETV", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_FrameStickyOffsetVertical,HEALBOT_OPTIONS_STICKFRAMEOFFSETV..": "..hbv_Skins_GetFrameVar("Frame", "SFOFFSETV", hb_lVars["Frame"]))
        HealBot_Options_SetFrameCols()
        HealBot_Options_ActionLocked.initialize=HealBot_Options_ActionLocked_DropDown
        UIDropDownMenu_SetText(HealBot_Options_ActionLocked, HealBot_Options_Lists["Lock"][hbv_Skins_GetFrameVar("Frame", "LOCKED", hb_lVars["Frame"])])
        HealBot_Options_AutoShow.initialize=HealBot_Options_AutoShow_DropDown
        UIDropDownMenu_SetText(HealBot_Options_AutoShow, HealBot_Options_Lists["AutoShow"][hbv_Skins_GetFrameVar("Frame", "AUTOCLOSE", hb_lVars["Frame"])])
        HealBot_Options_SetText(HealBot_Options_FrameAlias,HEALBOT_OPTIONS_FRAME_ALIAS)
        HealBot_Options_val_OnLoad(HealBot_Options_FramePadding,HEALBOT_OPTION_FRAMEPADDING,0,10,1,2)
        HealBot_Options_FramePadding:SetValue(hbv_Skins_GetFrameVar("Frame", "PADDING", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_FramePadding,HEALBOT_OPTION_FRAMEPADDING..": "..hbv_Skins_GetFrameVar("Frame", "PADDING", hb_lVars["Frame"]))

        if hb_lVars["Frame"]<6 then
            local aliasText=HEALBOT_OPTIONS_FRAME.." "..hb_lVars["Frame"]
            if string.len(hbv_Skins_GetFrameVar("FrameAlias", "ALIAS", hb_lVars["Frame"]))>0 then
                aliasText=hbv_Skins_GetFrameVar("FrameAlias", "ALIAS", hb_lVars["Frame"])
            end
            if HealBot_Options_FrameAlias:GetText()~=aliasText then
                HealBot_Options_FrameAlias:SetText(aliasText)
            end
        end
        HealBot_Options_BarsGrowDirection.initialize=HealBot_Options_BarsGrowDirection_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarsGrowDirection, HealBot_Options_BarsGrowDirection_List[hbv_Skins_GetFrameVar("Anchors", "GROW", hb_lVars["Frame"])])
        HealBot_Options_BarsOrientation.initialize=HealBot_Options_BarsOrientation_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarsOrientation, HealBot_Options_BarsOrientation_List[hbv_Skins_GetFrameVar("HealBar", "OFIX", hb_lVars["Frame"])])
        HealBot_Options_ActionAnchor_SetAlpha(hb_lVars["Frame"])
        HealBot_Options_SetLabel("HealBot_Options_TooltipPosTxt",HEALBOT_OPTIONS_POSTOOLTIP)
        HealBot_Options_SetLabel("healbotbacktextfontstr",HEALBOT_SKIN_BACKTEXT)
        HealBot_Options_SetLabel("healbotbordertextfontstr",HEALBOT_SKIN_BORDERTEXT)
        HealBot_Options_SetLabel("HealBot_FramesCoordsText",HEALBOT_OPTIONS_COORDINATES)
        HealBot_Options_SetLabel("HealBot_FramesCoordsXText","X")
        HealBot_Options_SetLabel("HealBot_FramesCoordsYText","Y")
        if not hb_lVars["SetNewSkin"] then HealBot_Action_setPoint(hb_lVars["Frame"], true) end
        HealBot_Options_CoordsFixed:SetChecked(hbv_Skins_GetFrameBoolean("Anchors", "RealFixed", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_CoordsFixed,HEALBOT_OPTIONS_COORDINATESFIXED)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesHealGroupsTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesHealGroupsTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_FrameAliasList()
        for id=1,15 do
            g=_G["HealBot_Options_HealGroups"..id]
            g:SetChecked(Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][id]["STATE"])
            HealBot_Options_SetLabel("HealBot_Options_HealGroups"..id.."Text",HealBot_HealGroupsTrans[Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][id]["NAME"]])
        end
        HealBot_Options_HealGroups1Frame.initialize=HealBot_Options_HealGroups1Frame_DropDown
        UIDropDownMenu_SetText(HealBot_Options_HealGroups1Frame, HealBot_Options_HealGroupsFrame_List[Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][1]["FRAME"]])
        HealBot_Options_HealGroups2Frame.initialize=HealBot_Options_HealGroups2Frame_DropDown
        UIDropDownMenu_SetText(HealBot_Options_HealGroups2Frame, HealBot_Options_HealGroupsFrame_List[Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][2]["FRAME"]])
        HealBot_Options_HealGroups3Frame.initialize=HealBot_Options_HealGroups3Frame_DropDown
        UIDropDownMenu_SetText(HealBot_Options_HealGroups3Frame, HealBot_Options_HealGroupsFrame_List[Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][3]["FRAME"]])
        HealBot_Options_HealGroups4Frame.initialize=HealBot_Options_HealGroups4Frame_DropDown
        UIDropDownMenu_SetText(HealBot_Options_HealGroups4Frame, HealBot_Options_HealGroupsFrame_List[Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][4]["FRAME"]])
        HealBot_Options_HealGroups5Frame.initialize=HealBot_Options_HealGroups5Frame_DropDown
        UIDropDownMenu_SetText(HealBot_Options_HealGroups5Frame, HealBot_Options_HealGroupsFrame_List[Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][5]["FRAME"]])
        HealBot_Options_HealGroups6Frame.initialize=HealBot_Options_HealGroups6Frame_DropDown
        UIDropDownMenu_SetText(HealBot_Options_HealGroups6Frame, HealBot_Options_HealGroupsFrame_List[Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][6]["FRAME"]])
        HealBot_Options_HealGroups7Frame.initialize=HealBot_Options_HealGroups7Frame_DropDown
        UIDropDownMenu_SetText(HealBot_Options_HealGroups7Frame, HealBot_Options_HealGroupsFrame_List[Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][7]["FRAME"]])
        HealBot_Options_HealGroups8Frame.initialize=HealBot_Options_HealGroups8Frame_DropDown
        UIDropDownMenu_SetText(HealBot_Options_HealGroups8Frame, HealBot_Options_HealGroupsFrame_List[Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][8]["FRAME"]])
        HealBot_Options_HealGroups9Frame.initialize=HealBot_Options_HealGroups9Frame_DropDown
        UIDropDownMenu_SetText(HealBot_Options_HealGroups9Frame, HealBot_Options_HealGroupsFrame_List[Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][9]["FRAME"]])
        HealBot_Options_HealGroups10Frame.initialize=HealBot_Options_HealGroups10Frame_DropDown
        UIDropDownMenu_SetText(HealBot_Options_HealGroups10Frame, HealBot_Options_HealGroupsFrame_List[Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][10]["FRAME"]])
        HealBot_Options_HealGroups11Frame.initialize=HealBot_Options_HealGroups11Frame_DropDown
        UIDropDownMenu_SetText(HealBot_Options_HealGroups11Frame, HealBot_Options_HealGroupsFrame_List[Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][11]["FRAME"]])
        HealBot_Options_HealGroups12Frame.initialize=HealBot_Options_HealGroups12Frame_DropDown
        UIDropDownMenu_SetText(HealBot_Options_HealGroups12Frame, HealBot_Options_HealGroupsFrame_List[Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][12]["FRAME"]])
        HealBot_Options_HealGroups13Frame.initialize=HealBot_Options_HealGroups13Frame_DropDown
        UIDropDownMenu_SetText(HealBot_Options_HealGroups13Frame, HealBot_Options_HealGroupsFrame_List[Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][13]["FRAME"]])
        HealBot_Options_HealGroups14Frame.initialize=HealBot_Options_HealGroups14Frame_DropDown
        UIDropDownMenu_SetText(HealBot_Options_HealGroups14Frame, HealBot_Options_HealGroupsFrame_List[Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][14]["FRAME"]])
        HealBot_Options_HealGroups15Frame.initialize=HealBot_Options_HealGroups15Frame_DropDown
        UIDropDownMenu_SetText(HealBot_Options_HealGroups15Frame, HealBot_Options_HealGroupsFrame_List[Healbot_Config_Skins.HealGroups[Healbot_Config_Skins.Current_Skin][15]["FRAME"]])
        HealBot_Options_SetLabel("HealBot_HealButtonsFrames1_Text",HEALBOT_OPTIONS_FRAME)
        HealBot_Options_SetLabel("HealBot_HealButtonsFrames8_Text",HEALBOT_OPTIONS_FRAME)
        HealBot_Options_SetLabel("HealBot_HealButtonsGroups1_Text",HEALBOT_SORTBY_GROUP)
        HealBot_Options_SetLabel("HealBot_HealButtonsGroups8_Text",HEALBOT_SORTBY_GROUP)
        HealBot_Options_HealGroupsAllowDups:SetChecked(Healbot_Config_Skins.DuplicateBars[Healbot_Config_Skins.Current_Skin])
        HealBot_Options_SetText(HealBot_Options_HealGroupsAllowDups,HEALBOT_ALLOW_DUPLICATES)
        HealBot_Options_HealGroupsAllowDupsIncPrivList:SetChecked(Healbot_Config_Skins.DupBarsPrivList[Healbot_Config_Skins.Current_Skin])
        HealBot_Options_SetText(HealBot_Options_HealGroupsAllowDupsIncPrivList,HEALBOT_ALLOW_DUPLICATESINCPRIVLISTS)
        if HEALBOT_GAME_VERSION<3 then
            HealBot_Options_HealGroups9:Hide()
            HealBot_Options_HealGroups9Frame:Hide()
            HealBot_Options_HealGroups10:ClearAllPoints()
            HealBot_Options_HealGroups10:SetPoint("TOPLEFT",HealBot_Options_HealGroups8,"TOPLEFT",0,-50)
            if HEALBOT_GAME_VERSION<2 then
                HealBot_Options_HealGroups13:Hide()
                HealBot_Options_HealGroups13Frame:Hide()
                HealBot_Options_HealGroups14:Hide()
                HealBot_Options_HealGroups14Frame:Hide()
                HealBot_Options_HealGroups15:ClearAllPoints()
                HealBot_Options_HealGroups15:SetPoint("TOPLEFT",HealBot_Options_HealGroups12,"TOPLEFT",0,-50)
            end
        end
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesHeadersBarsTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesHeadersBarsTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ShowHeaders:SetChecked(hbv_Skins_GetFrameBoolean("HeadBar", "SHOW", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ShowHeaders,HEALBOT_OPTIONS_SHOWHEADERS)
        g=_G["HealBot_HeadBarColorpickt"]
        g:SetText(HEALBOT_SKIN_HEADERBARCOL)
        g=_G["HealBot_HeadTextColorpickt"]
        g:SetText(HEALBOT_SKIN_HEADERTEXTCOL)
        HealBot_Options_UpdateMediaTexture(HealBot_Options_HeadTextureS,hbv_Skins_GetFrameVar("HeadBar", "TEXTURE", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_HeadHightS,HEALBOT_OPTIONS_SKINHEIGHT,5,80,1,5)
        HealBot_Options_HeadHightS:SetValue(hbv_Skins_GetFrameVar("HeadBar", "HEIGHT", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_HeadHightS, HEALBOT_OPTIONS_SKINHEIGHT..": "..hbv_Skins_GetFrameVar("HeadBar", "HEIGHT", hb_lVars["Frame"]))
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_HeadWidthS,HEALBOT_OPTIONS_SKINWIDTH,0.25,1,0.01,5)
        HealBot_Options_HeadWidthS:SetValue(hbv_Skins_GetFrameVar("HeadBar", "WIDTH", hb_lVars["Frame"]))
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_HeadWidthS)
        HealBot_Options_UpdateMediaFont(HealBot_Options_HeadFontNameS,hbv_Skins_GetFrameVar("HeadText", "FONT", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_HeadFontHeightS,HEALBOT_OPTIONS_SKINFHEIGHT,4,28,1,2)
        HealBot_Options_HeadFontHeightS:SetValue(hbv_Skins_GetFrameVar("HeadText", "HEIGHT", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_HeadFontHeightS, HEALBOT_OPTIONS_SKINFHEIGHT..": "..hbv_Skins_GetFrameVar("HeadText", "HEIGHT", hb_lVars["Frame"]))
        HealBot_Options_HeadFontOutline.initialize=HealBot_Options_HeadFontOutline_DropDown
        UIDropDownMenu_SetText(HealBot_Options_HeadFontOutline, HealBot_Options_FontOutline_List[hbv_Skins_GetFrameVar("HeadText", "OUTLINE", hb_lVars["Frame"])])
        HealBot_Options_val_OnLoad(HealBot_Options_HeadFontOffset,HEALBOT_OPTIONS_FONT_OFFSET,-10,25,1,5)
        HealBot_Options_HeadFontOffset:SetValue(hbv_Skins_GetFrameVar("HeadText", "OFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_HeadFontOffset, HEALBOT_OPTIONS_FONT_OFFSET..": "..hbv_Skins_GetFrameVar("HeadText", "OFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetLabel("healbotskinfontoutlinefontstr",HEALBOT_OPTIONS_SKINFOUTLINE)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesHeadersFramesTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesHeadersFramesTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_SetText(HealBot_Options_FrameTitle,HEALBOT_OPTIONS_FRAME_TITLE)
        HealBot_Options_FrameTitle:SetText(hbv_Skins_GetFrameVar("FrameAlias", "NAME", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_FrameAliasShow,HEALBOT_OPTIONS_FRAME_TITLE_SHOW)
        HealBot_Options_FrameAliasShow:SetChecked(hbv_Skins_GetFrameBoolean("FrameAlias", "SHOW", hb_lVars["Frame"]))
        HealBot_Options_UpdateMediaTexture(HealBot_Options_SkinFrameAliasTextureS,hbv_Skins_GetFrameVar("FrameAliasBar", "TEXTURE", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_SkinFrameAliasHeightS,HEALBOT_OPTIONS_SKINHEIGHT,5,80,1,5)
        HealBot_Options_SkinFrameAliasHeightS:SetValue(hbv_Skins_GetFrameVar("FrameAliasBar", "HEIGHT", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_SkinFrameAliasHeightS, HEALBOT_OPTIONS_SKINHEIGHT..": "..hbv_Skins_GetFrameVar("FrameAliasBar", "HEIGHT", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_SkinFrameAliasOffset,HEALBOT_OPTIONS_TXTOFFSET,-10,10,1,2)
        HealBot_Options_SkinFrameAliasOffset:SetValue(hbv_Skins_GetFrameVar("FrameAliasBar", "OFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_SkinFrameAliasOffset, HEALBOT_OPTIONS_TXTOFFSET..": "..hbv_Skins_GetFrameVar("FrameAliasBar", "OFFSET", hb_lVars["Frame"]))
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_SkinFrameAliasWidthS,HEALBOT_OPTIONS_SKINWIDTH,0.25,1,0.01,5)
        HealBot_Options_SkinFrameAliasWidthS:SetValue(hbv_Skins_GetFrameVar("FrameAliasBar", "WIDTH", hb_lVars["Frame"]))
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_SkinFrameAliasWidthS)
        HealBot_Options_UpdateMediaFont(HealBot_Options_AliasFontName,hbv_Skins_GetFrameVar("FrameAlias", "FONT", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_AliasFontHeight,HEALBOT_OPTIONS_SKINFHEIGHT,4,28,1,2)
        HealBot_Options_AliasFontHeight:SetValue(hbv_Skins_GetFrameVar("FrameAlias", "SIZE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_AliasFontHeight, HEALBOT_OPTIONS_SKINFHEIGHT..": "..hbv_Skins_GetFrameVar("FrameAlias", "SIZE", hb_lVars["Frame"]))
        HealBot_Options_AliasFontOutline.initialize=HealBot_Options_AliasFontOutline_DropDown
        UIDropDownMenu_SetText(HealBot_Options_AliasFontOutline, HealBot_Options_FontOutline_List[hbv_Skins_GetFrameVar("FrameAlias", "OUTLINE", hb_lVars["Frame"])])
        HealBot_Options_val_OnLoad(HealBot_Options_AliasFontOffset,HEALBOT_OPTIONS_FONT_OFFSET,-10,25,1,5)
        HealBot_Options_AliasFontOffset:SetValue(hbv_Skins_GetFrameVar("FrameAlias", "OFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_AliasFontOffset, HEALBOT_OPTIONS_FONT_OFFSET..": "..hbv_Skins_GetFrameVar("FrameAlias", "OFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_FrameTitle,HEALBOT_OPTIONS_FRAME_TITLE)
        HealBot_Options_SetText(HealBot_Options_FrameAlias,HEALBOT_OPTIONS_FRAME_ALIAS)
        HealBot_Options_SetText(HealBot_Options_FrameAliasShow,HEALBOT_OPTIONS_FRAME_TITLE_SHOW)
        HealBot_Options_SetLabel("healbotaliasfontoutlinestr",HEALBOT_OPTIONS_SKINFOUTLINE)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesBarsGeneralTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesBarsGeneralTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_UpdateMediaTexture(HealBot_Options_BarTextureS,hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_BarNumColsS,HEALBOT_OPTIONS_SKINBRSPACE,1,10,1,2)
        HealBot_Options_BarNumColsS:SetValue(hbv_Skins_GetFrameVar("HealBar", "NUMCOLS", hb_lVars["Frame"]) or 2)
        HealBot_Options_SetText(HealBot_Options_BarNumColsS,HealBot_Options_SetNoColsText() .. ": " .. hbv_Skins_GetFrameVar("HealBar", "NUMCOLS", hb_lVars["Frame"]))
        HealBot_Options_BarNumGroupPerCol:SetChecked(hbv_Skins_GetFrameBoolean("HealBar", "GRPCOLS", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_BarNumGroupPerCol,HEALBOT_OPTIONS_GROUPSPERCOLUMN)
        HealBot_Options_val_OnLoad(HealBot_Options_BarHeightS,HEALBOT_OPTIONS_SKINHEIGHT,10,180,1,10)
        HealBot_Options_BarHeightS:SetValue(hbv_Skins_GetFrameVar("HealBar", "HEIGHT", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_BarHeightS,HEALBOT_OPTIONS_SKINHEIGHT..": "..hbv_Skins_GetFrameVar("HealBar", "HEIGHT", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_BarWidthS,HEALBOT_OPTIONS_SKINWIDTH,20,320,1,10)
        HealBot_Options_BarWidthS:SetValue(hbv_Skins_GetFrameVar("HealBar", "WIDTH", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_BarWidthS,HEALBOT_OPTIONS_SKINWIDTH..": "..hbv_Skins_GetFrameVar("HealBar", "WIDTH", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_BarBRSpaceS,HEALBOT_OPTIONS_SKINBRSPACE,0,100,1,10)
        HealBot_Options_BarBRSpaceS:SetValue(hbv_Skins_GetFrameVar("HealBar", "RMARGIN", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_BarBRSpaceS,HEALBOT_OPTIONS_SKINBRSPACE..": "..hbv_Skins_GetFrameVar("HealBar", "RMARGIN", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_BarBCSpaceS,HEALBOT_OPTIONS_SKINBCSPACE,0,150,1,10)
        HealBot_Options_BarBCSpaceS:SetValue(hbv_Skins_GetFrameVar("HealBar", "CMARGIN", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_BarBCSpaceS,HEALBOT_OPTIONS_SKINBCSPACE..": "..hbv_Skins_GetFrameVar("HealBar", "CMARGIN", hb_lVars["Frame"]))
        HealBot_Options_TabRunOnce[tab]=true
    end
end

hb_lVars["FramesBarsOnLoadBarsColours"]=true
function HealBot_Options_SkinsFramesBarsColourTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesBarsColourTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_BarHealthColour.initialize=HealBot_Options_BarHealthColour_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarHealthColour, HealBot_Options_BarHealthColour_List[hbv_Skins_GetFrameVar("BarCol", "HLTH", hb_lVars["Frame"])])
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_BarAlpha,HEALBOT_OPTIONS_BARALPHA,0.75,1,0.01,5)
        HealBot_Options_BarAlpha:SetValue(hbv_Skins_GetFrameVar("BarCol", "HA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_BarAlpha)
        HealBot_Options_BarHealthBackColour.initialize=HealBot_Options_BarHealthBackColour_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarHealthBackColour, HealBot_Options_Lists["BarBack"][hbv_Skins_GetFrameVar("BarCol", "BACK", hb_lVars["Frame"])])
        HealBot_Options_SetLabel("HealBot_Options_BarHealthBackColourt",HEALBOT_SKIN_HEALTHBACKCOL_TEXT)
        HealBot_Options_val_OnLoad(HealBot_Options_BarOutlineBackGround,HEALBOT_OPTIONS_OUTLINE,0,10,1,2)
        HealBot_Options_BarOutlineBackGround:SetValue(hbv_Skins_GetFrameVar("BarCol", "BOUT", hb_lVars["Frame"]));
        HealBot_Options_SetText(HealBot_Options_BarOutlineBackGround,HEALBOT_OPTIONS_OUTLINE..": "..hbv_Skins_GetFrameVar("BarCol", "BOUT", hb_lVars["Frame"]))
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_BarAlphaBackGround,HEALBOT_OPTIONS_TTALPHA,0,1,0.01,5)
        HealBot_Options_BarAlphaBackGround:SetValue(hbv_Skins_GetFrameVar("BarCol", "BA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_BarAlphaBackGround)
        HealBot_Options_BarBorderColour.initialize=HealBot_Options_BarBorderColour_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarBorderColour, HealBot_Options_Lists["BarBackBorder"][hbv_Skins_GetFrameVar("BarCol", "BORDER", hb_lVars["Frame"])])
        HealBot_Options_SetLabel("HealBot_Options_BarBorderColourt",HEALBOT_SKIN_BACKBORDERCOL_TEXT)
        HealBot_Options_val_OnLoad(HealBot_Options_BarSizeBorder,HEALBOT_OPTIONS_TXTSIZE,1,8,1,1)
        HealBot_Options_BarSizeBorder:SetValue(hbv_Skins_GetFrameVar("BarCol", "BORSIZE", hb_lVars["Frame"]));
        HealBot_Options_SetText(HealBot_Options_BarSizeBorder,HEALBOT_OPTIONS_TXTSIZE..": "..hbv_Skins_GetFrameVar("BarCol", "BORSIZE", hb_lVars["Frame"]))
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_BarAlphaBorder,HEALBOT_OPTIONS_TTALPHA,0,1,0.01,5)
        HealBot_Options_BarAlphaBorder:SetValue(hbv_Skins_GetFrameVar("BarCol", "BORA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_BarAlphaBorder)
        HealBot_Options_BarIncHealColour.initialize=HealBot_Options_BarIncHealColour_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarIncHealColour, HealBot_Options_BarIncHealColour_List[hbv_Skins_GetFrameVar("BarIACol", "IC", hb_lVars["Frame"])])
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_BarAlphaInHeal,HEALBOT_OPTIONS_TTALPHA,0.20,0.80,0.01,5)
        HealBot_Options_BarAlphaInHeal:SetValue(hbv_Skins_GetFrameVar("BarIACol", "IA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_BarAlphaInHeal)
        HealBot_Options_AbsorbColour.initialize=HealBot_Options_AbsorbColour_DropDown
        UIDropDownMenu_SetText(HealBot_Options_AbsorbColour, HealBot_Options_AbsorbColour_List[hbv_Skins_GetFrameVar("BarIACol", "AC", hb_lVars["Frame"])])
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_BarAlphaAbsorb,HEALBOT_OPTIONS_TTALPHA,0.20,0.80,0.01,5)
        HealBot_Options_BarAlphaAbsorb:SetValue(hbv_Skins_GetFrameVar("BarIACol", "AA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_BarAlphaAbsorb)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_BarAlphaEor,HEALBOT_OPTIONS_BARALPHAEOR,0,0.75,0.01,5)
        HealBot_Options_BarAlphaEor:SetValue(hbv_Skins_GetFrameVar("BarCol", "ORA", hb_lVars["Frame"]))
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_BarAlphaEor)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_BarAlphaDis,HEALBOT_OPTIONS_BARALPHADIS,0,0.75,0.01,5)
        HealBot_Options_BarAlphaDis:SetValue(hbv_Skins_GetFrameVar("BarCol", "DISA", hb_lVars["Frame"]))
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_BarAlphaDis)
        HealBot_Options_AbsorbShield:SetChecked(hbv_Skins_GetFrameBoolean("BarIACol", "OSHIELD", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_AbsorbShield,HEALBOT_WORD_OVERSHIELD)
        HealBot_Options_SetLabel("HealBot_BarHealthColourt",HEALBOT_SKIN_HEALTHBARCOL_TEXT)
        HealBot_Options_SetLabel("HealBot_AbsorbColourt",HEALBOT_SKIN_ABSORBCOL_TEXT)
        HealBot_Options_SetLabel("HealBot_BarIncHealColourt",HEALBOT_SKIN_INCHEALBARCOL_TEXT)
        HealBot_Options_TabRunOnce[tab]=true
    end
    if hb_lVars["FramesBarsOnLoadBarsColours"] then
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomHealthColourCritical, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomHealthColourInjured, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomHealthColourHealthy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomHealthColourCriticalEnemy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomHealthColourInjuredEnemy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomHealthColourHealthyEnemy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomHealthBackColourCritical, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomHealthBackColourInjured, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomHealthBackColourHealthy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomHealthBackColourCriticalEnemy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomHealthBackColourInjuredEnemy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomHealthBackColourHealthyEnemy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomBorderColourCritical, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomBorderColourInjured, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomBorderColourHealthy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomBorderColourCriticalEnemy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomBorderColourInjuredEnemy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomBorderColourHealthyEnemy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomIHColourCritical, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomIHColourInjured, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomIHColourHealthy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomIHColourCriticalEnemy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomIHColourInjuredEnemy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomIHColourHealthyEnemy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomAbsorbColourCritical, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomAbsorbColourInjured, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomAbsorbColourHealthy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomAbsorbColourCriticalEnemy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomAbsorbColourInjuredEnemy, "Options_SkinsFramesBarsColourTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_BarCustomAbsorbColourHealthyEnemy, "Options_SkinsFramesBarsColourTab")
        HealBot_Options_TabRunOnce["FramesBarsOnLoadBarsColours"]=false
    end
end

function HealBot_Options_SkinsFramesBarsSortTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesBarsSortTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ExtraSort.initialize=HealBot_Options_ExtraSort_DropDown
        UIDropDownMenu_SetText(HealBot_Options_ExtraSort, HealBot_Options_Sort_List[hbv_Skins_GetFrameVar("BarSort", "RAIDORDER", hb_lVars["Frame"])])
        HealBot_Options_SortOutOfRangeLast:SetChecked(hbv_Skins_GetFrameBoolean("BarSort", "OORLAST", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_SortOutOfRangeLast,HEALBOT_OPTIONS_SORTOORLAST)
        HealBot_Options_ExtraSubSort.initialize=HealBot_Options_ExtraSubSort_DropDown
        UIDropDownMenu_SetText(HealBot_Options_ExtraSubSort, HealBot_Options_Sort_List[hbv_Skins_GetFrameVar("BarSort", "SUBORDER", hb_lVars["Frame"])])
        HealBot_Options_ExtraSubSort_SetAlpha()
        HealBot_Options_SubSortPlayerFirst:SetChecked(hbv_Skins_GetFrameBoolean("BarSort", "SUBPF", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_SubSortPlayerFirst,HEALBOT_OPTIONS_SUBSORTSELFFIRST)
        HealBot_Options_SelfPet:SetChecked(hbv_Skins_GetBoolean("Healing", "SELFPET"))
        HealBot_Options_SetText(HealBot_Options_SelfPet,HEALBOT_OPTIONS_OWN_PET_WITH_SELF)
        HealBot_Options_GroupPetsByFive:SetChecked(hbv_Skins_GetBoolean("Healing", "GROUPPETS"))
        HealBot_Options_SetText(HealBot_Options_GroupPetsByFive,HEALBOT_OPTIONS_GROUP_PETS_BY_FIVE)
        g=_G["HealBot_SortButtons_Text"]
        if hb_lVars["Frame"]<6 then
            g:SetText(HEALBOT_OPTIONS_PLAYERSORT)
        elseif hb_lVars["Frame"] == 6 then
            g:SetText(HEALBOT_OPTIONS_VEHICLESORT)
        elseif hb_lVars["Frame"] == 7 then
            g:SetText(HEALBOT_OPTIONS_PETSORT)
        elseif hb_lVars["Frame"] == 10 then
            g:SetText(HEALBOT_OPTIONS_ENEMYSORT)
        end
        g:SetTextColor(1,1,1,1)
        HealBot_Options_SetLabel("healbotmainsortfontstr",HEALBOT_OPTIONS_MAINSORT)
        HealBot_Options_SetLabel("healbotsubsortfontstr",HEALBOT_OPTIONS_SUBSORT)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

hb_lVars["OnLoadBarsVisibility"]=true
function HealBot_Options_SkinsFramesBarsVisibilityTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesBarsVisibilityTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_TargetInCombat.initialize=HealBot_Options_TargetInCombat_DropDown
        UIDropDownMenu_SetText(HealBot_Options_TargetInCombat,HealBot_Options_TargetFocusInCombat_List[hbv_Skins_GetVar("Healing", "TARGETINCOMBAT")])
        HealBot_Options_ToTInCombat.initialize=HealBot_Options_ToTInCombat_DropDown
        UIDropDownMenu_SetText(HealBot_Options_ToTInCombat,HealBot_Options_TargetFocusInCombat_List[hbv_Skins_GetVar("Healing", "TOTINCOMBAT")])
        HealBot_Options_FocusInCombat.initialize=HealBot_Options_FocusInCombat_DropDown
        UIDropDownMenu_SetText(HealBot_Options_FocusInCombat,HealBot_Options_TargetFocusInCombat_List[hbv_Skins_GetVar("Healing", "FOCUSINCOMBAT")])
        HealBot_Options_ToFInCombat.initialize=HealBot_Options_ToFInCombat_DropDown
        UIDropDownMenu_SetText(HealBot_Options_ToFInCombat,HealBot_Options_TargetFocusInCombat_List[hbv_Skins_GetVar("Healing", "TOFINCOMBAT")])
        HealBot_Options_PrivateFocusInCombat.initialize=HealBot_Options_PrivateFocusInCombat_DropDown
        UIDropDownMenu_SetText(HealBot_Options_PrivateFocusInCombat,HealBot_Options_TargetFocusInCombat_List[hbv_Skins_GetVar("Healing", "PRIVFOCUSINCOMBAT")])
        HealBot_Options_PrivFocusToTInCombat.initialize=HealBot_Options_PrivFocusToTInCombat_DropDown
        UIDropDownMenu_SetText(HealBot_Options_PrivFocusToTInCombat,HealBot_Options_TargetFocusInCombat_List[hbv_Skins_GetVar("Healing", "PRIVFOCUSTOTINCOMBAT")])
        HealBot_Options_Pct_OnLoad(HealBot_Options_AlertLevelIC,HEALBOT_OPTIONS_INCOMBATALERTLEVEL)
        HealBot_Options_AlertLevelIC:SetValue(hbv_Skins_GetFrameVar("BarVisibility", "ALERTIC", hb_lVars["Frame"]))
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_AlertLevelIC)
        HealBot_Options_Pct_OnLoad(HealBot_Options_AlertLevelOC,HEALBOT_OPTIONS_OUTCOMBATALERTLEVEL)
        HealBot_Options_AlertLevelOC:SetValue(hbv_Skins_GetFrameVar("BarVisibility", "ALERTOC", hb_lVars["Frame"]))
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_AlertLevelOC)
        HealBot_Options_HideBars:SetChecked(hbv_Skins_GetFrameBoolean("BarVisibility", "HIDEOOR", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_HideBars,HEALBOT_HIDE_BARS)
        HealBot_Options_VehicleInCombat:SetChecked(hbv_Skins_GetBoolean("Healing", "VEHICLEINCOMBAT"))
        HealBot_Options_SetText(HealBot_Options_VehicleInCombat,HEALBOT_OPTIONS_ALWAYSINCOMBAT.." "..HEALBOT_WORD_VEHICLE.." "..HEALBOT_OPTIONS_ENTERINGCOMBAT)
        HealBot_Options_MyPetInCombat:SetChecked(hbv_Skins_GetBoolean("Healing", "MYPETINCOMBAT"))
        HealBot_Options_SetText(HealBot_Options_MyPetInCombat,HEALBOT_OPTIONS_ALWAYSINCOMBAT.." "..HEALBOT_WORD_MYPET.." "..HEALBOT_OPTIONS_ENTERINGCOMBAT)
        g=_G["HealBot_HealButtons_Text"]
        if hb_lVars["Frame"]<8 then
            g:SetText(HEALBOT_OPTIONS_PLAYERVISIBILITY)
        elseif hb_lVars["Frame"] == 8 then
            g:SetText(HEALBOT_OPTIONS_TARGETVISIBILITY)
        elseif hb_lVars["Frame"] == 9 then
            g:SetText(HEALBOT_OPTIONS_FOCUSVISIBILITY)
        end
        g:SetTextColor(1,1,1,1)
        HealBot_Options_SetLabel("healbotfincombatfontstr",HEALBOT_OPTIONS_ENTERINGCOMBAT)
        HealBot_Options_SetLabel("healbotpfincombatfontstr",HEALBOT_OPTIONS_ENTERINGCOMBAT)
        HealBot_Options_SetLabel("healbotincombatfontstr",HEALBOT_OPTIONS_ENTERINGCOMBAT)
        HealBot_Options_SetLabel("healbottotincombatfontstr",HEALBOT_OPTIONS_ENTERINGCOMBAT)
        HealBot_Options_SetLabel("healbottofincombatfontstr",HEALBOT_OPTIONS_ENTERINGCOMBAT)
        HealBot_Options_SetLabel("healbotpftotincombatfontstr",HEALBOT_OPTIONS_ENTERINGCOMBAT)
        HealBot_Options_TabRunOnce[tab]=true
    end
    if hb_lVars["OnLoadBarsVisibility"] then
        if HEALBOT_GAME_VERSION<2 then
            HealBot_Options_FocusInCombat:Hide()
            HealBot_Options_ToFInCombat:Hide()
            HealBot_Options_TargetInCombat:ClearAllPoints()
            HealBot_Options_PrivateFocusInCombat:ClearAllPoints()
            HealBot_Options_ToTInCombat:ClearAllPoints()
            HealBot_Options_PrivFocusToTInCombat:ClearAllPoints()
            HealBot_Options_TargetInCombat:SetPoint("BOTTOMLEFT",50,120)
            HealBot_Options_PrivateFocusInCombat:SetPoint("BOTTOMRIGHT",-50,120)
            HealBot_Options_ToTInCombat:SetPoint("BOTTOMLEFT",50,25)
            HealBot_Options_PrivFocusToTInCombat:SetPoint("BOTTOMRIGHT",-50,25)
        end
        hb_lVars["OnLoadBarsVisibility"]=false
    end
end

function HealBot_Options_SkinsFramesBarsAggroTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesBarsAggroTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_AggroTrack:SetChecked(hbv_Skins_GetFrameBoolean("BarAggro", "SHOW", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_AggroTrack,HEALBOT_OPTION_AGGROTRACK)
        HealBot_Options_AggroHazard:SetChecked(hbv_Skins_GetFrameBoolean("BarAggro", "HAZARD", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_AggroHazard,HEALBOT_OPTION_AGGROHAZARD)
        HealBot_Options_AggroTargeted:SetChecked(hbv_Skins_GetFrameBoolean("BarAggro", "TARGETED", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_AggroTargeted,HEALBOT_OPTION_AGGROTARGETED)
        HealBot_Options_AggroTargetedBossOnly:SetChecked(hbv_Skins_GetFrameBoolean("BarAggro", "TARBOSSONLY", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_AggroTargetedBossOnly,HEALBOT_OPTION_BOSSONLY)
        HealBot_Options_AggroIndAlertLevel.initialize=HealBot_Options_AggroIndAlertLevel_DropDown
        UIDropDownMenu_SetText(HealBot_Options_AggroIndAlertLevel, HealBot_Options_Lists["AggroIndAlertLevel"][hbv_Skins_GetFrameVar("BarAggro", "ALERTIND", hb_lVars["Frame"])])
        HealBot_Options_SetLabel("healbotaggroindalertfontstr",HEALBOT_OPTIONS_AGGROINDALERT)
        HealBot_Options_AggroAlertLevel.initialize=HealBot_Options_AggroAlertLevel_DropDown
        UIDropDownMenu_SetText(HealBot_Options_AggroAlertLevel, HealBot_Options_AggroAlertLevel_List[hbv_Skins_GetFrameVar("BarAggro", "ALERT", hb_lVars["Frame"])])
        HealBot_Options_SetLabel("healbotaggroalertfontstr",HEALBOT_OPTIONS_AGGROALERT)
        HealBot_Options_AggroIndicatorsLink:SetText(HEALBOT_OPTIONS_TAB_AGGROINDICATORS)
        g=_G["HealBot_AggroBars_FontStr"]
        g:SetText(HEALBOT_OPTIONS_TAB_AGGRO)
        g:SetTextColor(1,1,1,1)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesBarsAuxSettingsTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesBarsAuxSettingsTab")
    if not HealBot_Options_TabRunOnce[tab] then
        g=_G["HealBot_AuxBarsAssignSettings_FontStr"]
        g:SetText(HEALBOT_OPTIONS_AUXSETTINGS)
        g:SetTextColor(1,1,1,1)
        g=_G["HealBot_AuxBarsAssignments_FontStr"]
        g:SetText(HEALBOT_OPTIONS_AUXASSIGN)
        g:SetTextColor(1,1,1,1)
        HealBot_Options_AuxOverlap.initialize=HealBot_Options_AuxOverlap_DropDown
        UIDropDownMenu_SetText(HealBot_Options_AuxOverlap,HealBot_Options_AuxOverlap_List[hbv_Aux_GetOverlayVar("OVERLAP", hb_lVars["Frame"])])
        HealBot_Options_SetLabel("HealBot_AuxOverlap_FontStr",HEALBOT_OPTIONS_AUXOVERLAP)
        local list=HealBot_Options_Aux1Assign_GenList(hb_lVars["Frame"])
        HealBot_Options_Aux1Assign.initialize=HealBot_Options_Aux1Assign_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Aux1Assign, list[hbv_Aux_GetBarVar("USE", hb_lVars["Frame"], 1)])
        HealBot_Options_Aux2Assign.initialize=HealBot_Options_Aux2Assign_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Aux2Assign, list[hbv_Aux_GetBarVar("USE", hb_lVars["Frame"], 2)])
        HealBot_Options_Aux3Assign.initialize=HealBot_Options_Aux3Assign_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Aux3Assign, list[hbv_Aux_GetBarVar("USE", hb_lVars["Frame"], 3)])
        HealBot_Options_Aux4Assign.initialize=HealBot_Options_Aux4Assign_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Aux4Assign, list[hbv_Aux_GetBarVar("USE", hb_lVars["Frame"], 4)])
        HealBot_Options_Aux5Assign.initialize=HealBot_Options_Aux5Assign_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Aux5Assign, list[hbv_Aux_GetBarVar("USE", hb_lVars["Frame"], 5)])
        HealBot_Options_Aux6Assign.initialize=HealBot_Options_Aux6Assign_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Aux6Assign, list[hbv_Aux_GetBarVar("USE", hb_lVars["Frame"], 6)])
        HealBot_Options_Aux7Assign.initialize=HealBot_Options_Aux7Assign_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Aux7Assign, list[hbv_Aux_GetBarVar("USE", hb_lVars["Frame"], 7)])
        HealBot_Options_Aux8Assign.initialize=HealBot_Options_Aux8Assign_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Aux8Assign, list[hbv_Aux_GetBarVar("USE", hb_lVars["Frame"], 8)])
        HealBot_Options_Aux9Assign.initialize=HealBot_Options_Aux9Assign_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Aux9Assign, list[hbv_Aux_GetBarVar("USE", hb_lVars["Frame"], 9)])
        for i=1,9 do
            HealBot_Options_SetLabel("HealBot_Aux"..i.."Assign_FontStr",HEALBOT_OPTIONS_AUX.." "..i)
            HealBot_Options_SetLabel("HealBot_Aux"..i.."Config_FontStr1",HEALBOT_WORD_ANCHOR)
        end
        HealBot_Options_AuxConfigBarChange()
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesBarsAuxConfigTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesBarsAuxConfigTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_AuxConfigBar.initialize=HealBot_Options_AuxConfigBar_DropDown
        UIDropDownMenu_SetText(HealBot_Options_AuxConfigBar,HealBot_Options_Lists["AuxConfigSelect"][hb_lVars["AuxBar"]])
        HealBot_Options_SetLabel("HealBot_AuxConfigBar_FontStr",HEALBOT_OPTIONS_AUXINDCONFIG)
        HealBot_Options_SetLabel("HealBot_AuxBarsConfigAssign_FontStr",HEALBOT_WORD_ASSIGNMENT)
        HealBot_Options_SetLabel("HealBot_Options_AuxBarAnchor_FontStr",HEALBOT_OPTIONS_AUXBARANCHOR)
        HealBot_Options_SetLabel("HealBot_Options_AuxBarColourt",HEALBOT_SKIN_HEADERBARCOL)
        HealBot_Options_SetLabel("HealBot_Options_AuxBarOpacityTypet",HEALBOT_OPTIONS_AUXOPACITYTYPE)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_AuxBarOpacityCustom,HEALBOT_CLASSES_CUSTOM.." "..HEALBOT_OPTIONS_ALPHA,0,1,0.05,2)
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_AuxBarOpacityCustom)
        g=_G["HealBot_AuxBarCustomColourt"]
        g:SetText(HEALBOT_CUSTOM_CAT_CUSTOM)
        HealBot_Options_AuxBarOutline:SetChecked(hbv_Aux_GetBarVar("OUTLINE", hb_lVars["Frame"], hb_lVars["AuxBar"]))
        HealBot_Options_SetText(HealBot_Options_AuxBarOutline,HEALBOT_OPTIONS_OUTLINEAUXBAR)
        HealBot_Options_SkinBarAuxBarManaOnly:SetChecked(hbv_Aux_GetBarBoolean("MANAONLY", hb_lVars["Frame"], hb_lVars["AuxBar"]))
        HealBot_Options_SetText(HealBot_Options_SkinBarAuxBarManaOnly,HEALBOT_OPTION_MANAONLY)
        HealBot_Options_SkinBarAuxBarHealersManaOnly:SetChecked(hbv_Aux_GetBarBoolean("HEALERSMANAONLY", hb_lVars["Frame"], hb_lVars["AuxBar"]))
        HealBot_Options_SetText(HealBot_Options_SkinBarAuxBarHealersManaOnly,HEALBOT_OPTION_HEALERSMANAONLY)
        HealBot_Options_SkinBarAuxBarOverlayRecentHeals:SetChecked(hbv_Aux_GetOverlayBoolean("OVERLAYRECENTHEALS", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_SkinBarAuxBarOverlayRecentHeals,HEALBOT_RECENTHEALS)
        HealBot_Options_SkinBarAuxBarOverlayHealthDrop:SetChecked(hbv_Aux_GetOverlayBoolean("OVERLAYHEALTHDROP", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_SkinBarAuxBarOverlayHealthDrop,HEALBOT_OPTION_HEALTHDROP)
        HealBot_Options_SkinBarAuxBarOverlayDebuff:SetChecked(hbv_Aux_GetOverlayBoolean("OVERLAYDEBUFF", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_SkinBarAuxBarOverlayDebuff,HEALBOT_SKIN_DEBTEXT)
        HealBot_Options_SkinBarAuxBarOverlayAggro:SetChecked(hbv_Aux_GetOverlayBoolean("OVERLAYAGGRO", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_SkinBarAuxBarOverlayAggro,HEALBOT_OPTIONS_TAB_AGGRO)
        HealBot_Options_SkinBarAuxBarOverlayHighlight:SetChecked(hbv_Aux_GetOverlayBoolean("OVERLAYHIGHLIGHT", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_SkinBarAuxBarOverlayHighlight,HEALBOT_OPTION_HIGHLIGHTACTIVEBAR)
        HealBot_Options_SkinBarAuxBarOverlayTarget:SetChecked(hbv_Aux_GetOverlayBoolean("OVERLAYTARGET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_SkinBarAuxBarOverlayTarget,HEALBOT_OPTIONS_TARGETHEALS)
        HealBot_Options_SkinBarAuxBarOverlayOOR:SetChecked(hbv_Aux_GetOverlayBoolean("OVERLAYOOR", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_SkinBarAuxBarOverlayOOR,HEALBOT_OUTOFRANGE_LABEL)
        HealBot_Options_SkinBarAuxBarOverlayBuff:SetChecked(hbv_Aux_GetOverlayBoolean("OVERLAYBUFF", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_SkinBarAuxBarOverlayBuff,HEALBOT_OPTIONS_BUFF)
        HealBot_Options_val_OnLoad(HealBot_Options_AuxBarDepth,HEALBOT_OPTIONS_TXTDEPTH,1,75,1,5)
        HealBot_Options_val_OnLoad(HealBot_Options_AuxBarOffset,HEALBOT_OPTIONS_TXTOFFSET,-75,125,1,5)
        HealBot_Options_AuxBarOffset:SetValue(hbv_Aux_GetBarVar("OFFSET", hb_lVars["Frame"], hb_lVars["AuxBar"]))
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_AuxBarSize,HEALBOT_OPTIONS_TXTSIZE,0.25,1,0.01,5)
        HealBot_Options_SetLabel("HealBot_SkinBarAuxBarOverlayRecentHealst",HEALBOT_SKIN_OVERLAYCOL_TEXT)
        HealBot_Options_AuxConfigBarChange()
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesTextNameTextTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesTextNameTextTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ShowNameOnBar:SetChecked(hbv_Skins_GetFrameBoolean("BarText", "NAMEONBAR", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ShowNameOnBar,HEALBOT_OPTIONS_SHOWNAMEONBAR)
        HealBot_Options_TextlibUTF8:SetChecked(HealBot_Globals.useUTF8)
        HealBot_Options_SetText(HealBot_Options_TextlibUTF8,HEALBOT_OPTIONS_ENABLELIBUTF8)
        HealBot_Options_ShowClassOnBar:SetChecked(hbv_Skins_GetFrameBoolean("BarText", "CLASSONBAR", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ShowClassOnBar,HEALBOT_OPTIONS_SHOWCLASSONBAR)
        HealBot_Options_ShowRoleOnBar:SetChecked(hbv_Skins_GetFrameBoolean("BarText", "SHOWROLE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ShowRoleOnBar,HEALBOT_SHOW_ROLE)
        HealBot_Options_AggroTextIndicator.initialize=HealBot_Options_AggroTextIndicator_DropDown
        UIDropDownMenu_SetText(HealBot_Options_AggroTextIndicator, HealBot_Options_Lists["AggroNameFormat"][hbv_Skins_GetFrameVar("BarAggro", "SHOWTEXT", hb_lVars["Frame"])])
        HealBot_Options_SetLabel("HealBot_Options_AggroTextIndicatortxt",HEALBOT_OPTIONS_AGGROINDTEXT)
        HealBot_Options_BarNameTextPosition.initialize=HealBot_Options_BarNameTextPosition_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarNameTextPosition, HealBot_Options_Lists["BarNameTextAnchor"][hbv_Skins_GetFrameVar("BarText", "ALIGN", hb_lVars["Frame"])])
        HealBot_Options_UpdateMediaFont(HealBot_Options_FontName, hbv_Skins_GetFrameVar("BarText", "FONT", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_FontHeight,HEALBOT_OPTIONS_SKINFHEIGHT,4,28,1,2)
        HealBot_Options_FontHeight:SetValue(hbv_Skins_GetFrameVar("BarText", "HEIGHT", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_FontHeight, HEALBOT_OPTIONS_SKINFHEIGHT..": "..hbv_Skins_GetFrameVar("BarText", "HEIGHT", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_FontOffset,HEALBOT_OPTIONS_TEXTOFFSET,-75,75,1,5)
        HealBot_Options_FontOffset:SetValue(hbv_Skins_GetFrameVar("BarText", "OFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_FontOffset,HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_Skins_GetFrameVar("BarText", "OFFSET", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_NameTextHorOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-40,40,1,5)
        HealBot_Options_NameTextHorOffset:SetValue(hbv_Skins_GetFrameVar("BarText", "OFFSET2", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_NameTextHorOffset, HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_Skins_GetFrameVar("BarText", "OFFSET2", hb_lVars["Frame"]))
        HealBot_Options_sliderlabels_Init(HealBot_Options_MaxChars,HEALBOT_OPTIONS_MAXCHARS,0,30,1,5,HEALBOT_WORD_AUTO,30)
        HealBot_Options_MaxChars:SetValue(hbv_Skins_GetFrameVar("BarText", "MAXCHARS", hb_lVars["Frame"]))
        if hbv_Skins_GetFrameVar("BarText", "MAXCHARS", hb_lVars["Frame"]) == 0 then
            HealBot_Options_SetText(HealBot_Options_MaxChars, HEALBOT_OPTIONS_MAXCHARS .. ": "..HEALBOT_WORD_AUTO)
        else
            HealBot_Options_SetText(HealBot_Options_MaxChars, HEALBOT_OPTIONS_MAXCHARS .. ": ".. hbv_Skins_GetFrameVar("BarText", "MAXCHARS", hb_lVars["Frame"]))
        end
        HealBot_Options_sliderlabels_Init(HealBot_Options_TextOutLine,HEALBOT_OPTIONS_SKINFOUTLINE,1,3,1,1,HEALBOT_WORDS_NONE,HEALBOT_WORDS_THICK)
        HealBot_Options_TextOutLine:SetValue(hbv_Skins_GetFrameVar("BarText", "OUTLINE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_TextOutLine, HEALBOT_OPTIONS_SKINFOUTLINE .. ": ".. HealBot_Options_FontOutline_List[hbv_Skins_GetFrameVar("BarText", "OUTLINE", hb_lVars["Frame"])])
        HealBot_Options_SetLabel("HealBot_BarNameTextPositiontxt",HEALBOT_OPTIONS_TEXTALIGNMENT)
        HealBot_Options_RoleTankTag:SetText(hbv_Skins_GetFrameVar("BarText", "ROLETANK", hb_lVars["Frame"]))
        HealBot_Options_RoleHealerTag:SetText(hbv_Skins_GetFrameVar("BarText", "ROLEHEAL", hb_lVars["Frame"]))
        HealBot_Options_RoleDamagerTag:SetText(hbv_Skins_GetFrameVar("BarText", "ROLEDPS", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_RoleTankTag,HEALBOT_WORD_TANK)
        HealBot_Options_SetText(HealBot_Options_RoleHealerTag,HEALBOT_WORD_HEALER)
        HealBot_Options_SetText(HealBot_Options_RoleDamagerTag,HEALBOT_WORD_DAMAGER)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

hb_lVars["OnLoadSkinsFramesTextNameColours"]=true
function HealBot_Options_SkinsFramesTextNameColoursTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesTextNameColoursTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_NameTextColour.initialize=HealBot_Options_NameTextColour_DropDown
        UIDropDownMenu_SetText(HealBot_Options_NameTextColour, HealBot_Options_BarHealthColour_List[hbv_Skins_GetFrameVar("BarTextCol", "NAME", hb_lVars["Frame"])])
        HealBot_Options_NameTextColourDebuff:SetChecked(hbv_Skins_GetFrameBoolean("BarTextCol", "NDEBUFF", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_NameTextColourDebuff,HEALBOT_OPTIONS_TEXTCOL_DEBUFF)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_NameTextAlpha,HEALBOT_OPTIONS_BARALPHA,0,1,0.01,5)
        HealBot_Options_NameTextAlpha:SetValue(hbv_Skins_GetFrameVar("BarTextCol", "NCA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_NameTextAlpha)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_NameTextDisAlpha,HEALBOT_OPTIONS_BARALPHADIS,0,1,0.01,5)
        HealBot_Options_NameTextDisAlpha:SetValue(hbv_Skins_GetFrameVar("BarTextCol", "NCDA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_NameTextDisAlpha)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_NameTextOORAlpha,HEALBOT_OPTIONS_BARALPHAEOR,0,1,0.01,5)
        HealBot_Options_NameTextOORAlpha:SetValue(hbv_Skins_GetFrameVar("BarTextCol", "NCOA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_NameTextOORAlpha)
        if HEALBOT_GAME_VERSION>3 then
            HealBot_Options_NameTextSummonCol:SetChecked(hbv_Skins_GetFrameBoolean("BarTextCol", "SUM", hb_lVars["Frame"]))
        end
        g=_G["HealBot_NameTextDeadColourt"]
        g:SetText(HEALBOT_DEAD_LABEL)
        HealBot_Options_NameTextDeadCol:SetChecked(hbv_Skins_GetFrameBoolean("BarTextCol", "RIP", hb_lVars["Frame"]))
        g=_G["HealBot_NameTextResColourt"]
        g:SetText(HEALBOT_WORD_RESURRECTION)
        HealBot_Options_NameTextResCol:SetChecked(hbv_Skins_GetFrameBoolean("BarTextCol", "RES", hb_lVars["Frame"]))
        g=_G["HealBot_NameTextSummonColourt"]
        g:SetText(HEALBOT_WORD_SUMMONS)
        HealBot_Options_SetLabel("HealBot_NameTextColourt",HEALBOT_SKIN_NAMETEXTCOL_TEXT)
        HealBot_Options_TabRunOnce[tab]=true
    end
    if hb_lVars["OnLoadSkinsFramesTextNameColours"] then
        HealBot_Media_UpdateDefaultTexture(HealBot_NameTextCustomColourCritical, "Options_SkinsFramesTextNameColoursTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_NameTextCustomColourInjured, "Options_SkinsFramesTextNameColoursTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_NameTextCustomColourHealthy, "Options_SkinsFramesTextNameColoursTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_NameTextCustomColourCriticalEnemy, "Options_SkinsFramesTextNameColoursTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_NameTextCustomColourInjuredEnemy, "Options_SkinsFramesTextNameColoursTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_NameTextCustomColourHealthyEnemy, "Options_SkinsFramesTextNameColoursTab")
        if HEALBOT_GAME_VERSION<4 then
            HealBot_NameTextDeadColb:ClearAllPoints()
            HealBot_NameTextDeadColb:SetPoint("BOTTOM",-120,25)
            HealBot_NameTextResColb:ClearAllPoints()
            HealBot_NameTextResColb:SetPoint("BOTTOM",120,25)
            HealBot_NameTextSummonColb:Hide()
            HealBot_NameTextSummonCol:Hide()
            HealBot_Options_NameTextSummonCol:Hide()
            HealBot_Options_SkinSummonColPresetColour:Hide()
        end
        hb_lVars["OnLoadSkinsFramesTextNameColours"]=false
    end
end

function HealBot_Options_SkinsFramesTextHealthTextTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesTextHealthTextTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ShowHealthOnBar:SetChecked(hbv_Skins_GetFrameBoolean("BarText", "HLTHONBAR", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ShowHealthOnBar,HEALBOT_OPTIONS_SHOWHEALTHONBAR)
        HealBot_Options_HideHealthOnMax:SetChecked(hbv_Skins_GetFrameBoolean("BarText", "HLTHMAXHIDE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_HideHealthOnMax,HEALBOT_OPTIONS_HIDEHEALTHONMAX)
        HealBot_Options_HealthIncludePercent:SetChecked(hbv_Skins_GetFrameBoolean("BarText", "HLTHINCPTC", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_HealthIncludePercent,HEALBOT_OPTIONS_HEALTHINCPERCENT)
        HealBot_Options_HealthInVehicleShowPlayer:SetChecked(hbv_Skins_GetFrameBoolean("BarText", "HLTHINVEHSHOWPLAYER", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_HealthInVehicleShowPlayer,HEALBOT_OPTIONS_HEALTHINVEHSHOWPLAYER)
        HealBot_Options_BarHealthType.initialize=HealBot_Options_BarHealthType_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarHealthType, HealBot_Options_BarHealthType_List[hbv_Skins_GetFrameVar("BarText", "HLTHTYPE", hb_lVars["Frame"])])
        HealBot_Options_BarHealthNumFormat1.initialize=HealBot_Options_BarHealthNumFormat1_DropDown
        local tmpBarHealthNumFormat1_List=HealBot_Options_BarHealthNumFormat_genList()
        local i=hbv_Skins_GetFrameVar("BarText", "NUMFORMAT2", hb_lVars["Frame"])
        if i>1 then i=(i*2)-1 end
        UIDropDownMenu_SetText(HealBot_Options_BarHealthNumFormat1, tmpBarHealthNumFormat1_List[hbv_Skins_GetFrameVar("BarText", "NUMFORMAT1", hb_lVars["Frame"])])
        HealBot_Options_BarHealthNumFormat2.initialize=HealBot_Options_BarHealthNumFormat2_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarHealthNumFormat2, HealBot_Options_BarHealthNumFormat2_List[i]..hb_lVars["hbBarHealthNumFormatTxt"]..HealBot_Options_BarHealthNumFormat2_List[i+1])
        HealBot_Options_BarHealthTextPosition.initialize=HealBot_Options_BarHealthTextPosition_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarHealthTextPosition, HealBot_Options_BarHealthAnchor_List[hbv_Skins_GetFrameVar("BarText", "HLTHTXTANCHOR", hb_lVars["Frame"])])
        HealBot_Options_UpdateMediaFont(HealBot_Options_HealthFontName,hbv_Skins_GetFrameVar("BarText", "HFONT", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_HealthFontHeight,HEALBOT_OPTIONS_SKINFHEIGHT,4,28,1,2)
        HealBot_Options_HealthFontHeight:SetValue(hbv_Skins_GetFrameVar("BarText", "HHEIGHT", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_HealthFontHeight, HEALBOT_OPTIONS_SKINFHEIGHT..": "..hbv_Skins_GetFrameVar("BarText", "HHEIGHT", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_HealthFontOffset,HEALBOT_OPTIONS_TEXTOFFSET,-75,75,1,5)
        HealBot_Options_HealthFontOffset:SetValue(hbv_Skins_GetFrameVar("BarText", "HOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_HealthFontOffset, HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_Skins_GetFrameVar("BarText", "HOFFSET", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_HealthTextHorOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-40,40,1,5)
        HealBot_Options_HealthTextHorOffset:SetValue(hbv_Skins_GetFrameVar("BarText", "HOFFSET2", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_HealthTextHorOffset, HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_Skins_GetFrameVar("BarText", "HOFFSET2", hb_lVars["Frame"]))
        HealBot_Options_sliderlabels_Init(HealBot_Options_HealthMaxChars,HEALBOT_OPTIONS_MAXCHARS,0,30,1,5,HEALBOT_WORD_AUTO,30)
        HealBot_Options_HealthMaxChars:SetValue(hbv_Skins_GetFrameVar("BarText", "HMAXCHARS", hb_lVars["Frame"]))
        if hbv_Skins_GetFrameVar("BarText", "HMAXCHARS", hb_lVars["Frame"]) == 0 then
            HealBot_Options_SetText(HealBot_Options_HealthMaxChars, HEALBOT_OPTIONS_MAXCHARS .. ": "..HEALBOT_WORD_AUTO)
        else
            HealBot_Options_SetText(HealBot_Options_HealthMaxChars, HEALBOT_OPTIONS_MAXCHARS .. ": ".. hbv_Skins_GetFrameVar("BarText", "HMAXCHARS", hb_lVars["Frame"]))
        end
        HealBot_Options_sliderlabels_Init(HealBot_Options_HealthTextOutLine,HEALBOT_OPTIONS_SKINFOUTLINE,1,3,1,1,HEALBOT_WORDS_NONE,HEALBOT_WORDS_THICK)
        HealBot_Options_HealthTextOutLine:SetValue(hbv_Skins_GetFrameVar("BarText", "HOUTLINE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_HealthTextOutLine, HEALBOT_OPTIONS_SKINFOUTLINE .. ": ".. HealBot_Options_FontOutline_List[hbv_Skins_GetFrameVar("BarText", "HOUTLINE", hb_lVars["Frame"])])
        HealBot_Options_SetLabel("HealBot_BarHealthTextPositiontxt",HEALBOT_OPTIONS_HEALTHTEXTANCHOR)
        HealBot_Options_HealthAnchor_Options()
        HealBot_Options_TabRunOnce[tab]=true
    end
end

hb_lVars["OnLoadSkinsFramesTextHealthColours"]=true
function HealBot_Options_SkinsFramesTextHealthColoursTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesTextHealthColoursTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_HealthTextColour.initialize=HealBot_Options_HealthTextColour_DropDown
        UIDropDownMenu_SetText(HealBot_Options_HealthTextColour, HealBot_Options_BarHealthColour_List[hbv_Skins_GetFrameVar("BarTextCol", "HLTH", hb_lVars["Frame"])])
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_HealthTextAlpha,HEALBOT_OPTIONS_BARALPHA,0,1,0.01,5)
        HealBot_Options_HealthTextAlpha:SetValue(hbv_Skins_GetFrameVar("BarTextCol", "HCA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_HealthTextAlpha)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_HealthTextDisAlpha,HEALBOT_OPTIONS_BARALPHADIS,0,1,0.01,5)
        HealBot_Options_HealthTextDisAlpha:SetValue(hbv_Skins_GetFrameVar("BarTextCol", "HCDA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_HealthTextDisAlpha)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_HealthTextOORAlpha,HEALBOT_OPTIONS_BARALPHAEOR,0,1,0.01,5)
        HealBot_Options_HealthTextOORAlpha:SetValue(hbv_Skins_GetFrameVar("BarTextCol", "HCOA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_HealthTextOORAlpha)
        HealBot_Options_HealthTextColourDebuff:SetChecked(hbv_Skins_GetFrameBoolean("BarTextCol", "HDEBUFF", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_HealthTextColourDebuff,HEALBOT_OPTIONS_TEXTCOL_DEBUFF)
        HealBot_Options_BarHealthCustomColour.initialize=HealBot_Options_BarHealthCustomColour_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarHealthCustomColour, HealBot_Options_Lists["HealthCustomColour"][hbv_Skins_GetFrameVar("BarText", "HEALEXTRACOL", hb_lVars["Frame"])])
        HealBot_Options_SetLabel("HealBot_Options_BarHealthCustomColourtxt",HEALBOT_SKIN_NAMETEXTCOL_TEXT)
        HealBot_Options_SetLabel("HealBot_HealthTextColourt",HEALBOT_SKIN_NAMETEXTCOL_TEXT)
        HealBot_Options_TabRunOnce[tab]=true
    end
    if hb_lVars["OnLoadSkinsFramesTextHealthColours"] then
        HealBot_Media_UpdateDefaultTexture(HealBot_HealthTextCustomColourCritical, "Options_SkinsFramesTextHealthColoursTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_HealthTextCustomColourInjured, "Options_SkinsFramesTextHealthColoursTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_HealthTextCustomColourHealthy, "Options_SkinsFramesTextHealthColoursTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_HealthTextCustomColourCriticalEnemy, "Options_SkinsFramesTextHealthColoursTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_HealthTextCustomColourInjuredEnemy, "Options_SkinsFramesTextHealthColoursTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_HealthTextCustomColourHealthyEnemy, "Options_SkinsFramesTextHealthColoursTab")
        hb_lVars["OnLoadSkinsFramesTextHealthColours"]=false
    end
end

function HealBot_Options_SkinsFramesTextHealthInHealsTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesTextHealthInHealsTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_IgnoreIncomingHealOnFull:SetChecked(hbv_Skins_GetFrameBoolean("BarText", "IGNOREONFULL", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_IgnoreIncomingHealOnFull,HEALBOT_OPTIONS_IGNOREINCOMINGONFULL)
        HealBot_Options_BarHealthIncHeal.initialize=HealBot_Options_BarHealthIncHeal_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarHealthIncHeal, HealBot_Options_BarHealthIncHeal_List[hbv_Skins_GetFrameVar("BarText", "INCHEALS", hb_lVars["Frame"])])
        HealBot_Options_BarHealthIncAbsorb.initialize=HealBot_Options_BarHealthIncAbsorb_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarHealthIncAbsorb, HealBot_Options_BarHealthIncAbsorb_List[hbv_Skins_GetFrameVar("BarText", "INCABSORBS", hb_lVars["Frame"])])
        HealBot_Options_BarHealthInHealFormat.initialize=HealBot_Options_BarHealthInHealFormat_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarHealthInHealFormat, HealBot_Options_Lists["OverHealFormat"][hbv_Skins_GetFrameVar("BarText", "SEPARATEFORMAT", hb_lVars["Frame"])])
        HealBot_Options_SetLabel("HealBot_Options_BarHealthInHealFormattxt",HEALBOT_OPTIONS_SEPARATEFORMAT)
        HealBot_Options_BarHealthInHealColour.initialize=HealBot_Options_BarHealthInHealColour_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarHealthInHealColour, HealBot_Options_Lists["OverHealColour"][hbv_Skins_GetFrameVar("BarText", "SEPARATECOL", hb_lVars["Frame"])])
        HealBot_Options_SetLabel("HealBot_Options_BarHealthInHealColourtxt",HEALBOT_OPTIONS_SEPARATECOLOUR)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesTextHealthOverhealsTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesTextHealthOverhealsTab")
    if not HealBot_Options_TabRunOnce[tab] then
        g=_G["HealBot_Options_Skins_ExtraOverHealOptTxt"]
        g:SetText(HEALBOT_OPTIONS_EXTRAHOPTOVERHEAL)
        g:SetTextColor(1,1,1,1)
        HealBot_Options_BarHealthOverHeal.initialize=HealBot_Options_BarHealthOverHeal_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarHealthOverHeal, HealBot_Options_BarHealthOverHeal_List[hbv_Skins_GetFrameVar("BarText", "OVERHEAL", hb_lVars["Frame"])])
        HealBot_Options_BarHealthOverHealFormat.initialize=HealBot_Options_BarHealthOverHealFormat_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarHealthOverHealFormat, HealBot_Options_Lists["OverHealFormat"][hbv_Skins_GetFrameVar("BarText", "OVERHEALFORMAT", hb_lVars["Frame"])])
        HealBot_Options_SetLabel("HealBot_Options_BarHealthOverHealFormattxt",HEALBOT_OPTIONS_OVERHEALFORMAT)
        HealBot_Options_BarHealthOverHealColour.initialize=HealBot_Options_BarHealthOverHealColour_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarHealthOverHealColour, HealBot_Options_Lists["OverHealColour"][hbv_Skins_GetFrameVar("BarText", "OVERHEALCOL", hb_lVars["Frame"])])
        HealBot_Options_SetLabel("HealBot_Options_BarHealthOverHealColourtxt",HEALBOT_OPTIONS_OVERHEALCOLOUR)
        g=_G["HealBot_ExtraOverHealCustomColourt"]
        g:SetText(HEALBOT_CUSTOM_CAT_CUSTOM)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesTextStateTextTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesTextStateTextTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_StateOnlyTooltip:SetChecked(hbv_Skins_GetFrameBoolean("BarText", "TAGSTATEONLYTIP", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_StateOnlyTooltip,HEALBOT_OPTIONS_TEXTONLYTIP)
        HealBot_Options_DisconnectedTag:SetText(hbv_Skins_GetFrameVar("BarText", "TAGDC", hb_lVars["Frame"]))
        HealBot_Options_UnitDeadTag:SetText(hbv_Skins_GetFrameVar("BarText", "TAGRIP", hb_lVars["Frame"]))
        HealBot_Options_OutOfRangeTag:SetText(hbv_Skins_GetFrameVar("BarText", "TAGOOR", hb_lVars["Frame"]))
        HealBot_Options_ReserverTag:SetText(hbv_Skins_GetFrameVar("BarText", "TAGR", hb_lVars["Frame"]))
        HealBot_Options_ResTag:SetText(hbv_Skins_GetFrameVar("BarText", "TAGRES", hb_lVars["Frame"]))
        HealBot_Options_GroupTag:SetText(hbv_Skins_GetFrameVar("BarText", "TAGGROUP", hb_lVars["Frame"]))
        HealBot_Options_DebuffTag:SetText(hbv_Skins_GetFrameVar("BarText", "TAGDEBUFF", hb_lVars["Frame"]))
        HealBot_Options_BuffTag:SetText(hbv_Skins_GetFrameVar("BarText", "TAGBUFF", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_DisconnectedTag,HEALBOT_DISCONNECTED_LABEL)
        HealBot_Options_SetText(HealBot_Options_UnitDeadTag,HEALBOT_DEAD_LABEL)
        HealBot_Options_SetText(HealBot_Options_OutOfRangeTag,HEALBOT_OUTOFRANGE_LABEL)
        HealBot_Options_SetText(HealBot_Options_ReserverTag,HEALBOT_RESERVED_LABEL)
        HealBot_Options_SetText(HealBot_Options_ResTag,HEALBOT_WORD_RESURRECTION)
        HealBot_Options_SetText(HealBot_Options_GroupTag,HEALBOT_SORTBY_GROUP)
        HealBot_Options_SetText(HealBot_Options_DebuffTag,HEALBOT_OPTIONS_STATEDEBUFFS)
        HealBot_Options_SetText(HealBot_Options_BuffTag,HEALBOT_OPTIONS_BUFFMISSING)
        if HEALBOT_GAME_VERSION>3 then
            HealBot_Options_SetText(HealBot_Options_SummonsTag,HEALBOT_WORD_SUMMONS)
            HealBot_Options_SummonsTag:SetText(hbv_Skins_GetFrameVar("BarText", "TAGSUM", hb_lVars["Frame"]))
        else
            HealBot_Options_SummonsTag:Hide()
        end
        HealBot_Options_BarStateTextPosition.initialize=HealBot_Options_BarStateTextPosition_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarStateTextPosition, HealBot_Options_Lists["BarStateTextAnchor"][hbv_Skins_GetFrameVar("BarText", "STATETXTANCHOR", hb_lVars["Frame"])])
        HealBot_Options_UpdateMediaFont(HealBot_Options_StateFontName,hbv_Skins_GetFrameVar("BarText", "SFONT", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_StateFontHeight,HEALBOT_OPTIONS_SKINFHEIGHT,4,28,1,2)
        HealBot_Options_StateFontHeight:SetValue(hbv_Skins_GetFrameVar("BarText", "SHEIGHT", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_StateFontHeight, HEALBOT_OPTIONS_SKINFHEIGHT..": "..hbv_Skins_GetFrameVar("BarText", "SHEIGHT", hb_lVars["Frame"]))
        HealBot_Options_sliderlabels_Init(HealBot_Options_StateTextOutLine,HEALBOT_OPTIONS_SKINFOUTLINE,1,3,1,1,HEALBOT_WORDS_NONE,HEALBOT_WORDS_THICK)
        HealBot_Options_StateTextOutLine:SetValue(hbv_Skins_GetFrameVar("BarText", "SOUTLINE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_StateTextOutLine, HEALBOT_OPTIONS_SKINFOUTLINE .. ": ".. HealBot_Options_FontOutline_List[hbv_Skins_GetFrameVar("BarText", "SOUTLINE", hb_lVars["Frame"])])
        HealBot_Options_val_OnLoad(HealBot_Options_StateFontOffset,HEALBOT_OPTIONS_TEXTOFFSET,-75,75,1,5)
        HealBot_Options_StateFontOffset:SetValue(hbv_Skins_GetFrameVar("BarText", "SOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_StateFontOffset,HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_Skins_GetFrameVar("BarText", "SOFFSET", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_StateTextHorOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-40,40,1,5)
        HealBot_Options_StateTextHorOffset:SetValue(hbv_Skins_GetFrameVar("BarText", "SOFFSET2", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_StateTextHorOffset, HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_Skins_GetFrameVar("BarText", "SOFFSET2", hb_lVars["Frame"]))
        HealBot_Options_SetLabel("HealBot_BarStateTextPositiontxt",HEALBOT_OPTIONS_STATETEXTANCHOR)
        HealBot_Options_StateUseNameFontString_Options()
        HealBot_Options_TabRunOnce[tab]=true
    end
end

hb_lVars["OnLoadSkinsFramesTextStateColours"]=true
function HealBot_Options_SkinsFramesTextStateColoursTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesTextStateColoursTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_StateTextColour.initialize=HealBot_Options_StateTextColour_DropDown
        UIDropDownMenu_SetText(HealBot_Options_StateTextColour,HealBot_Options_BarHealthColour_List[hbv_Skins_GetFrameVar("BarTextCol", "STATE", hb_lVars["Frame"])])
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_StateTextAlpha,HEALBOT_OPTIONS_BARALPHA,0,1,0.01,5)
        HealBot_Options_StateTextAlpha:SetValue(hbv_Skins_GetFrameVar("BarTextCol", "SCA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_StateTextAlpha)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_StateTextDisAlpha,HEALBOT_OPTIONS_BARALPHADIS,0,1,0.01,5)
        HealBot_Options_StateTextDisAlpha:SetValue(hbv_Skins_GetFrameVar("BarTextCol", "SCDA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_StateTextDisAlpha)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_StateTextOORAlpha,HEALBOT_OPTIONS_BARALPHAEOR,0,1,0.01,5)
        HealBot_Options_StateTextOORAlpha:SetValue(hbv_Skins_GetFrameVar("BarTextCol", "SCOA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_StateTextOORAlpha)
        g=_G["HealBot_StateTextDeadColourt"]
        g:SetText(HEALBOT_DEAD_LABEL)
        HealBot_Options_StateTextDeadCol:SetChecked(hbv_Skins_GetFrameBoolean("BarTextCol", "SRIP", hb_lVars["Frame"]))
        g=_G["HealBot_StateTextResColourt"]
        g:SetText(HEALBOT_WORD_RESURRECTION)
        HealBot_Options_StateTextResCol:SetChecked(hbv_Skins_GetFrameBoolean("BarTextCol", "SRES", hb_lVars["Frame"]))
        if HEALBOT_GAME_VERSION>3 then
            HealBot_Options_StateTextSummonCol:SetChecked(hbv_Skins_GetFrameBoolean("BarTextCol", "SSUM", hb_lVars["Frame"]))
        end
        HealBot_Options_SetLabel("HealBot_StateTextColourt",HEALBOT_SKIN_NAMETEXTCOL_TEXT)
        HealBot_Options_TabRunOnce[tab]=true
    end
    if hb_lVars["OnLoadSkinsFramesTextStateColours"] then
        HealBot_Media_UpdateDefaultTexture(HealBot_StateTextCustomColourCritical, "Options_SkinsFramesTextStateColoursTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_StateTextCustomColourInjured, "Options_SkinsFramesTextStateColoursTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_StateTextCustomColourHealthy, "Options_SkinsFramesTextStateColoursTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_StateTextCustomColourCriticalEnemy, "Options_SkinsFramesTextStateColoursTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_StateTextCustomColourInjuredEnemy, "Options_SkinsFramesTextStateColoursTab")
        HealBot_Media_UpdateDefaultTexture(HealBot_StateTextCustomColourHealthyEnemy, "Options_SkinsFramesTextStateColoursTab")
        if HEALBOT_GAME_VERSION<4 then
            HealBot_StateTextDeadColb:ClearAllPoints()
            HealBot_StateTextDeadColb:SetPoint("BOTTOM",-120,25)
            HealBot_StateTextResColb:ClearAllPoints()
            HealBot_StateTextResColb:SetPoint("BOTTOM",120,25)
            HealBot_StateTextSummonColb:Hide()
            HealBot_StateTextSummonCol:Hide()
            HealBot_Options_StateTextSummonCol:Hide()
            HealBot_Options_SkinStateSummonColPresetColour:Hide()
        end
        hb_lVars["OnLoadSkinsFramesTextStateColours"]=false
    end
end
function HealBot_Options_SkinsFramesTextAggroTextTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesTextAggroTextTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_AggroTxtPct:SetChecked(hbv_Skins_GetFrameBoolean("BarText", "TAGAGGROONLYTIP", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_AggroTxtPct,HEALBOT_OPTIONS_TEXTONLYTIP)
        local i=hbv_Skins_GetFrameVar("BarAggro", "TEXTFORMAT", hb_lVars["Frame"])
        if i>1 then i=(i*2)-1 end
        HealBot_Options_BarHealthNumFormatAggro.initialize=HealBot_Options_BarHealthNumFormatAggro_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarHealthNumFormatAggro, HealBot_Options_BarHealthNumFormat2_List[i].."77%"..HealBot_Options_BarHealthNumFormat2_List[i+1])
        HealBot_Options_BarAggroTextPosition.initialize=HealBot_Options_BarAggroTextPosition_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BarAggroTextPosition, HealBot_Options_Lists["BarAggroTextAnchor"][hbv_Skins_GetFrameVar("BarText", "AGGROTXTANCHOR", hb_lVars["Frame"])])
        HealBot_Options_UpdateMediaFont(HealBot_Options_AggroFontName,hbv_Skins_GetFrameVar("BarText", "AFONT", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_AggroFontHeight,HEALBOT_OPTIONS_SKINFHEIGHT,4,28,1,2)
        HealBot_Options_AggroFontHeight:SetValue(hbv_Skins_GetFrameVar("BarText", "AHEIGHT", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_AggroFontHeight, HEALBOT_OPTIONS_SKINFHEIGHT..": "..hbv_Skins_GetFrameVar("BarText", "AHEIGHT", hb_lVars["Frame"]))
        HealBot_Options_sliderlabels_Init(HealBot_Options_AggroTextOutLine,HEALBOT_OPTIONS_SKINFOUTLINE,1,3,1,1,HEALBOT_WORDS_NONE,HEALBOT_WORDS_THICK)
        HealBot_Options_AggroTextOutLine:SetValue(hbv_Skins_GetFrameVar("BarText", "AOUTLINE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_AggroTextOutLine, HEALBOT_OPTIONS_SKINFOUTLINE .. ": ".. HealBot_Options_FontOutline_List[hbv_Skins_GetFrameVar("BarText", "AOUTLINE", hb_lVars["Frame"])])
        HealBot_Options_val_OnLoad(HealBot_Options_AggroFontOffset,HEALBOT_OPTIONS_TEXTOFFSET,-75,75,1,5)
        HealBot_Options_AggroFontOffset:SetValue(hbv_Skins_GetFrameVar("BarText", "AOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_AggroFontOffset, HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_Skins_GetFrameVar("BarText", "AOFFSET", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_AggroTextHorOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-40,40,1,5)
        HealBot_Options_AggroTextHorOffset:SetValue(hbv_Skins_GetFrameVar("BarText", "AOFFSET2", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_AggroTextHorOffset, HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_Skins_GetFrameVar("BarText", "AOFFSET2", hb_lVars["Frame"]))
        HealBot_Options_SetLabel("HealBot_BarAggroTextPositiontxt",HEALBOT_OPTIONS_AGGROTEXTANCHOR)
        HealBot_Options_SetLabel("HealBot_Options_BarHealthAggroFormattxt",HEALBOT_OPTIONS_PERCENTAGEFORMAT)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

hb_lVars["OnLoadSkinsFramesTextAggroColours"]=true
function HealBot_Options_SkinsFramesTextAggroColoursTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesTextAggroColoursTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_AggroTextColour.initialize=HealBot_Options_AggroTextColour_DropDown
        UIDropDownMenu_SetText(HealBot_Options_AggroTextColour, HealBot_Options_BarHealthColour_List[hbv_Skins_GetFrameVar("BarTextCol", "AGGRO", hb_lVars["Frame"])])
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_AggroTextAlpha,HEALBOT_OPTIONS_BARALPHA,0,1,0.01,5)
        HealBot_Options_AggroTextAlpha:SetValue(hbv_Skins_GetFrameVar("BarTextCol", "ACA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_AggroTextAlpha)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_AggroTextDisAlpha,HEALBOT_OPTIONS_BARALPHADIS,0,1,0.01,5)
        HealBot_Options_AggroTextDisAlpha:SetValue(hbv_Skins_GetFrameVar("BarTextCol", "ACDA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_AggroTextDisAlpha)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_AggroTextOORAlpha,HEALBOT_OPTIONS_BARALPHAEOR,0,1,0.01,5)
        HealBot_Options_AggroTextOORAlpha:SetValue(hbv_Skins_GetFrameVar("BarTextCol", "ACOA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_AggroTextOORAlpha)
        HealBot_Options_SetLabel("HealBot_AggroTextColourt",HEALBOT_SKIN_NAMETEXTCOL_TEXT)
        HealBot_Options_TabRunOnce[tab]=true
    end
    if hb_lVars["OnLoadSkinsFramesTextAggroColours"] then
        HealBot_Media_UpdateDefaultTexture(HealBot_AggroTextCustomColour, "Options_SkinsFramesTextAggroColoursTab")
        hb_lVars["OnLoadSkinsFramesTextAggroColours"]=false
    end
end

function HealBot_Options_SkinsFramesTextAuxTextTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesTextAuxTextTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_AuxTextSelect1.initialize=HealBot_Options_AuxTextSelect1_DropDown
        HealBot_Options_AuxTextAlign.initialize=HealBot_Options_AuxTextAlign_DropDown
        HealBot_Options_SetText(HealBot_Options_ShowTextOnAuxBar,HEALBOT_OPTIONS_SHOWTEXT)
        HealBot_Options_SetText(HealBot_Options_VerticalTextOnAuxBar,HEALBOT_OPTIONS_VERTTEXT)
        HealBot_Options_VerticalTextOnAuxBar:SetChecked(hbv_Aux_GetBarBoolean("VERTICALTEXT", hb_lVars["Frame"], hb_lVars["AuxTxtBar"]))
        HealBot_Options_val_OnLoad(HealBot_Options_AuxFontHeight,HEALBOT_OPTIONS_SKINFHEIGHT,4,28,1,2)
        HealBot_Options_val_OnLoad(HealBot_Options_AuxFontOffset,HEALBOT_OPTIONS_TEXTOFFSET,-75,75,1,5)
        HealBot_Options_val_OnLoad(HealBot_Options_AuxFontHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-40,40,1,5)
        HealBot_Options_sliderlabels_Init(HealBot_Options_AuxMaxChars,HEALBOT_OPTIONS_MAXCHARS,0,30,1,5,HEALBOT_WORD_AUTO,30)
        HealBot_Options_sliderlabels_Init(HealBot_Options_AuxTextOutLine,HEALBOT_OPTIONS_SKINFOUTLINE,1,3,1,1,HEALBOT_WORDS_NONE,HEALBOT_WORDS_THICK)
        HealBot_Options_AuxConfigTxtChange()
        HealBot_Options_SetLabel("HealBot_Options_AuxTextSelect1t",HEALBOT_OPTIONS_AUXINDCONFIG)
        HealBot_Options_SetLabel("HealBot_AuxTextConfigAssign1_FontStr1",HEALBOT_WORD_ASSIGNMENT)
        HealBot_Options_SetLabel("HealBot_Options_AuxTextAlignt",HEALBOT_OPTIONS_TEXTALIGNMENT)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesTextAuxColoursTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesTextAuxColoursTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_AuxTextColour.initialize=HealBot_Options_AuxTextColour_DropDown
        HealBot_Options_AuxTextSelect2.initialize=HealBot_Options_AuxTextSelect2_DropDown
        HealBot_Options_AuxConfigTxtChange()
        g=_G["HealBot_AuxTextCustomColourt"]
        g:SetText(HEALBOT_CUSTOM_CAT_CUSTOM)
        HealBot_Options_SetLabel("HealBot_Options_AuxTextSelect2t",HEALBOT_OPTIONS_AUXINDCONFIG)
        HealBot_Options_SetLabel("HealBot_AuxTextConfigAssign2_FontStr1",HEALBOT_WORD_ASSIGNMENT)
        HealBot_Options_SetLabel("HealBot_Options_AuxTextColourt",HEALBOT_SKIN_NAMETEXTCOL_TEXT)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesIconsDebuffsGeneralTabIconScale()
      --HealBot_setCall("HealBot_Options_SkinsFramesIconsDebuffsGeneralTabIconScale")
    HealBot_Options_val2_OnLoad(HealBot_BarButtonDebuffIconScale,HEALBOT_OPTIONS_ICONSCALE,2.5,10,0.5,10)
    HealBot_BarButtonDebuffIconScale:SetValue(hbv_Skins_GetIconVar("DSCALE", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])*10)
    HealBot_Options_SetText(HealBot_BarButtonDebuffIconScale,HEALBOT_OPTIONS_ICONSCALE..": "..hbv_Skins_GetIconVar("DSCALE", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
end

function HealBot_Options_SkinsFramesIconsDebuffsGeneralTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesIconsDebuffsGeneralTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_IconDebuffIconSet.initialize=HealBot_Options_IconDebuffIconSet_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconDebuffIconSet, HealBot_Options_Lists["IconDebuffSets"][hb_lVars["DebuffIconSet"]])
        HealBot_Options_IconDebuffPosition.initialize=HealBot_Options_IconDebuffPosition_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconDebuffPosition, HealBot_Options_Lists["IconPosition"][hbv_Skins_GetIconVar("DEBUFFONBAR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])])
        local list=HealBot_Options_AnchorList(hbv_Skins_GetIconVar("DEBUFFONBAR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]), false)
        HealBot_Options_IconDebuffAnchor.initialize=HealBot_Options_IconDebuffAnchor_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconDebuffAnchor, list[hbv_Skins_GetIconVar("DEBUFFANCHOR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])])
        HealBot_Options_val_OnLoad(HealBot_BarButtonDebuffIconVOffset,HEALBOT_OPTIONS_TEXTOFFSET,-50,50,1,5)
        HealBot_BarButtonDebuffIconVOffset:SetValue(hbv_Skins_GetIconVar("DVOFFSET", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonDebuffIconVOffset,HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_Skins_GetIconVar("DVOFFSET", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_val_OnLoad(HealBot_BarButtonDebuffIconHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-50,50,1,5)
        HealBot_BarButtonDebuffIconHOffset:SetValue(hbv_Skins_GetIconVar("DHOFFSET", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonDebuffIconHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_Skins_GetIconVar("DHOFFSET", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        if hb_lVars["DebuffIconSet"] == 1 then
            HealBot_Options_val_OnLoad(HealBot_BarButtonMaxDebuffIcons,HEALBOT_OPTIONS_MAXICONS,0,6,1,2)
        else
            HealBot_Options_val_OnLoad(HealBot_BarButtonMaxDebuffIcons,HEALBOT_OPTIONS_MAXICONS,0,2,1,1)
        end
        HealBot_BarButtonMaxDebuffIcons:SetValue(hbv_Skins_GetIconVar("MAXDICONS", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonMaxDebuffIcons,HEALBOT_OPTIONS_MAXICONS..": "..hbv_Skins_GetIconVar("MAXDICONS", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_val_OnLoad(HealBot_BarButtonDebuffIconSpacer,HEALBOT_OPTIONS_ICONSPACER,0,5,1,1)
        HealBot_BarButtonDebuffIconSpacer:SetValue(hbv_Skins_GetIconVar("DICONSPACER", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonDebuffIconSpacer,HEALBOT_OPTIONS_ICONSPACER..": "..hbv_Skins_GetIconVar("DICONSPACER", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_BarButtonShowDebuffx2Bar:SetChecked(hbv_Skins_GetIconBoolean("DEBUFFDOUBLE", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonShowDebuffx2Bar,HEALBOT_OPTIONS_DOUBLEROW)
        HealBot_BarButtonIconAlwaysEnabled:SetChecked(hbv_Skins_GetIconBoolean("DI15EN", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonIconAlwaysEnabled,HEALBOT_OPTIONS_ENABLEHEALTHY)
        HealBot_BarButtonIconFadeOnExpire:SetChecked(hbv_Skins_GetIconBoolean("DFADE", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonIconFadeOnExpire,HEALBOT_OPTIONS_FADEONEXPIRE)
        HealBot_Options_val_OnLoad(HealBot_BarButtonIconFadeStartTime,HEALBOT_OPTIONS_FADESTARTTIME,5,15,1,3)
        HealBot_BarButtonIconFadeStartTime:SetValue(hbv_Skins_GetIconVar("DFADESECS", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonIconFadeStartTime,HEALBOT_OPTIONS_FADESTARTTIME..": "..hbv_Skins_GetIconVar("DFADESECS", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]).." "..HEALBOT_WORDS_SEC)
        HealBot_Options_SetLabel("healboticondebuffposfontstr",HEALBOT_OPTIONS_ICONPOSITION)
        HealBot_Options_SetLabel("healboticondebuffanchorfontstr",HEALBOT_OPTIONS_ICONANCHOR)
        HealBot_Options_SkinsFramesIconsDebuffsGeneralTabIconScale()
        HealBot_Options_val2_OnLoad(HealBot_BarButtonDebuffIconZoom,HEALBOT_OPTIONS_ICONZOOM,0,25,0.5,100,1)
        HealBot_BarButtonDebuffIconZoom:SetValue(hbv_Skins_GetIconVar("DZOOM", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])*100)
        HealBot_Options_SetText(HealBot_BarButtonDebuffIconZoom,HEALBOT_OPTIONS_ICONZOOM..": "..(hbv_Skins_GetIconVar("DZOOM", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])*200).."%")
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesIconsDebuffsTextTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesIconsDebuffsTextTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_BarButtonShowHoTTextCount:SetChecked(hbv_Skins_GetIconTextBoolean("DBSCNT", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonShowHoTTextCount,HEALBOT_OPTIONS_HOTTEXTCOUNT)
        HealBot_BarButtonShowHoTTextDuration:SetChecked(hbv_Skins_GetIconTextBoolean("DBSDUR", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonShowHoTTextDuration,HEALBOT_OPTIONS_HOTTEXTDURATION)
        HealBot_Options_val_OnLoad(HealBot_BarButtonIconTextDurationTime,HEALBOT_OPTIONS_SHOWDURATIONFROM,3,99,1,5)
        HealBot_BarButtonIconTextDurationTime:SetValue(hbv_Skins_GetIconTextVar("DBDURTHRH", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonIconTextDurationTime,HEALBOT_OPTIONS_SHOWDURATIONFROM..": "..hbv_Skins_GetIconTextVar("DBDURTHRH", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_val_OnLoad(HealBot_BarButtonIconTextDurationWarn,HEALBOT_OPTIONS_SHOWDURATIONWARN,1,9,1,2)
        HealBot_BarButtonIconTextDurationWarn:SetValue(hbv_Skins_GetIconTextVar("DBDURWARN", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonIconTextDurationWarn,HEALBOT_OPTIONS_SHOWDURATIONWARN..": "..hbv_Skins_GetIconTextVar("DBDURWARN", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_UpdateMediaFont(HealBot_BarButtonIconFont, hbv_Skins_GetIconTextVar("DBFONT", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_val_OnLoad(HealBot_BarButtonIconTextScale,HEALBOT_OPTIONS_SKINFHEIGHT,4,32,1,5)
        HealBot_BarButtonIconTextScale:SetValue(hbv_Skins_GetIconTextVar("DBHEIGHT", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonIconTextScale,HEALBOT_OPTIONS_SKINFHEIGHT..": "..hbv_Skins_GetIconTextVar("DBHEIGHT", hb_lVars["Frame"], hb_lVars["DebuffIconSet"]))
        HealBot_Options_IconFontOutline.initialize=HealBot_Options_IconFontOutline_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconFontOutline, HealBot_Options_FontOutline_List[hbv_Skins_GetIconTextVar("DBOUTLINE", hb_lVars["Frame"], hb_lVars["DebuffIconSet"])])
        HealBot_Options_SetLabel("HealBot_Options_Skins_HoTs2Text2", HEALBOT_OPTIONS_HOTSHOWTEXT)
        HealBot_Options_SetLabel("healboticonfontoutlinefontstr", HEALBOT_OPTIONS_SKINFOUTLINE)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesIconsBuffsGeneralTabIconScale()
      --HealBot_setCall("HealBot_Options_SkinsFramesIconsBuffsGeneralTabIconScale")
    HealBot_Options_val2_OnLoad(HealBot_BarButtonIconScale,HEALBOT_OPTIONS_ICONSCALE,2.5,10,0.5,10)
    HealBot_BarButtonIconScale:SetValue(hbv_Skins_GetIconVar("BSCALE", hb_lVars["Frame"], hb_lVars["BuffIconSet"])*10)
    HealBot_Options_SetText(HealBot_BarButtonIconScale,HEALBOT_OPTIONS_ICONSCALE..": "..hbv_Skins_GetIconVar("BSCALE", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
end

function HealBot_Options_SkinsFramesIconsBuffsGeneralTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesIconsBuffsGeneralTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_IconBuffIconSet.initialize=HealBot_Options_IconBuffIconSet_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconBuffIconSet, HealBot_Options_Lists["IconBuffSets"][hb_lVars["BuffIconSet"]])
        HealBot_Options_IconBuffPosition.initialize=HealBot_Options_IconBuffPosition_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconBuffPosition, HealBot_Options_Lists["IconPosition"][hbv_Skins_GetIconVar("BUFFONBAR", hb_lVars["Frame"], hb_lVars["BuffIconSet"])])
        local list=HealBot_Options_AnchorList(hbv_Skins_GetIconVar("BUFFONBAR", hb_lVars["Frame"], hb_lVars["BuffIconSet"]), false)
        HealBot_Options_IconBuffAnchor.initialize=HealBot_Options_IconBuffAnchor_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconBuffAnchor, list[hbv_Skins_GetIconVar("BUFFANCHOR", hb_lVars["Frame"], hb_lVars["BuffIconSet"])])
        HealBot_Options_val_OnLoad(HealBot_BarButtonBuffIconVOffset,HEALBOT_OPTIONS_TEXTOFFSET,-50,50,1,5)
        HealBot_BarButtonBuffIconVOffset:SetValue(hbv_Skins_GetIconVar("BVOFFSET", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonBuffIconVOffset,HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_Skins_GetIconVar("BVOFFSET", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_Options_val_OnLoad(HealBot_BarButtonBuffIconHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-50,50,1,5)
        HealBot_BarButtonBuffIconHOffset:SetValue(hbv_Skins_GetIconVar("BHOFFSET", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonBuffIconHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_Skins_GetIconVar("BHOFFSET", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        if hb_lVars["BuffIconSet"] == 1 then
            HealBot_Options_val_OnLoad(HealBot_BarButtonMaxBuffIcons,HEALBOT_OPTIONS_MAXICONS,0,8,1,2)
        else
            HealBot_Options_val_OnLoad(HealBot_BarButtonMaxBuffIcons,HEALBOT_OPTIONS_MAXICONS,0,2,1,1)
        end
        HealBot_BarButtonMaxBuffIcons:SetValue(hbv_Skins_GetIconVar("MAXBICONS", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonMaxBuffIcons,HEALBOT_OPTIONS_MAXICONS..": "..hbv_Skins_GetIconVar("MAXBICONS", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_Options_val_OnLoad(HealBot_BarButtonIconSpacer,HEALBOT_OPTIONS_ICONSPACER,0,5,1,1)
        HealBot_BarButtonIconSpacer:SetValue(hbv_Skins_GetIconVar("BICONSPACER", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonIconSpacer,HEALBOT_OPTIONS_ICONSPACER..": "..hbv_Skins_GetIconVar("BICONSPACER", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_BarButtonShowBuffx2Bar:SetChecked(hbv_Skins_GetIconBoolean("BUFFDOUBLE", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonShowBuffx2Bar,HEALBOT_OPTIONS_DOUBLEROW)
        HealBot_BarButtonIconBuffAlwaysEnabled:SetChecked(hbv_Skins_GetIconBoolean("BUFFI15EN", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonIconBuffAlwaysEnabled,HEALBOT_OPTIONS_ENABLEHEALTHY)
        HealBot_BarButtonIconBuffFadeOnExpire:SetChecked(hbv_Skins_GetIconBoolean("BUFFFADE", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonIconBuffFadeOnExpire,HEALBOT_OPTIONS_FADEONEXPIRE)
        HealBot_Options_val_OnLoad(HealBot_BarButtonIconBuffFadeStartTime,HEALBOT_OPTIONS_FADESTARTTIME,5,15,1,3)
        HealBot_BarButtonIconBuffFadeStartTime:SetValue(hbv_Skins_GetIconVar("BUFFFADESECS", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonIconBuffFadeStartTime,HEALBOT_OPTIONS_FADESTARTTIME..": "..hbv_Skins_GetIconVar("BUFFFADESECS", hb_lVars["Frame"], hb_lVars["BuffIconSet"]).." "..HEALBOT_WORDS_SEC)
        HealBot_Options_BarButtonIconBuffSelfCastLink:SetText(HEALBOT_OPTIONS_TAB_SELFCASTINDICATORS)
        HealBot_Options_SetLabel("healboticonbuffposfontstr",HEALBOT_OPTIONS_ICONPOSITION)
        HealBot_Options_SetLabel("healboticonbuffanchorfontstr",HEALBOT_OPTIONS_ICONANCHOR)
        HealBot_Options_SkinsFramesIconsBuffsGeneralTabIconScale()
        HealBot_Options_val2_OnLoad(HealBot_BarButtonIconZoom,HEALBOT_OPTIONS_ICONZOOM,0,25,0.5,100,1)
        HealBot_BarButtonIconZoom:SetValue(hbv_Skins_GetIconVar("BZOOM", hb_lVars["Frame"], hb_lVars["BuffIconSet"])*100)
        HealBot_Options_SetText(HealBot_BarButtonIconZoom,HEALBOT_OPTIONS_ICONZOOM..": "..(hbv_Skins_GetIconVar("BZOOM", hb_lVars["Frame"], hb_lVars["BuffIconSet"])*200).."%")
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesIconsBuffsTextTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesIconsBuffsTextTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_BarButtonShowBuffTextCount:SetChecked(hbv_Skins_GetIconTextBoolean("BUFFSCNT", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_BarButtonShowBuffTextCountSelfCast:SetChecked(hbv_Skins_GetIconTextBoolean("BUFFSSCNT", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_BarButtonShowBuffTextDuration:SetChecked(hbv_Skins_GetIconTextBoolean("BUFFSDUR", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_BarButtonShowBuffTextDurationSelfCast:SetChecked(hbv_Skins_GetIconTextBoolean("BUFFSSDUR", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonShowBuffTextCount,HEALBOT_OPTIONS_HOTTEXTCOUNT)
        HealBot_Options_SetText(HealBot_BarButtonShowBuffTextCountSelfCast,HEALBOT_OPTIONS_SELFCASTS)
        HealBot_Options_SetText(HealBot_BarButtonShowBuffTextDuration,HEALBOT_OPTIONS_HOTTEXTDURATION)
        HealBot_Options_SetText(HealBot_BarButtonShowBuffTextDurationSelfCast,HEALBOT_OPTIONS_SELFCASTS)
        HealBot_Options_val_OnLoad(HealBot_BarButtonIconBuffTextDurationTime,HEALBOT_OPTIONS_SHOWDURATIONFROM,3,99,1,5)
        HealBot_BarButtonIconBuffTextDurationTime:SetValue(hbv_Skins_GetIconTextVar("BUFFDURTHRH", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonIconBuffTextDurationTime,HEALBOT_OPTIONS_SHOWDURATIONFROM..": "..hbv_Skins_GetIconTextVar("BUFFDURTHRH", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_Options_val_OnLoad(HealBot_BarButtonIconBuffTextDurationWarn,HEALBOT_OPTIONS_SHOWDURATIONWARN,1,9,1,2)
        HealBot_BarButtonIconBuffTextDurationWarn:SetValue(hbv_Skins_GetIconTextVar("BUFFDURWARN", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonIconBuffTextDurationWarn,HEALBOT_OPTIONS_SHOWDURATIONWARN..": "..hbv_Skins_GetIconTextVar("BUFFDURWARN", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_Options_UpdateMediaFont(HealBot_BarButtonIconBuffFont,hbv_Skins_GetIconTextVar("BUFFFONT", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_Options_val_OnLoad(HealBot_BarButtonIconBuffTextScale,HEALBOT_OPTIONS_SKINFHEIGHT,4,32,1,5)
        HealBot_BarButtonIconBuffTextScale:SetValue(hbv_Skins_GetIconTextVar("BUFFHEIGHT", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_Options_SetText(HealBot_BarButtonIconBuffTextScale,HEALBOT_OPTIONS_SKINFHEIGHT..": "..hbv_Skins_GetIconTextVar("BUFFHEIGHT", hb_lVars["Frame"], hb_lVars["BuffIconSet"]))
        HealBot_Options_IconBuffFontOutline.initialize=HealBot_Options_IconBuffFontOutline_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconBuffFontOutline, HealBot_Options_FontOutline_List[hbv_Skins_GetIconTextVar("BUFFOUTLINE", hb_lVars["Frame"], hb_lVars["BuffIconSet"])])
        HealBot_Options_SetLabel("HealBot_Options_Skins_Buffs2Text2", HEALBOT_OPTIONS_HOTSHOWTEXT)
        HealBot_Options_SetLabel("healboticonbufffontoutlinefontstr",HEALBOT_OPTIONS_SKINFOUTLINE)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesIconsExtrasClassTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesIconsExtrasClassTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ShowClassIcon:SetChecked(hbv_Skins_GetFrameBoolean("Icons", "SHOWCLASS", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ShowClassIcon,HEALBOT_OPTIONS_SHOWCLASSICON)
        HealBot_Options_ShowRoleIcon:SetChecked(hbv_Skins_GetFrameBoolean("Icons", "SHOWROLE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ShowRoleIcon,HEALBOT_SHOW_ROLE)
        HealBot_Options_ShowRoleTankOnly:SetChecked(hbv_Skins_GetFrameBoolean("Icons", "SHOWMTONLY", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ShowRoleTankOnly,HEALBOT_SHOW_ROLETANKONLY)
        HealBot_Options_IconClassPosition.initialize=HealBot_Options_IconClassPosition_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconClassPosition, HealBot_Options_Lists["IconPosition"][hbv_Skins_GetFrameVar("Icons", "CLASSONBAR", hb_lVars["Frame"])])
        local list=HealBot_Options_AnchorList(hbv_Skins_GetFrameVar("Icons", "CLASSONBAR", hb_lVars["Frame"]), true)
        HealBot_Options_IconClassAnchor.initialize=HealBot_Options_IconClassAnchor_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconClassAnchor, list[hbv_Skins_GetFrameVar("Icons", "CLASSANCHOR", hb_lVars["Frame"])])
        HealBot_Options_val_OnLoad(HealBot_IconClassVOffset,HEALBOT_OPTIONS_TEXTOFFSET,-50,50,1,10)
        HealBot_IconClassVOffset:SetValue(hbv_Skins_GetFrameVar("Icons", "CLASSVOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_IconClassVOffset,HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_Skins_GetFrameVar("Icons", "CLASSVOFFSET", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_IconClassIconSet,HEALBOT_SORTBY_CLASS.." "..HEALBOT_SKIN_ICONSET,1,8,1,2)
        HealBot_IconClassIconSet:SetValue(hbv_Skins_GetVar("IconSet", "CLASS"))
        HealBot_Options_SetText(HealBot_IconClassIconSet,HEALBOT_SORTBY_CLASS.." "..HEALBOT_SKIN_ICONSET..": "..hbv_Skins_GetVar("IconSet", "CLASS"))
        HealBot_Options_val_OnLoad(HealBot_IconRoleIconSet,HEALBOT_SORTBY_ROLE.." "..HEALBOT_SKIN_ICONSET,1,7,1,2)
        HealBot_IconRoleIconSet:SetValue(hbv_Skins_GetVar("IconSet", "ROLE"))
        HealBot_Options_SetText(HealBot_IconRoleIconSet,HEALBOT_SORTBY_ROLE.." "..HEALBOT_SKIN_ICONSET..": "..hbv_Skins_GetVar("IconSet", "ROLE"))
        HealBot_Options_val_OnLoad(HealBot_IconClassHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-75,75,1,10)
        HealBot_IconClassHOffset:SetValue(hbv_Skins_GetFrameVar("Icons", "CLASSHOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_IconClassHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_Skins_GetFrameVar("Icons", "CLASSHOFFSET", hb_lVars["Frame"]))
        HealBot_Options_val2_OnLoad(HealBot_IconClassScale,HEALBOT_OPTIONS_ICONSCALE,2.5,10,0.5,10)
        HealBot_IconClassScale:SetValue(hbv_Skins_GetFrameVar("Icons", "CLASSSCALE", hb_lVars["Frame"])*10)
        HealBot_Options_SetText(HealBot_IconClassScale,HEALBOT_OPTIONS_ICONSCALE..": "..hbv_Skins_GetFrameVar("Icons", "CLASSSCALE", hb_lVars["Frame"]))
        HealBot_Options_val2_OnLoad(HealBot_IconClassZoom,HEALBOT_OPTIONS_ICONZOOM,0,25,0.5,100,1)
        HealBot_IconClassZoom:SetValue(hbv_Skins_GetFrameVar("Icons", "CLASSZOOM", hb_lVars["Frame"])*100)
        HealBot_Options_SetText(HealBot_IconClassZoom,HEALBOT_OPTIONS_ICONZOOM..": "..(hbv_Skins_GetFrameVar("Icons", "CLASSZOOM", hb_lVars["Frame"])*200).."%")
        HealBot_IconClassAlwaysEnabled:SetChecked(hbv_Skins_GetFrameBoolean("Icons", "CLASSEN", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_IconClassAlwaysEnabled,HEALBOT_OPTIONS_ENABLEHEALTHY)
        HealBot_Options_SetLabel("healboticonclassposfontstr",HEALBOT_OPTIONS_ICONPOSITION)
        HealBot_Options_SetLabel("healboticonclassanchorfontstr",HEALBOT_OPTIONS_ICONANCHOR)
        --HealBot_IconClassRole_UpdateIcons()
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesIconsExtrasRankTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesIconsExtrasRaidTargetTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ShowLeader:SetChecked(hbv_Skins_GetFrameBoolean("Icons", "SHOWRANK", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ShowLeader,HEALBOT_OPTIONS_SHOWLEADER)
        HealBot_Options_ShowLeaderMainTank:SetChecked(hbv_Skins_GetFrameBoolean("Icons", "SHOWRANKMT", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ShowLeaderMainTank,HEALBOT_OPTIONS_SHOWLEADERMT)
        HealBot_Options_IconRankPosition.initialize=HealBot_Options_IconRankPosition_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconRankPosition, HealBot_Options_Lists["IconPosition"][hbv_Skins_GetFrameVar("Icons", "RANKONBAR", hb_lVars["Frame"])])
        local list=HealBot_Options_AnchorList(hbv_Skins_GetFrameVar("Icons", "RANKONBAR", hb_lVars["Frame"]), true)
        HealBot_Options_IconRankAnchor.initialize=HealBot_Options_IconRankAnchor_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconRankAnchor, list[hbv_Skins_GetFrameVar("Icons", "RANKANCHOR", hb_lVars["Frame"])])
        HealBot_Options_val_OnLoad(HealBot_IconRankVOffset,HEALBOT_OPTIONS_TEXTOFFSET,-50,50,1,10)
        HealBot_IconRankVOffset:SetValue(hbv_Skins_GetFrameVar("Icons", "RANKVOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_IconRankVOffset,HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_Skins_GetFrameVar("Icons", "RANKVOFFSET", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_IconRankHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-75,75,1,10)
        HealBot_IconRankHOffset:SetValue(hbv_Skins_GetFrameVar("Icons", "RANKHOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_IconRankHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_Skins_GetFrameVar("Icons", "RANKHOFFSET", hb_lVars["Frame"]))
        HealBot_Options_val2_OnLoad(HealBot_IconRankScale,HEALBOT_OPTIONS_ICONSCALE,2.5,10,0.5,10)
        HealBot_IconRankScale:SetValue(hbv_Skins_GetFrameVar("Icons", "RANKSCALE", hb_lVars["Frame"])*10)
        HealBot_Options_SetText(HealBot_IconRankScale,HEALBOT_OPTIONS_ICONSCALE..": "..hbv_Skins_GetFrameVar("Icons", "RANKSCALE", hb_lVars["Frame"]))
        HealBot_IconRankAlwaysEnabled:SetChecked(hbv_Skins_GetFrameBoolean("Icons", "RANKEN", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_IconRankAlwaysEnabled,HEALBOT_OPTIONS_ENABLEHEALTHY)
        HealBot_Options_val2_OnLoad(HealBot_IconRankZoom,HEALBOT_OPTIONS_ICONZOOM,0,25,0.5,100,1)
        HealBot_IconRankZoom:SetValue(hbv_Skins_GetFrameVar("Icons", "RANKZOOM", hb_lVars["Frame"])*100)
        HealBot_Options_SetText(HealBot_IconRankZoom,HEALBOT_OPTIONS_ICONZOOM..": "..(hbv_Skins_GetFrameVar("Icons", "RANKZOOM", hb_lVars["Frame"])*200).."%")
        HealBot_Options_SetLabel("healboticonRankposfontstr",HEALBOT_OPTIONS_ICONPOSITION)
        HealBot_Options_SetLabel("healboticonRankanchorfontstr",HEALBOT_OPTIONS_ICONANCHOR)
        HealBot_Options_val_OnLoad(HealBot_IconRankIconSet,HEALBOT_OPTIONS_ICONOPTRANKBUTTON.." "..HEALBOT_SKIN_ICONSET,1,6,1,2)
        HealBot_IconRankIconSet:SetValue(hbv_Skins_GetVar("IconSet", "RANK"))
        HealBot_Options_SetText(HealBot_IconRankIconSet,HEALBOT_OPTIONS_ICONOPTRANKBUTTON.." "..HEALBOT_SKIN_ICONSET..": "..hbv_Skins_GetVar("IconSet", "RANK"))
        --HealBot_IconRank_UpdateIcons()
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesIconsExtrasRaidTargetTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesIconsExtrasRaidTargetTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_BarButtonShowRaidIcon:SetChecked(hbv_Skins_GetFrameBoolean("RaidIcon", "SHOW", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_BarButtonShowRaidIcon,HEALBOT_OPTIONS_BARBUTTONSHOWRAIDICON)
        HealBot_Options_BarButtonShowRaidIconStar:SetChecked(hbv_Skins_GetFrameBoolean("RaidIcon", "STAR", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_BarButtonShowRaidIconStar,HEALBOT_WORD_STAR)
        HealBot_Options_BarButtonShowRaidIconCircle:SetChecked(hbv_Skins_GetFrameBoolean("RaidIcon", "CIRCLE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_BarButtonShowRaidIconCircle,HEALBOT_WORD_CIRCLE)
        HealBot_Options_BarButtonShowRaidIconDiamond:SetChecked(hbv_Skins_GetFrameBoolean("RaidIcon", "DIAMOND", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_BarButtonShowRaidIconDiamond,HEALBOT_WORD_DIAMOND)
        HealBot_Options_BarButtonShowRaidIconTriangle:SetChecked(hbv_Skins_GetFrameBoolean("RaidIcon", "TRIANGLE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_BarButtonShowRaidIconTriangle,HEALBOT_WORD_TRIANGLE)
        HealBot_Options_BarButtonShowRaidIconMoon:SetChecked(hbv_Skins_GetFrameBoolean("RaidIcon", "MOON", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_BarButtonShowRaidIconMoon,HEALBOT_WORD_MOON)
        HealBot_Options_BarButtonShowRaidIconSquare:SetChecked(hbv_Skins_GetFrameBoolean("RaidIcon", "SQUARE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_BarButtonShowRaidIconSquare,HEALBOT_WORD_SQUARE)
        HealBot_Options_BarButtonShowRaidIconCross:SetChecked(hbv_Skins_GetFrameBoolean("RaidIcon", "CROSS", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_BarButtonShowRaidIconCross,HEALBOT_WORD_CROSS)
        HealBot_Options_BarButtonShowRaidIconSkull:SetChecked(hbv_Skins_GetFrameBoolean("RaidIcon", "SKULL", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_BarButtonShowRaidIconSkull,HEALBOT_WORD_SKULL)
        HealBot_Options_IconTargetPosition.initialize=HealBot_Options_IconTargetPosition_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconTargetPosition, HealBot_Options_Lists["IconPosition"][hbv_Skins_GetFrameVar("Icons", "TARGETONBAR", hb_lVars["Frame"])])
        local list=HealBot_Options_AnchorList(hbv_Skins_GetFrameVar("Icons", "TARGETONBAR", hb_lVars["Frame"]), true)
        HealBot_Options_IconTargetAnchor.initialize=HealBot_Options_IconTargetAnchor_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconTargetAnchor, list[hbv_Skins_GetFrameVar("Icons", "TARGETANCHOR", hb_lVars["Frame"])])
        HealBot_Options_val_OnLoad(HealBot_IconTargetVOffset,HEALBOT_OPTIONS_TEXTOFFSET,-50,50,1,10)
        HealBot_IconTargetVOffset:SetValue(hbv_Skins_GetFrameVar("Icons", "TARGETVOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_IconTargetVOffset,HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_Skins_GetFrameVar("Icons", "TARGETVOFFSET", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_IconTargetHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-75,75,1,10)
        HealBot_IconTargetHOffset:SetValue(hbv_Skins_GetFrameVar("Icons", "TARGETHOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_IconTargetHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_Skins_GetFrameVar("Icons", "TARGETHOFFSET", hb_lVars["Frame"]))
        HealBot_Options_val2_OnLoad(HealBot_IconTargetScale,HEALBOT_OPTIONS_ICONSCALE,2.5,10,0.5,10)
        HealBot_IconTargetScale:SetValue(hbv_Skins_GetFrameVar("Icons", "TARGETSCALE", hb_lVars["Frame"])*10)
        HealBot_Options_SetText(HealBot_IconTargetScale,HEALBOT_OPTIONS_ICONSCALE..": "..hbv_Skins_GetFrameVar("Icons", "TARGETSCALE", hb_lVars["Frame"]))
        HealBot_IconTargetAlwaysEnabled:SetChecked(hbv_Skins_GetFrameBoolean("Icons", "TARGETEN", hb_lVars["Frame"]))
        HealBot_Options_val2_OnLoad(HealBot_IconTargetZoom,HEALBOT_OPTIONS_ICONZOOM,0,25,0.5,100,1)
        HealBot_IconTargetZoom:SetValue(hbv_Skins_GetFrameVar("Icons", "TARGETZOOM", hb_lVars["Frame"])*100)
        HealBot_Options_SetText(HealBot_IconTargetZoom,HEALBOT_OPTIONS_ICONZOOM..": "..(hbv_Skins_GetFrameVar("Icons", "TARGETZOOM", hb_lVars["Frame"])*200).."%")
        HealBot_Options_SetText(HealBot_IconTargetAlwaysEnabled,HEALBOT_OPTIONS_ENABLEHEALTHY)
        HealBot_Options_SetLabel("healboticontargetposfontstr",HEALBOT_OPTIONS_ICONPOSITION)
        HealBot_Options_SetLabel("healboticontargetanchorfontstr",HEALBOT_OPTIONS_ICONANCHOR)
        HealBot_Options_val_OnLoad(HealBot_IconTargetIconSet,HEALBOT_OPTIONS_ICONOPTRAIDTARGETBUTTON.." "..HEALBOT_SKIN_ICONSET,1,3,1,1)
        HealBot_IconTargetIconSet:SetValue(hbv_Skins_GetVar("IconSet", "TARGET"))
        HealBot_Options_SetText(HealBot_IconTargetIconSet,HEALBOT_OPTIONS_ICONOPTRAIDTARGETBUTTON.." "..HEALBOT_SKIN_ICONSET..": "..hbv_Skins_GetVar("IconSet", "TARGET"))
        --HealBot_IconTarget_UpdateIcons()
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesIconsExtrasCombatTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesIconsExtrasRaidTargetTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ShowCombatState:SetChecked(hbv_Skins_GetFrameBoolean("Icons", "SHOWCOMBAT", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ShowCombatState,HEALBOT_OPTIONS_SHOWCOMBATSTATE)
        HealBot_Options_ShowHostile:SetChecked(hbv_Skins_GetFrameBoolean("Icons", "SHOWHOSTILE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ShowHostile,HEALBOT_OPTIONS_SHOWHOSTILE)
        HealBot_Options_IconCombatPosition.initialize=HealBot_Options_IconCombatPosition_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconCombatPosition, HealBot_Options_Lists["IconPosition"][hbv_Skins_GetFrameVar("Icons", "COMBATONBAR", hb_lVars["Frame"])])
        local list=HealBot_Options_AnchorList(hbv_Skins_GetFrameVar("Icons", "COMBATONBAR", hb_lVars["Frame"]), true)
        HealBot_Options_IconCombatAnchor.initialize=HealBot_Options_IconCombatAnchor_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconCombatAnchor, list[hbv_Skins_GetFrameVar("Icons", "COMBATANCHOR", hb_lVars["Frame"])])
        HealBot_Options_val_OnLoad(HealBot_IconCombatVOffset,HEALBOT_OPTIONS_TEXTOFFSET,-50,50,1,10)
        HealBot_IconCombatVOffset:SetValue(hbv_Skins_GetFrameVar("Icons", "COMBATVOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_IconCombatVOffset,HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_Skins_GetFrameVar("Icons", "COMBATVOFFSET", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_IconCombatHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-75,75,1,10)
        HealBot_IconCombatHOffset:SetValue(hbv_Skins_GetFrameVar("Icons", "COMBATHOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_IconCombatHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_Skins_GetFrameVar("Icons", "COMBATHOFFSET", hb_lVars["Frame"]))
        HealBot_Options_val2_OnLoad(HealBot_IconCombatScale,HEALBOT_OPTIONS_ICONSCALE,2.5,10,0.5,10)
        HealBot_IconCombatScale:SetValue(hbv_Skins_GetFrameVar("Icons", "COMBATSCALE", hb_lVars["Frame"])*10)
        HealBot_Options_SetText(HealBot_IconCombatScale,HEALBOT_OPTIONS_ICONSCALE..": "..hbv_Skins_GetFrameVar("Icons", "COMBATSCALE", hb_lVars["Frame"]))
        HealBot_IconCombatAlwaysEnabled:SetChecked(hbv_Skins_GetFrameBoolean("Icons", "COMBATEN", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_IconCombatAlwaysEnabled,HEALBOT_OPTIONS_ENABLEHEALTHY)
        HealBot_Options_val2_OnLoad(HealBot_IconCombatZoom,HEALBOT_OPTIONS_ICONZOOM,0,25,0.5,100,1)
        HealBot_IconCombatZoom:SetValue(hbv_Skins_GetFrameVar("Icons", "COMBATZOOM", hb_lVars["Frame"])*100)
        HealBot_Options_SetText(HealBot_IconCombatZoom,HEALBOT_OPTIONS_ICONZOOM..": "..(hbv_Skins_GetFrameVar("Icons", "COMBATZOOM", hb_lVars["Frame"])*200).."%")
        HealBot_Options_SetLabel("healboticonCombatposfontstr",HEALBOT_OPTIONS_ICONPOSITION)
        HealBot_Options_SetLabel("healboticonCombatanchorfontstr",HEALBOT_OPTIONS_ICONANCHOR)
        HealBot_Options_val_OnLoad(HealBot_IconCombatIconSet,HEALBOT_COMBAT.." "..HEALBOT_SKIN_ICONSET,1,4,1,2)
        HealBot_IconCombatIconSet:SetValue(hbv_Skins_GetVar("IconSet", "COMBAT"))
        HealBot_Options_SetText(HealBot_IconCombatIconSet,HEALBOT_COMBAT.." "..HEALBOT_SKIN_ICONSET..": "..hbv_Skins_GetVar("IconSet", "COMBAT"))
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesIconsExtrasReadyCheckTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesIconsExtrasReadyCheckTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ShowReadyCheck:SetChecked(hbv_Skins_GetFrameBoolean("Icons", "SHOWRC", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ShowReadyCheck,HEALBOT_OPTIONS_SHOWREADYCHECK)
        HealBot_Options_ShowResting:SetChecked(hbv_Skins_GetFrameBoolean("Icons", "SHOWRESTING", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ShowResting,HEALBOT_OPTIONS_SHOWRESTING)
        HealBot_Options_ShowAFK:SetChecked(hbv_Skins_GetFrameBoolean("Icons", "SHOWAFK", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ShowAFK,HEALBOT_OPTIONS_SHOWAFK)
        HealBot_Options_IconRCPosition.initialize=HealBot_Options_IconRCPosition_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconRCPosition, HealBot_Options_Lists["IconPosition"][hbv_Skins_GetFrameVar("Icons", "RCONBAR", hb_lVars["Frame"])])
        local list=HealBot_Options_AnchorList(hbv_Skins_GetFrameVar("Icons", "RCONBAR", hb_lVars["Frame"]), true)
        HealBot_Options_IconRCAnchor.initialize=HealBot_Options_IconRCAnchor_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconRCAnchor, list[hbv_Skins_GetFrameVar("Icons", "RCANCHOR", hb_lVars["Frame"])])
        HealBot_Options_val_OnLoad(HealBot_IconRCVOffset,HEALBOT_OPTIONS_TEXTOFFSET,-50,50,1,10)
        HealBot_IconRCVOffset:SetValue(hbv_Skins_GetFrameVar("Icons", "RCVOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_IconRCVOffset,HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_Skins_GetFrameVar("Icons", "RCVOFFSET", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_IconRCHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-75,75,1,10)
        HealBot_IconRCHOffset:SetValue(hbv_Skins_GetFrameVar("Icons", "RCHOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_IconRCHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_Skins_GetFrameVar("Icons", "RCHOFFSET", hb_lVars["Frame"]))
        HealBot_Options_val2_OnLoad(HealBot_IconRCScale,HEALBOT_OPTIONS_ICONSCALE,2.5,10,0.5,10)
        HealBot_IconRCScale:SetValue(hbv_Skins_GetFrameVar("Icons", "RCSCALE", hb_lVars["Frame"])*10)
        HealBot_Options_SetText(HealBot_IconRCScale,HEALBOT_OPTIONS_ICONSCALE..": "..hbv_Skins_GetFrameVar("Icons", "RCSCALE", hb_lVars["Frame"]))
        HealBot_IconRCAlwaysEnabled:SetChecked(hbv_Skins_GetFrameBoolean("Icons", "RCEN", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_IconRCAlwaysEnabled,HEALBOT_OPTIONS_ENABLEHEALTHY)
        HealBot_Options_val2_OnLoad(HealBot_IconRCZoom,HEALBOT_OPTIONS_ICONZOOM,0,25,0.5,100,1)
        HealBot_IconRCZoom:SetValue(hbv_Skins_GetFrameVar("Icons", "RCZOOM", hb_lVars["Frame"])*100)
        HealBot_Options_SetText(HealBot_IconRCZoom,HEALBOT_OPTIONS_ICONZOOM..": "..(hbv_Skins_GetFrameVar("Icons", "RCZOOM", hb_lVars["Frame"])*200).."%")
        HealBot_Options_SetLabel("healboticonRCposfontstr",HEALBOT_OPTIONS_ICONPOSITION)
        HealBot_Options_SetLabel("healboticonRCanchorfontstr",HEALBOT_OPTIONS_ICONANCHOR)
        HealBot_Options_val_OnLoad(HealBot_IconReadyCheckIconSet,HEALBOT_OPTIONS_READYCHECK.." "..HEALBOT_SKIN_ICONSET,1,6,1,2)
        HealBot_IconReadyCheckIconSet:SetValue(hbv_Skins_GetVar("IconSet", "RC"))
        HealBot_Options_SetText(HealBot_IconReadyCheckIconSet,HEALBOT_OPTIONS_READYCHECK.." "..HEALBOT_SKIN_ICONSET..": "..hbv_Skins_GetVar("IconSet", "RC"))
        HealBot_Options_val_OnLoad(HealBot_IconStateIconSet,HEALBOT_OPTIONS_TAB_STATETEXT.." "..HEALBOT_SKIN_ICONSET,1,3,1,1)
        HealBot_IconStateIconSet:SetValue(hbv_Skins_GetVar("IconSet", "STATE"))
        HealBot_Options_SetText(HealBot_IconStateIconSet,HEALBOT_OPTIONS_TAB_STATETEXT.." "..HEALBOT_SKIN_ICONSET..": "..hbv_Skins_GetVar("IconSet", "STATE"))
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesIconsExtrasOORArrowTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesIconsExtrasOORArrowTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ShowDirection:SetChecked(hbv_Skins_GetFrameBoolean("Icons", "SHOWDIR", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ShowDirection,HEALBOT_OPTIONS_SHOWDIRECTION)
        HealBot_Options_ShowDirectionMouseOver:SetChecked(hbv_Skins_GetFrameBoolean("Icons", "SHOWDIRMOUSE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ShowDirectionMouseOver,HEALBOT_OPTIONS_SHOWDIRECTIONMOUSE)
        HealBot_Options_IconOORArrowPosition.initialize=HealBot_Options_IconOORArrowPosition_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconOORArrowPosition, HealBot_Options_Lists["IconPosition"][hbv_Skins_GetFrameVar("Icons", "OORONBAR", hb_lVars["Frame"])])
        local list=HealBot_Options_AnchorList(hbv_Skins_GetFrameVar("Icons", "OORONBAR", hb_lVars["Frame"]), true)
        HealBot_Options_IconOORArrowAnchor.initialize=HealBot_Options_IconOORArrowAnchor_DropDown
        UIDropDownMenu_SetText(HealBot_Options_IconOORArrowAnchor, list[hbv_Skins_GetFrameVar("Icons", "OORANCHOR", hb_lVars["Frame"])])
        HealBot_Options_val_OnLoad(HealBot_IconOORArrowVOffset,HEALBOT_OPTIONS_TEXTOFFSET,-50,50,1,10)
        HealBot_IconOORArrowVOffset:SetValue(hbv_Skins_GetFrameVar("Icons", "OORVOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_IconOORArrowVOffset,HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_Skins_GetFrameVar("Icons", "OORVOFFSET", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_IconOORArrowHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-75,75,1,10)
        HealBot_IconOORArrowHOffset:SetValue(hbv_Skins_GetFrameVar("Icons", "OORHOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_IconOORArrowHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_Skins_GetFrameVar("Icons", "OORHOFFSET", hb_lVars["Frame"]))
        HealBot_Options_val2_OnLoad(HealBot_IconOORArrowScale,HEALBOT_OPTIONS_ICONSCALE,2.5,10,0.5,10)
        HealBot_IconOORArrowScale:SetValue(hbv_Skins_GetFrameVar("Icons", "OORSCALE", hb_lVars["Frame"])*10)
        HealBot_Options_SetText(HealBot_IconOORArrowScale,HEALBOT_OPTIONS_ICONSCALE..": "..hbv_Skins_GetFrameVar("Icons", "OORSCALE", hb_lVars["Frame"]))
        HealBot_IconOORArrowAlwaysEnabled:SetChecked(hbv_Skins_GetFrameBoolean("Icons", "OOREN", hb_lVars["Frame"]))
        HealBot_Options_val2_OnLoad(HealBot_IconOORZoom,HEALBOT_OPTIONS_ICONZOOM,0,25,0.5,100,1)
        HealBot_IconOORZoom:SetValue(hbv_Skins_GetFrameVar("Icons", "OORZOOM", hb_lVars["Frame"])*100)
        HealBot_Options_SetText(HealBot_IconOORZoom,HEALBOT_OPTIONS_ICONZOOM..": "..(hbv_Skins_GetFrameVar("Icons", "OORZOOM", hb_lVars["Frame"])*200).."%")
        HealBot_Options_SetText(HealBot_IconOORArrowAlwaysEnabled,HEALBOT_OPTIONS_ENABLEHEALTHY)
        HealBot_Options_SetLabel("healboticonOORArrowposfontstr",HEALBOT_OPTIONS_ICONPOSITION)
        HealBot_Options_SetLabel("healboticonOORArrowanchorfontstr",HEALBOT_OPTIONS_ICONANCHOR)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesActionIconsGeneralTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesActionIconsGeneralTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ActionIconsCopyFrom.initialize=HealBot_Options_ActionIconsCopyFrom_DropDown
        UIDropDownMenu_SetText(HealBot_Options_ActionIconsCopyFrom, Healbot_Config_Skins.Skins[hb_lVars["ActionIconsCopyFrom"]])
        HealBot_Options_ActionIconsAnchor.initialize=HealBot_Options_ActionIconsAnchor_DropDown
        HealBot_Options_val_OnLoad(HealBot_Options_ActionIconsNumber,HEALBOT_OPTIONS_NUMICONS,0,HealBot_ActionIcons_retLuVars("MaxIcons"),1,2)
        HealBot_Options_val_OnLoad(HealBot_Options_ActionIconsSize,HEALBOT_OPTIONS_ICONSIZE,10,80,1,5)
        HealBot_Options_val_OnLoad(HealBot_Options_ActionIconsSpace,HEALBOT_OPTIONS_ICONSPACER,1,20,1,2)
        HealBot_Options_val_OnLoad(HealBot_Options_ActionIconsOffsetX,HEALBOT_OPTIONS_TEXTHOROFFSET,-75,75,1,5)
        HealBot_Options_val_OnLoad(HealBot_Options_ActionIconsOffsetY,HEALBOT_OPTIONS_TEXTOFFSET,-75,75,1,5)
        HealBot_Options_ActionIconsGlowSize.initialize=HealBot_Options_ActionIconsGlowSize_DropDown
        HealBot_Options_ActionIconsLock.initialize=HealBot_Options_ActionIconsLock_DropDown
        HealBot_Options_ActionIconsNumber:SetValue(hbv_ActionIcons_GetVars("NUMICONS", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsNumber,HEALBOT_OPTIONS_NUMICONS..": "..hbv_ActionIcons_GetVars("NUMICONS", hb_lVars["Frame"]))
        UIDropDownMenu_SetText(HealBot_Options_ActionIconsAnchor, HealBot_Options_Lists["ActionIconsAnchor"][hbv_ActionIcons_GetVars("ANCHOR", hb_lVars["Frame"])])
        HealBot_Options_ActionIconsSize:SetValue(hbv_ActionIcons_GetVars("SIZE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsSize,HEALBOT_OPTIONS_ICONSIZE..": "..hbv_ActionIcons_GetVars("SIZE", hb_lVars["Frame"]))
        HealBot_Options_ActionIconsSpace:SetValue(hbv_ActionIcons_GetVars("SPACE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsSpace,HEALBOT_OPTIONS_ICONSPACER..": "..hbv_ActionIcons_GetVars("SPACE", hb_lVars["Frame"]))
        HealBot_Options_ActionIconsOffsetX:SetValue(hbv_ActionIcons_GetVars("OFFSETX", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsOffsetX,HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_ActionIcons_GetVars("OFFSETX", hb_lVars["Frame"]))
        HealBot_Options_ActionIconsOffsetY:SetValue(hbv_ActionIcons_GetVars("OFFSETY", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsOffsetY,HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_ActionIcons_GetVars("OFFSETY", hb_lVars["Frame"]))
        HealBot_Options_ActionIconsDoubleRow:SetChecked(hbv_ActionIcons_GetBoolean("DOUBLEROW", hb_lVars["Frame"]))
        UIDropDownMenu_SetText(HealBot_Options_ActionIconsGlowSize,HealBot_Options_Lists["GlowFrame"][hbv_ActionIcons_GetVars("GLOWSIZE", hb_lVars["Frame"])])
        UIDropDownMenu_SetText(HealBot_Options_ActionIconsLock,HealBot_Options_Lists["Lock"][hbv_ActionIcons_GetVars("LOCK", hb_lVars["Frame"])])
        HealBot_Options_SetLabel("healbotactioniconsanchortxt",HEALBOT_OPTIONS_AUXBARANCHOR)
        HealBot_Options_SetLabel("healbotactioniconscopyfromtxt",HEALBOT_OPTIONS_COPY_FROM)
        HealBot_Options_SetText(HealBot_Options_ActionIconsDoubleRow,HEALBOT_OPTIONS_DOUBLEROW)
        HealBot_Options_SetLabel("healbotactioniconsglowsizetxt",HEALBOT_OPTIONS_ICONGLOWSIZE)
        HealBot_Options_SetLabel("healbotactioniconslocktxt",HEALBOT_OPTIONS_ICONLOCK)
        HealBot_Options_SetLabel("HealBot_Options_SkinsFrameActionIconsGeneralTxt2",HEALBOT_OPTIONS_ACTIONICONSGENOPTTEXT2)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_FramesActionIconsLists()
      --HealBot_setCall("HealBot_Options_FramesActionIconsLists")
    if hb_lVars["SetActionIconsList"] then
        hb_lVars["SetActionIconsList"]=false
        HealBot_Timers_Set("SKINS","SetActionIconsList",true)
    end
end

function HealBot_Options_FramesActionIconsSetLists(saveProfile)
      --HealBot_setCall("HealBot_Options_FramesActionIconsSetLists")
    if HealBot_Options:IsVisible() then
        hb_lVars["SetActionIconsList"]=true
        if hb_lVars["CurrentTab"] == "SkinsFramesActionIconsIcons" then
            HealBot_Options_FramesActionIconsLists()
        else
            HealBot_Timers_Set("SKINS","FramesActionIconsLists",true,true)
        end
    end
    if saveProfile then HealBot_Timers_Set("OOC","SaveActionIconsProfile",true) end
end

function HealBot_Options_SkinsFramesActionIconsIconsTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesActionIconsIconsTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_TabRunOnce[tab]=true
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_ActionIconsHighlight,HEALBOT_OPTIONS_HIGHLIGHTEDOPACITY,0,1,0.01,5)
        HealBot_Options_ActionIconsHighlight:SetValue(hbv_ActionIcons_GetVars("HIGHLIGHT", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsHighlight,HEALBOT_OPTIONS_HIGHLIGHTEDOPACITY..": "..hbv_ActionIcons_GetVars("HIGHLIGHT", hb_lVars["Frame"]))
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_ActionIconsFade,HEALBOT_OPTIONS_FADEDOPACITY,0,1,0.01,5)
        HealBot_Options_ActionIconsFade:SetValue(hbv_ActionIcons_GetVars("FADE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsFade,HEALBOT_OPTIONS_FADEDOPACITY..": "..hbv_ActionIcons_GetVars("FADE", hb_lVars["Frame"]))
        HealBot_Options_SetSkinsFrameActionIconsListPageButtons()
        hb_lVars["SetActionIconsList"]=true
    end
    HealBot_Options_FramesActionIconsLists()
end

function HealBot_Options_SkinsFramesActionIconsConfigTab(tab, force)
      --HealBot_setCall("HealBot_Options_SkinsFramesActionIconsConfigTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ActionIcons_PlayerNames()
        HealBot_Options_ActionIconsConfigID.initialize=HealBot_Options_ActionIconsConfigID_DropDown
        UIDropDownMenu_SetText(HealBot_Options_ActionIconsConfigID, hb_lVars["ActionIconsID"])
        HealBot_Options_SelectSpellsActionIcons.initialize=HealBot_Options_SelectSpellsActionIcons_DropDown
        UIDropDownMenu_SetText(HealBot_Options_SelectSpellsActionIcons, HEALBOT_OPTIONS_TAB_SPELLS)
        HealBot_Options_SelectMacrosActionIcons.initialize=HealBot_Options_SelectMacrosActionIcons_DropDown
        UIDropDownMenu_SetText(HealBot_Options_SelectMacrosActionIcons, HEALBOT_WORD_MACROS)
        HealBot_Options_SelectItemsActionIcons.initialize=HealBot_Options_SelectItemsActionIcons_DropDown
        UIDropDownMenu_SetText(HealBot_Options_SelectItemsActionIcons, HEALBOT_OPTIONS_ITEMS)
        HealBot_Options_ActionIconsTarget.initialize=HealBot_Options_ActionIconsTarget_DropDown
        HealBot_Options_ActionIconsHighlightFilter.initialize=HealBot_Options_ActionIconsHighlightFilter_DropDown
        HealBot_Options_ActionIconsAlertFilter.initialize=HealBot_Options_ActionIconsAlertFilter_DropDown
        HealBot_Options_ActionIconsSelfAlertFilter.initialize=HealBot_Options_ActionIconsSelfAlertFilter_DropDown
        HealBot_Options_ActionIconsAlertBuffTag.initialize=HealBot_Options_ActionIconsAlertBuffTag_DropDown
        HealBot_Options_ActionIconsSelfAlertBuffTag.initialize=HealBot_Options_ActionIconsSelfAlertBuffTag_DropDown
        HealBot_Options_ActionIconsAlertDebuffTag.initialize=HealBot_Options_ActionIconsAlertDebuffTag_DropDown
        HealBot_Options_ActionIconsAlertGlow.initialize=HealBot_Options_ActionIconsAlertGlow_DropDown
        HealBot_Options_SetLabel("healbotactioniconsconfigidtxt",HEALBOT_OPTIONS_ICONID)
        HealBot_Options_SetLabel("healbotactioniconsabilitytxt",HEALBOT_OPTIONS_ABILITY)
        HealBot_Options_SetLabel("healbotactioniconsbindlabel",HEALBOT_WORD_KEYBIND)
        HealBot_Options_SetLabel("healbotactioniconstargettxt",HEALBOT_OPTIONS_TARGETHEALS)
        HealBot_Options_SetLabel("healbotactioniconshighlightfiltertxt",HEALBOT_OPTIONS_HIGHLIGHTFILTER)
        HealBot_Options_SetLabel("healbotactioniconsalertfiltertxt",HEALBOT_OPTIONS_CONDITION)
        HealBot_Options_SetLabel("healbotactioniconsselfalertfiltertxt",HEALBOT_OPTIONS_CONDITION)
        HealBot_Options_SetLabel("healbotactioniconsalertbufftagtxt",HEALBOT_WORD_TAG)
        HealBot_Options_SetLabel("healbotactioniconsalertdebufftagtxt",HEALBOT_WORD_TAG)
        HealBot_Options_SetLabel("healbotactioniconsalertbuffnametxt",HEALBOT_OPTIONS_BUFF)
        HealBot_Options_SetLabel("healbotactioniconsalertbuffstackstxt",HEALBOT_PLUGIN_STACKS)
        HealBot_Options_SetLabel("healbotactioniconsselfalertbuffstackstxt",HEALBOT_PLUGIN_STACKS)
        HealBot_Options_SetLabel("healbotactioniconsalertdebuffstackstxt",HEALBOT_PLUGIN_STACKS)
        HealBot_Options_SetLabel("healbotactioniconsalertdebuffnametxt",HEALBOT_SKIN_DEBTEXT)
        HealBot_Options_SetLabel("healbotspellsactioninconsfontstr",HEALBOT_OPTIONS_TAB_SPELLS)
        HealBot_Options_SetLabel("healbotmacroactioniconsfontstr",HEALBOT_WORD_MACROS)
        HealBot_Options_SetLabel("healbotitemsactioniconsfontstr",HEALBOT_OPTIONS_ITEMS)
        HealBot_Options_SetLabel("healbotactioniconsalertglowtxt",HEALBOT_SKIN_ICONGLOW)
        HealBot_Options_SetLabel("healbotactioniconsalertglowcoltxt",HEALBOT_SKIN_ICONGLOWCOL)
        HealBot_Options_SetText(HealBot_Options_ActionIconsAlertOnlyIC,HEALBOT_PLUGIN_BUFFWATCHONLYINCOMBAT)
        HealBot_Options_SetText(HealBot_Options_ActionIconsAlertOnlyInGR,HEALBOT_OPTIONS_IN_A_GROUP)
        HealBot_Options_SetText(HealBot_Options_ActionIconsAlertOnlyInInst,HEALBOT_OPTIONS_ONLY_IN_INSTANCE)
        HealBot_Options_SetText(HealBot_Options_ActionIconsAlertBuffSelfCast,HEALBOT_OPTIONS_CASTBYSELF)
        HealBot_Options_SetText(HealBot_Options_ActionIconsSelfAlertBuffSelfCast,HEALBOT_OPTIONS_CASTBYSELF)
        HealBot_Options_SetText(HealBot_Options_ActionIconsAlertDebuffSelfCast,HEALBOT_OPTIONS_CASTBYSELF)
        HealBot_Options_val_OnLoad(HealBot_Options_ActionIconsAlertBuffMinStacks,HEALBOT_WORDS_MIN,1,20,1,2)
        HealBot_Options_val_OnLoad(HealBot_Options_ActionIconsSelfAlertBuffMinStacks,HEALBOT_WORDS_MIN,1,20,1,2)
        HealBot_Options_sliderlabels_Init(HealBot_Options_ActionIconsAlertBuffMaxStacks,HEALBOT_WORDS_MAX,2,21,1,2,1,99)
        HealBot_Options_sliderlabels_Init(HealBot_Options_ActionIconsSelfAlertBuffMaxStacks,HEALBOT_WORDS_MAX,2,21,1,2,1,99)
        HealBot_Options_val_OnLoad(HealBot_Options_ActionIconsAlertDebuffMinStacks,HEALBOT_WORDS_MIN,1,20,1,2)
        HealBot_Options_sliderlabels_Init(HealBot_Options_ActionIconsAlertDebuffMaxStacks,HEALBOT_WORDS_MAX,2,21,1,2,1,99)
        HealBot_Options_sliderlabels_Init(HealBot_Options_ActionIconsAlertHealth,HEALBOT_PLUGIN_HEALTHALERTLEVEL,10,90,1,5,"10%","90%")
        HealBot_Options_sliderlabels_Init(HealBot_Options_ActionIconsAlertHealthAbove,HEALBOT_PLUGIN_HEALTHALERTLEVEL,10,90,1,5,"10%","90%")
        HealBot_Options_sliderlabels_Init(HealBot_Options_ActionIconsAlertMana,HEALBOT_PLUGIN_MANAALERTLEVEL,10,90,1,5,"10%","90%")
        HealBot_Options_sliderlabels_Init(HealBot_Options_ActionIconsAlertManaAbove,HEALBOT_PLUGIN_MANAALERTLEVEL,10,90,1,5,"10%","90%")
        HealBot_Options_sliderlabels_Init(HealBot_Options_ActionIconsAlertAggro,HEALBOT_PLUGIN_AURAWATCHAGGROLEVEL,1,3,1,1,"1","3")
        HealBot_Media_UpdateDefaultTexture(HealBot_Options_ActionIconsAlertGlowColpick, "Options_SkinsFramesActionIconsConfigTab")
        HealBot_Options_val_OnLoad(HealBot_Options_ActionIconsAlertGlowTimeout,HEALBOT_SKIN_ICONGLOWTIMEOUT,5,120,5,3)
        local g
        for c=1,3 do
            g=_G["HealBot_Options_SkinsFrameActionIconsCond"..c.."Txt"]
            g:SetText(HEALBOT_OPTIONS_CONDITION.." "..c)
        end
        g=_G["HealBot_Options_SkinsFrameActionIconsCond4Txt"]
        g:SetText(HEALBOT_OPTIONS_CONDITION.." "..HEALBOT_OPTIONS_SELFHEALS)
        HealBot_Options_TabRunOnce[tab]=true
        force=true
    elseif hb_lVars["ActionIconsSetPlayerNames"] then
        hb_lVars["ActionIconsSetPlayerNames"]=false
        HealBot_Options_ActionIcons_PlayerNames()
    end
    if force then
        if hbv_ActionIcons_DataExists("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"]) then
            UIDropDownMenu_SetText(HealBot_Options_ActionIconsTarget, hbv_ActionIcons_GetData("Target", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        else
            UIDropDownMenu_SetText(HealBot_Options_ActionIconsTarget, HEALBOT_WORDS_UNSET)
        end
        UIDropDownMenu_SetText(HealBot_Options_ActionIconsHighlightFilter, HealBot_Options_Lists["ActionIconsHighlightFilter"][hbv_ActionIcons_GetData("HighlightFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"])])

        UIDropDownMenu_SetText(HealBot_Options_ActionIconsAlertGlow, HealBot_Options_Lists["AuraIconGlow"][hbv_ActionIcons_GetData("AlertGlowStyle", hb_lVars["Frame"], hb_lVars["ActionIconsID"])])
        if HealBot_ActionIcons_GetSpell(hbv_ActionIcons_GetData("Ability", hb_lVars["Frame"], hb_lVars["ActionIconsID"])) then
            HealBot_Options_ActionIconsConfigAbility:SetText(HealBot_ActionIcons_GetSpell(hbv_ActionIcons_GetData("Ability", hb_lVars["Frame"], hb_lVars["ActionIconsID"])))
        else
            HealBot_Options_ActionIconsConfigAbility:SetText("")
        end
        healbotactioniconsbindtxt:SetText(hbv_ActionIcons_GetData("Bind", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        if hbv_ActionIcons_DataExists("bKey", hb_lVars["Frame"], hb_lVars["ActionIconsID"]) then
            healbotactioniconsbindtxt:SetText(hbv_ActionIcons_GetData("bKey", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
            healbotactioniconsbindtxt:SetTextColor(0.4,1,0.4)
        else
            HealBot_Options_ActionIconsBindValid(hb_lVars["Frame"], hb_lVars["ActionIconsID"])
        end
        HealBot_Options_ComboClass_SetIcon(9, nil, nil, hbv_ActionIcons_GetData("Ability", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        HealBot_Options_ActionIconsAlertOnlyIC:SetChecked(hbv_ActionIcons_GetBooleanData("inCombat", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        HealBot_Options_ActionIconsAlertOnlyInGR:SetChecked(hbv_ActionIcons_GetBooleanData("inGroup", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        HealBot_Options_ActionIconsAlertOnlyInInst:SetChecked(hbv_ActionIcons_GetBooleanData("inInst", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        UIDropDownMenu_SetText(HealBot_Options_ActionIconsAlertBuffListFilter,HealBot_Options_Lists["AuraHistoryCat"][hb_lVars["AIconBuffByHistoryFilter"]])
        HealBot_Options_ActionIconsAlertBuffListFilter.initialize=HealBot_Options_ActionIconsAlertBuffListFilter_DropDown
        HealBot_Options_ActionIconsBuffByHistory_NewCat()
        HealBot_Options_ActionIconsAlertDebuffListFilter.initialize=HealBot_Options_ActionIconsAlertDebuffListFilter_DropDown
        UIDropDownMenu_SetText(HealBot_Options_ActionIconsAlertDebuffListFilter,HealBot_Options_Lists["AuraHistoryCat"][hb_lVars["AIconDebuffByHistoryFilter"]])
        HealBot_Options_ActionIconsDebuffByHistory_NewCat()
        HealBot_Options_ActionIconsAlertHealth:SetValue(hbv_ActionIcons_GetData("AlertHealth", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsAlertHealth, HEALBOT_PLUGIN_HEALTHALERTLEVEL..": "..hbv_ActionIcons_GetData("AlertHealth", hb_lVars["Frame"], hb_lVars["ActionIconsID"]).."%")
        HealBot_Options_ActionIconsAlertHealthAbove:SetValue(hbv_ActionIcons_GetData("AlertHealthAbove", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsAlertHealthAbove, HEALBOT_PLUGIN_HEALTHALERTLEVEL..": "..hbv_ActionIcons_GetData("AlertHealthAbove", hb_lVars["Frame"], hb_lVars["ActionIconsID"]).."%")
        HealBot_Options_ActionIconsAlertMana:SetValue(hbv_ActionIcons_GetData("AlertMana", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsAlertMana, HEALBOT_PLUGIN_MANAALERTLEVEL..": "..hbv_ActionIcons_GetData("AlertMana", hb_lVars["Frame"], hb_lVars["ActionIconsID"]).."%")
        HealBot_Options_ActionIconsAlertManaAbove:SetValue(hbv_ActionIcons_GetData("AlertManaAbove", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsAlertManaAbove, HEALBOT_PLUGIN_MANAALERTLEVEL..": "..hbv_ActionIcons_GetData("AlertManaAbove", hb_lVars["Frame"], hb_lVars["ActionIconsID"]).."%")
        HealBot_Options_ActionIconsAlertAggro:SetValue(hbv_ActionIcons_GetData("AlertAggro", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsAlertAggro, HEALBOT_PLUGIN_AURAWATCHAGGROLEVEL..": "..HealBot_Options_Lists["AggroIndAlertLevel"][hbv_ActionIcons_GetData("AlertAggro", hb_lVars["Frame"], hb_lVars["ActionIconsID"])])
        HealBot_Options_ActionIconsAlertGlowColpick:SetStatusBarColor(hbv_ActionIcons_GetColData("AlertGlowCol", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        HealBot_Options_ActionIconsAlertGlowTimeout:SetValue(hbv_ActionIcons_GetData("AlertGlowTimeout", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsAlertGlowTimeout, HEALBOT_SKIN_ICONGLOWTIMEOUT..": "..hbv_ActionIcons_GetData("AlertGlowTimeout", hb_lVars["Frame"], hb_lVars["ActionIconsID"]).."s")

        UIDropDownMenu_SetText(HealBot_Options_ActionIconsSelfAlertFilter, HealBot_Options_Lists["ActionIconsSelfAlertFilter"][hbv_ActionIcons_GetData("SelfAlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"])])
        HealBot_Options_ActionIconsSelfAlertBuffname:SetText(hbv_ActionIcons_GetData("SelfAlertBuff", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        HealBot_Options_ActionIconsSelfAlertBuffSelfCast:SetChecked(hbv_ActionIcons_GetBooleanData("SelfAlertBuffSelf", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        HealBot_Options_ActionIconsSelfAlertBuffMinStacks:SetValue(hbv_ActionIcons_GetData("SelfAlertBuffMinStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsSelfAlertBuffMinStacks, HEALBOT_WORDS_MIN..": "..hbv_ActionIcons_GetData("SelfAlertBuffMinStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        HealBot_Options_ActionIconsSelfAlertBuffMaxStacks:SetValue(hbv_ActionIcons_GetData("SelfAlertBuffMaxStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        if hbv_ActionIcons_GetData("SelfAlertBuffMaxStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"]) == 21 then
            HealBot_Options_SetText(HealBot_Options_ActionIconsSelfAlertBuffMaxStacks, HEALBOT_WORDS_MAX..": 99")
        else
            HealBot_Options_SetText(HealBot_Options_ActionIconsSelfAlertBuffMaxStacks, HEALBOT_WORDS_MAX..": "..hbv_ActionIcons_GetData("SelfAlertBuffMaxStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        end
        UIDropDownMenu_SetText(HealBot_Options_ActionIconsSelfAlertBuffTag, hbv_ActionIcons_GetData("SelfAlertBuffTag", hb_lVars["Frame"], hb_lVars["ActionIconsID"]))
        if hb_lVars["ActionIconsCondNo"] < 4 then
            UIDropDownMenu_SetText(HealBot_Options_ActionIconsAlertBuffTag, hbv_ActionIcons_GetData("AlertBuffTag", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))
            UIDropDownMenu_SetText(HealBot_Options_ActionIconsAlertDebuffTag, hbv_ActionIcons_GetData("AlertDebuffTag", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))
            HealBot_Options_ActionIconsAlertBuffname:SetText(hbv_ActionIcons_GetData("AlertBuff", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))
            HealBot_Options_ActionIconsAlertBuffSelfCast:SetChecked(hbv_ActionIcons_GetBooleanData("AlertBuffSelf", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))
            HealBot_Options_ActionIconsAlertDebuffSelfCast:SetChecked(hbv_ActionIcons_GetBooleanData("AlertDebuffSelf", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))
            HealBot_Options_ActionIconsAlertBuffMinStacks:SetValue(hbv_ActionIcons_GetData("AlertBuffMinStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))
            HealBot_Options_SetText(HealBot_Options_ActionIconsAlertBuffMinStacks, HEALBOT_WORDS_MIN..": "..hbv_ActionIcons_GetData("AlertBuffMinStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))
            HealBot_Options_ActionIconsAlertDebuffMinStacks:SetValue(hbv_ActionIcons_GetData("AlertDebuffMinStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))
            HealBot_Options_SetText(HealBot_Options_ActionIconsAlertDebuffMinStacks, HEALBOT_WORDS_MIN..": "..hbv_ActionIcons_GetData("AlertDebuffMinStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))
            HealBot_Options_ActionIconsAlertBuffMaxStacks:SetValue(hbv_ActionIcons_GetData("AlertBuffMaxStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))
            if hbv_ActionIcons_GetData("AlertBuffMaxStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]) == 21 then
                HealBot_Options_SetText(HealBot_Options_ActionIconsAlertBuffMaxStacks, HEALBOT_WORDS_MAX..": 99")
            else
                HealBot_Options_SetText(HealBot_Options_ActionIconsAlertBuffMaxStacks, HEALBOT_WORDS_MAX..": "..hbv_ActionIcons_GetData("AlertBuffMaxStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))
            end
            HealBot_Options_ActionIconsAlertDebuffMaxStacks:SetValue(hbv_ActionIcons_GetData("AlertDebuffMaxStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))
            if hbv_ActionIcons_GetData("AlertDebuffMaxStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]) == 21 then
                HealBot_Options_SetText(HealBot_Options_ActionIconsAlertDebuffMaxStacks, HEALBOT_WORDS_MAX..": 99")
            else
                HealBot_Options_SetText(HealBot_Options_ActionIconsAlertDebuffMaxStacks, HEALBOT_WORDS_MAX..": "..hbv_ActionIcons_GetData("AlertDebuffMaxStacks", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))
            end
            HealBot_Options_ActionIconsAlertDebuffname:SetText(hbv_ActionIcons_GetData("AlertDebuff", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))
            HealBot_Options_ActionIconsAlertFilterHideShow(hbv_ActionIcons_GetData("AlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"]))
            UIDropDownMenu_SetText(HealBot_Options_ActionIconsAlertFilter, HealBot_Options_Lists["ActionIconsAlertFilter"][hbv_ActionIcons_GetData("AlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"], hb_lVars["ActionIconsCondNo"])])
        else
            HealBot_Options_ActionIconsAlertFilterHideShow(hbv_ActionIcons_GetData("SelfAlertFilter", hb_lVars["Frame"], hb_lVars["ActionIconsID"]), true)
        end
    end
end

function HealBot_Options_SkinsFramesActionIconsTextTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesActionIconsTextTab")
    if not HealBot_Options_TabRunOnce[tab] then
        g=_G["HealBot_ActionIconsTextCD_FontStr"]
        g:SetText(HEALBOT_OPTIONS_COOLDOWNTEXT)
        g:SetTextColor(1,1,1,1)
        g=_G["HealBot_ActionIconsTextStacks_FontStr"]
        g:SetText(HEALBOT_OPTIONS_COUNTTEXT)
        g:SetTextColor(1,1,1,1)
        HealBot_Options_SetText(HealBot_Options_ActionIconsCDTextShow,HEALBOT_OPTIONS_SHOWCOOLDOWN)
        if hbv_ActionIcons_GetBoolean("HIDETEXT", hb_lVars["Frame"]) then
            HealBot_Options_ActionIconsCDTextShow:SetChecked(false)
        else
            HealBot_Options_ActionIconsCDTextShow:SetChecked(true)
        end
        HealBot_Options_UpdateMediaFont(HealBot_Options_ActionIconsFontName,hbv_ActionIcons_GetVars("FONT", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_ActionIconsFontHeight,HEALBOT_OPTIONS_SKINFHEIGHT,4,28,1,2)
        HealBot_Options_ActionIconsFontHeight:SetValue(hbv_ActionIcons_GetVars("FONTSIZE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsFontHeight, HEALBOT_OPTIONS_SKINFHEIGHT..": "..hbv_ActionIcons_GetVars("FONTSIZE", hb_lVars["Frame"]))
        HealBot_Options_sliderlabels_Init(HealBot_Options_ActionIconsTextOutLine,HEALBOT_OPTIONS_SKINFOUTLINE,1,3,1,1,HEALBOT_WORDS_NONE,HEALBOT_WORDS_THICK)
        HealBot_Options_ActionIconsTextOutLine:SetValue(hbv_ActionIcons_GetVars("FONTOUTLINE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsTextOutLine, HEALBOT_OPTIONS_SKINFOUTLINE..": "..HealBot_Options_FontOutline_List[hbv_ActionIcons_GetVars("FONTOUTLINE", hb_lVars["Frame"])])
        HealBot_Options_val_OnLoad(HealBot_Options_ActionIconsFontVOffset,HEALBOT_OPTIONS_TEXTOFFSET,-25,25,1,5)
        HealBot_Options_ActionIconsFontVOffset:SetValue(hbv_ActionIcons_GetVars("FONTVOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsFontVOffset, HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_ActionIcons_GetVars("FONTVOFFSET", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_ActionIconsFontHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-25,25,1,5)
        HealBot_Options_ActionIconsFontHOffset:SetValue(hbv_ActionIcons_GetVars("FONTHOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsFontHOffset, HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_ActionIcons_GetVars("FONTHOFFSET", hb_lVars["Frame"]))
        HealBot_Media_UpdateDefaultTexture(HealBot_Options_ActionIconsCDTextColpick, "Options_SkinsFramesActionIconsTextTab")
        HealBot_Options_ActionIconsCDTextColpick:SetStatusBarColor(hbv_ActionIcons_GetColVars("FONTCOL", hb_lVars["Frame"]))
        HealBot_Options_SetLabel("healbotactioniconfontcoltxt",HEALBOT_SKIN_HEADERTEXTCOL)

        HealBot_Options_SetText(HealBot_Options_ActionIconsCountTextShow,HEALBOT_OPTIONS_SHOWCOUNT)
        if hbv_ActionIcons_GetBoolean("HIDECOUNTTEXT", hb_lVars["Frame"]) then
            HealBot_Options_ActionIconsCountTextShow:SetChecked(false)
        else
            HealBot_Options_ActionIconsCountTextShow:SetChecked(true)
        end
        HealBot_Options_UpdateMediaFont(HealBot_Options_ActionIconsFontCountName,hbv_ActionIcons_GetVars("FONTCOUNT", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_ActionIconsFontCountHeight,HEALBOT_OPTIONS_SKINFHEIGHT,4,28,1,2)
        HealBot_Options_ActionIconsFontCountHeight:SetValue(hbv_ActionIcons_GetVars("FONTCOUNTSIZE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsFontCountHeight, HEALBOT_OPTIONS_SKINFHEIGHT..": "..hbv_ActionIcons_GetVars("FONTCOUNTSIZE", hb_lVars["Frame"]))
        HealBot_Options_sliderlabels_Init(HealBot_Options_ActionIconsTextCountOutLine,HEALBOT_OPTIONS_SKINFOUTLINE,1,3,1,1,HEALBOT_WORDS_NONE,HEALBOT_WORDS_THICK)
        HealBot_Options_ActionIconsTextCountOutLine:SetValue(hbv_ActionIcons_GetVars("FONTCOUNTOUTLINE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsTextCountOutLine, HEALBOT_OPTIONS_SKINFOUTLINE..": "..HealBot_Options_FontOutline_List[hbv_ActionIcons_GetVars("FONTCOUNTOUTLINE", hb_lVars["Frame"])])
        HealBot_Options_val_OnLoad(HealBot_Options_ActionIconsFontCountVOffset,HEALBOT_OPTIONS_TEXTOFFSET,-10,50,1,5)
        HealBot_Options_ActionIconsFontCountVOffset:SetValue(hbv_ActionIcons_GetVars("FONTCOUNTVOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsFontCountVOffset, HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_ActionIcons_GetVars("FONTCOUNTVOFFSET", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_ActionIconsFontCountHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-50,10,1,5)
        HealBot_Options_ActionIconsFontCountHOffset:SetValue(hbv_ActionIcons_GetVars("FONTCOUNTHOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ActionIconsFontCountHOffset, HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_ActionIcons_GetVars("FONTCOUNTHOFFSET", hb_lVars["Frame"]))
        HealBot_Media_UpdateDefaultTexture(HealBot_Options_ActionIconsCountTextColpick, "Options_SkinsFramesActionIconsTextTab")
        HealBot_Options_ActionIconsCountTextColpick:SetStatusBarColor(hbv_ActionIcons_GetColVars("FONTCOUNTCOL", hb_lVars["Frame"]))
        HealBot_Options_SetLabel("healbotactioniconfontcountcoltxt",HEALBOT_SKIN_HEADERTEXTCOL)



        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesIndicatorsAggroTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesIndicatorsAggroTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_AggroInd:SetChecked(hbv_Skins_GetFrameBoolean("BarAggro", "SHOWIND", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_AggroInd,HEALBOT_OPTION_AGGROIND)
        HealBot_Options_AggroIndColour.initialize=HealBot_Options_AggroIndColour_DropDown
        UIDropDownMenu_SetText(HealBot_Options_AggroIndColour, HealBot_Options_Lists["IndicatorCol"][hbv_Skins_GetFrameVar("Indicators", "ACOL", hb_lVars["Frame"])])
        HealBot_Options_AggroIndAnchor.initialize=HealBot_Options_AggroIndAnchor_DropDown
        UIDropDownMenu_SetText(HealBot_Options_AggroIndAnchor, HealBot_Options_Lists["AggroIndAnchor"][hbv_Skins_GetFrameVar("Indicators", "AANCHOR", hb_lVars["Frame"])])
        HealBot_Options_val_OnLoad(HealBot_Options_AggroIndVOffset,HEALBOT_OPTIONS_TEXTOFFSET,-50,50,1,10)
        HealBot_Options_AggroIndVOffset:SetValue(hbv_Skins_GetFrameVar("Indicators", "AVOFF", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_AggroIndVOffset,HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_Skins_GetFrameVar("Indicators", "AVOFF", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_AggroIndHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-25,125,1,10)
        HealBot_Options_AggroIndHOffset:SetValue(hbv_Skins_GetFrameVar("Indicators", "AHOFF", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_AggroIndHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_Skins_GetFrameVar("Indicators", "AHOFF", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_AggroIndSize,HEALBOT_OPTIONS_TXTSIZE,2,20,1,2)
        HealBot_Options_AggroIndSize:SetValue(hbv_Skins_GetFrameVar("Indicators", "ASIZE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_AggroIndSize,HEALBOT_OPTIONS_TXTSIZE..": "..hbv_Skins_GetFrameVar("Indicators", "ASIZE", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_AggroIndSpace,HEALBOT_WORDS_SPACE,-5,10,1,2)
        HealBot_Options_AggroIndSpace:SetValue(hbv_Skins_GetFrameVar("Indicators", "ASPACE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_AggroIndSpace,HEALBOT_WORDS_SPACE..": "..hbv_Skins_GetFrameVar("Indicators", "ASPACE", hb_lVars["Frame"]))
        HealBot_Options_SetLabel("healbotaggroindcoltxt",HEALBOT_WORD_COLOUR)
        HealBot_Options_SetLabel("healbotaggroindanchortxt",HEALBOT_WORD_ANCHOR)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesIndicatorsLowManaTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesIndicatorsLowManaTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ManaIndicator.initialize=HealBot_Options_ManaIndicator_DropDown
        UIDropDownMenu_SetText(HealBot_Options_ManaIndicator, HealBot_Options_ManaIndicator_List[hbv_Skins_GetFrameVar("HealBar", "LOWMANA", hb_lVars["Frame"])])
        HealBot_Options_ManaIndicatorInCombat:SetChecked(hbv_Skins_GetFrameBoolean("HealBar", "LOWMANACOMBAT", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ManaIndicatorInCombat,HEALBOT_OPTIONS_MONITORDEBUFFSC)
        HealBot_Options_LowManaIndColour.initialize=HealBot_Options_LowManaIndColour_DropDown
        UIDropDownMenu_SetText(HealBot_Options_LowManaIndColour, HealBot_Options_Lists["IndicatorCol"][hbv_Skins_GetFrameVar("Indicators", "MCOL", hb_lVars["Frame"])])
        HealBot_Options_LowManaIndAnchor.initialize=HealBot_Options_LowManaIndAnchor_DropDown
        UIDropDownMenu_SetText(HealBot_Options_LowManaIndAnchor, HealBot_Options_Lists["IndicatorAnchor"][hbv_Skins_GetFrameVar("Indicators", "MANCHOR", hb_lVars["Frame"])])
        HealBot_Options_val_OnLoad(HealBot_Options_LowManaIndVOffset,HEALBOT_OPTIONS_TEXTOFFSET,-50,50,1,10)
        HealBot_Options_LowManaIndVOffset:SetValue(hbv_Skins_GetFrameVar("Indicators", "MVOFF", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_LowManaIndVOffset,HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_Skins_GetFrameVar("Indicators", "MVOFF", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_LowManaIndHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-50,50,1,10)
        HealBot_Options_LowManaIndHOffset:SetValue(hbv_Skins_GetFrameVar("Indicators", "MHOFF", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_LowManaIndHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_Skins_GetFrameVar("Indicators", "MHOFF", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_LowManaIndSize,HEALBOT_OPTIONS_TXTSIZE,2,20,1,2)
        HealBot_Options_LowManaIndSize:SetValue(hbv_Skins_GetFrameVar("Indicators", "MSIZE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_LowManaIndSize,HEALBOT_OPTIONS_TXTSIZE..": "..hbv_Skins_GetFrameVar("Indicators", "MSIZE", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_LowManaIndSpace,HEALBOT_WORDS_SPACE,-5,10,1,2)
        HealBot_Options_LowManaIndSpace:SetValue(hbv_Skins_GetFrameVar("Indicators", "MSPACE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_LowManaIndSpace,HEALBOT_WORDS_SPACE..": "..hbv_Skins_GetFrameVar("Indicators", "MSPACE", hb_lVars["Frame"]))
        HealBot_Options_SetLabel("healbotlowmanaindfontstr",HEALBOT_OPTIONS_LOWMANAINDICATOR)
        HealBot_Options_SetLabel("healbotlowmanaindcoltxt",HEALBOT_WORD_COLOUR)
        HealBot_Options_SetLabel("healbotlowmanaindanchortxt",HEALBOT_WORD_ANCHOR)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesIndicatorsSelfCastTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesIndicatorsSelfCastTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_SelfCastIndicator:SetChecked(hbv_Skins_GetFrameBoolean("IconText", "SELFIND", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_SelfCastIndicator,HEALBOT_OPTION_AGGROIND)
        HealBot_Options_SelfCastIndColour.initialize=HealBot_Options_SelfCastIndColour_DropDown
        UIDropDownMenu_SetText(HealBot_Options_SelfCastIndColour, HealBot_Options_Lists["IndicatorCol"][hbv_Skins_GetFrameVar("Indicators", "SCOL", hb_lVars["Frame"])])
        HealBot_Options_SelfCastIndAnchor.initialize=HealBot_Options_SelfCastIndAnchor_DropDown
        UIDropDownMenu_SetText(HealBot_Options_SelfCastIndAnchor, HealBot_Options_Lists["AggroIndAnchor"][hbv_Skins_GetFrameVar("Indicators", "SANCHOR", hb_lVars["Frame"])])
        HealBot_Options_val_OnLoad(HealBot_Options_SelfCastIndVOffset,HEALBOT_OPTIONS_TEXTOFFSET,-15,15,1,5)
        HealBot_Options_SelfCastIndVOffset:SetValue(hbv_Skins_GetFrameVar("Indicators", "SVOFF", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_SelfCastIndVOffset,HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_Skins_GetFrameVar("Indicators", "SVOFF", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_SelfCastIndHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-15,15,1,5)
        HealBot_Options_SelfCastIndHOffset:SetValue(hbv_Skins_GetFrameVar("Indicators", "SHOFF", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_SelfCastIndHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_Skins_GetFrameVar("Indicators", "SHOFF", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_SelfCastIndSize,HEALBOT_OPTIONS_TXTSIZE,2,20,1,2)
        HealBot_Options_SelfCastIndSize:SetValue(hbv_Skins_GetFrameVar("Indicators", "SSIZE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_SelfCastIndSize,HEALBOT_OPTIONS_TXTSIZE..": "..hbv_Skins_GetFrameVar("Indicators", "SSIZE", hb_lVars["Frame"]))
        HealBot_Options_SetLabel("healbotselfcastindcoltxt",HEALBOT_WORD_COLOUR)
        HealBot_Options_SetLabel("healbotselfcastindanchortxt",HEALBOT_OPTIONS_AUXBARANCHOR)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesIndicatorsPowerTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesIndicatorsPowerTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ShowPowerCounter:SetChecked(hbv_Skins_GetFrameBoolean("HealBar", "POWERCNT", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_ShowPowerCounter,HEALBOT_OPTION_AGGROIND)
        HealBot_Options_PowerIndColour.initialize=HealBot_Options_PowerIndColour_DropDown
        UIDropDownMenu_SetText(HealBot_Options_PowerIndColour, HealBot_Options_Lists["IndicatorCol"][hbv_Skins_GetFrameVar("Indicators", "PCOL", hb_lVars["Frame"])])
        HealBot_Options_PowerIndAnchor.initialize=HealBot_Options_PowerIndAnchor_DropDown
        UIDropDownMenu_SetText(HealBot_Options_PowerIndAnchor, HealBot_Options_Lists["IndicatorAnchor"][hbv_Skins_GetFrameVar("Indicators", "PANCHOR", hb_lVars["Frame"])])
        HealBot_Options_val_OnLoad(HealBot_Options_PowerIndVOffset,HEALBOT_OPTIONS_TEXTOFFSET,-50,50,1,10)
        HealBot_Options_PowerIndVOffset:SetValue(hbv_Skins_GetFrameVar("Indicators", "PVOFF", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_PowerIndVOffset,HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_Skins_GetFrameVar("Indicators", "PVOFF", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_PowerIndHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-50,50,1,10)
        HealBot_Options_PowerIndHOffset:SetValue(hbv_Skins_GetFrameVar("Indicators", "PHOFF", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_PowerIndHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_Skins_GetFrameVar("Indicators", "PHOFF", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_PowerIndSize,HEALBOT_OPTIONS_TXTSIZE,2,20,1,2)
        HealBot_Options_PowerIndSize:SetValue(hbv_Skins_GetFrameVar("Indicators", "PSIZE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_PowerIndSize,HEALBOT_OPTIONS_TXTSIZE..": "..hbv_Skins_GetFrameVar("Indicators", "PSIZE", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_Options_PowerIndSpace,HEALBOT_WORDS_SPACE,-5,10,1,2)
        HealBot_Options_PowerIndSpace:SetValue(hbv_Skins_GetFrameVar("Indicators", "PSPACE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_Options_PowerIndSpace,HEALBOT_WORDS_SPACE..": "..hbv_Skins_GetFrameVar("Indicators", "PSPACE", hb_lVars["Frame"]))
        HealBot_Options_SetLabel("healbotpowerindcoltxt",HEALBOT_WORD_COLOUR)
        HealBot_Options_SetLabel("healbotpowerindanchortxt",HEALBOT_WORD_ANCHOR)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesEmergencyGeneralTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesEmergencyGeneralTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_SkinsSpellsUse:SetChecked(hbv_Skins_GetFrameBoolean("Emerg", "USE", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_SkinsSpellsUse,HEALBOT_OPTIONS_EMERGBUTTONUSE)
        HealBot_Options_UpdateMediaTexture(HealBot_EmergBarTexture, hbv_Skins_GetFrameVar("Emerg", "TEXTURE", hb_lVars["Frame"]))
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_EmergBarHeight,HEALBOT_OPTIONS_SKINHEIGHT,0.01,2,0.01,5)
        HealBot_EmergBarHeight:SetValue(hbv_Skins_GetFrameVar("Emerg", "HEIGHT", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_EmergBarHeight)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_EmergBarWidth,HEALBOT_OPTIONS_SKINWIDTH,0.01,2,0.01,5)
        HealBot_EmergBarWidth:SetValue(hbv_Skins_GetFrameVar("Emerg", "WIDTH", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_EmergBarWidth)
        HealBot_EmergBarAnchor.initialize=HealBot_EmergBarAnchor_DropDown
        UIDropDownMenu_SetText(HealBot_EmergBarAnchor, HealBot_Options_ActionAnchor_List[hbv_Skins_GetFrameVar("Emerg", "ANCHOR", hb_lVars["Frame"])])
        HealBot_Options_val_OnLoad(HealBot_EmergBarVOffset,HEALBOT_OPTIONS_TEXTOFFSET,-75,75,1,5)
        HealBot_EmergBarVOffset:SetValue(hbv_Skins_GetFrameVar("Emerg", "VOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_EmergBarVOffset,HEALBOT_OPTIONS_TEXTOFFSET..": "..hbv_Skins_GetFrameVar("Emerg", "VOFFSET", hb_lVars["Frame"]))
        HealBot_Options_val_OnLoad(HealBot_EmergBarHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET,-75,75,1,5)
        HealBot_EmergBarHOffset:SetValue(hbv_Skins_GetFrameVar("Emerg", "HOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_EmergBarHOffset,HEALBOT_OPTIONS_TEXTHOROFFSET..": "..hbv_Skins_GetFrameVar("Emerg", "HOFFSET", hb_lVars["Frame"]))
        HealBot_Options_SetLabel("healbotemergbaranchorstr",HEALBOT_OPTIONS_AUXBARANCHOR)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_SkinsFramesEmergencyColoursTab(tab)
      --HealBot_setCall("HealBot_Options_SkinsFramesEmergencyColoursTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_EmergBarCol.initialize=HealBot_EmergBarCol_DropDown
        UIDropDownMenu_SetText(HealBot_EmergBarCol, HealBot_Options_BarHealthColour_List[hbv_Skins_GetFrameVar("Emerg", "BARCOL", hb_lVars["Frame"])])
        HealBot_EmergBarColBuffGlow.initialize=HealBot_EmergBarColBuffGlow_DropDown
        UIDropDownMenu_SetText(HealBot_EmergBarColBuffGlow, HealBot_Options_Lists["EmergGlow"][hbv_Skins_GetFrameVar("Emerg", "BUFFGLOW", hb_lVars["Frame"])])
        HealBot_EmergBarColDebuffGlow.initialize=HealBot_EmergBarColDebuffGlow_DropDown
        UIDropDownMenu_SetText(HealBot_EmergBarColDebuffGlow, HealBot_Options_Lists["EmergGlow"][hbv_Skins_GetFrameVar("Emerg", "DEBUFFGLOW", hb_lVars["Frame"])])
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_EmergInjTrig,HEALBOT_OPTIONS_EMERGINJTRIG,0,0.75,0.01,5)
        HealBot_EmergInjTrig:SetValue(hbv_Skins_GetFrameVar("Emerg", "INJURED", hb_lVars["Frame"]))
        HealBot_Options_Pct_OnValueChanged(HealBot_EmergInjTrig)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_EmergBarCritTrig,HEALBOT_OPTIONS_EMERGCRITTRIG,0,0.5,0.01,5)
        HealBot_EmergBarCritTrig:SetValue(hbv_Skins_GetFrameVar("Emerg", "CRITICAL", hb_lVars["Frame"]))
        HealBot_Options_Pct_OnValueChanged(HealBot_EmergBarCritTrig)
        HealBot_EmergBarColBuff:SetChecked(hbv_Skins_GetFrameBoolean("Emerg", "BUFFBARCOL", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_EmergBarColBuff,HEALBOT_OPTIONS_BUFFWARNINGS)
        HealBot_EmergBarColBuffGlowMissing:SetChecked(hbv_Skins_GetFrameBoolean("Emerg", "BUFFGLOWONLYMISSING", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_EmergBarColBuffGlowMissing,HEALBOT_OPTIONS_EMERGBUFFWARNINGS)
        HealBot_EmergBarColDebuff:SetChecked(hbv_Skins_GetFrameBoolean("Emerg", "DEBUFFBARCOL", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_EmergBarColDebuff,HEALBOT_OPTIONS_CDCWARNINGS)
        HealBot_EmergBarColDebuffGlowDispellable:SetChecked(hbv_Skins_GetFrameBoolean("Emerg", "DEBUFFGLOWONLYDISPEL", hb_lVars["Frame"]))
        HealBot_Options_SetText(HealBot_EmergBarColDebuffGlowDispellable,HEALBOT_OPTIONS_EMERGDEBUFFWARNINGS)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_EmergBarEnabledOpacity,HEALBOT_OPTIONS_BARALPHA,0.75,1,0.01,5)
        HealBot_EmergBarEnabledOpacity:SetValue(hbv_Skins_GetFrameVar("Emerg", "A", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_EmergBarEnabledOpacity)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_EmergBarOOROpacity,HEALBOT_OPTIONS_BARALPHAEOR,0,0.75,0.01,5)
        HealBot_EmergBarOOROpacity:SetValue(hbv_Skins_GetFrameVar("Emerg", "OA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_EmergBarOOROpacity)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_EmergBarDisabledOpacity,HEALBOT_OPTIONS_BARALPHADIS,0,0.75,0.01,5)
        HealBot_EmergBarDisabledOpacity:SetValue(hbv_Skins_GetFrameVar("Emerg", "DA", hb_lVars["Frame"]));
        HealBot_Options_Pct_OnValueChanged(HealBot_EmergBarDisabledOpacity)
        HealBot_Options_SetLabel("healbotemergbarcolstr",HEALBOT_SKIN_HEADERBARCOL)
        HealBot_Options_SetLabel("healbotemergbarbuffglowstr",HEALBOT_SKIN_GLOWEFFECT)
        HealBot_Options_SetLabel("healbotemergbardebuffglowstr",HEALBOT_SKIN_GLOWEFFECT)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_DebuffsGeneralTab(tab)
      --HealBot_setCall("HealBot_Options_DebuffsGeneralTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_CDCTxt1.initialize=HealBot_Options_CDCTxt1_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCTxt1, HealBot_Config_Cures.HealBotDebuffText[HealBot_Options_getDropDownId_bySpec(1)])
        HealBot_Options_CDCGroups1.initialize=HealBot_Options_CDCGroups1_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCGroups1, HealBot_Options_BuffTxt_List[HealBot_Config_Cures.HealBotDebuffDropDown[HealBot_Options_getDropDownId_bySpec(1)]])
        HealBot_Options_CDCTxt2.initialize=HealBot_Options_CDCTxt2_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCTxt2, HealBot_Config_Cures.HealBotDebuffText[HealBot_Options_getDropDownId_bySpec(2)])
        HealBot_Options_CDCGroups2.initialize=HealBot_Options_CDCGroups2_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCGroups2, HealBot_Options_BuffTxt_List[HealBot_Config_Cures.HealBotDebuffDropDown[HealBot_Options_getDropDownId_bySpec(2)]])
        HealBot_Options_CDCTxt3.initialize=HealBot_Options_CDCTxt3_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCTxt3, HealBot_Config_Cures.HealBotDebuffText[HealBot_Options_getDropDownId_bySpec(3)])
        HealBot_Options_CDCTxt4.initialize=HealBot_Options_CDCTxt4_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCTxt4, HealBot_Config_Cures.HealBotDebuffText[HealBot_Options_getDropDownId_bySpec(4)])
        HealBot_Options_CDCGroups3.initialize=HealBot_Options_CDCGroups3_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCGroups3, HealBot_Options_BuffTxt_List[HealBot_Config_Cures.HealBotDebuffDropDown[HealBot_Options_getDropDownId_bySpec(3)]])
        HealBot_Options_CDCGroups4.initialize=HealBot_Options_CDCGroups4_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCGroups4, HealBot_Options_BuffTxt_List[HealBot_Config_Cures.HealBotDebuffDropDown[HealBot_Options_getDropDownId_bySpec(4)]])
        HealBot_Options_CDCTxt5.initialize=HealBot_Options_CDCTxt5_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCTxt5, HealBot_Config_Cures.HealBotDebuffText[HealBot_Options_getDropDownId_bySpec(5)])
        HealBot_Options_CDCGroups5.initialize=HealBot_Options_CDCGroups5_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCGroups5, HealBot_Options_BuffTxt_List[HealBot_Config_Cures.HealBotDebuffDropDown[HealBot_Options_getDropDownId_bySpec(5)]])
        HealBot_Options_IgnoreDebuffsDuration:SetChecked(HealBot_Config_Cures.IgnoreFastDurDebuffs)
        HealBot_Options_SetText(HealBot_Options_IgnoreDebuffsDuration,HEALBOT_OPTIONS_IGNOREDEBUFFDURATION)
        HealBot_Options_sliderlabels_Init(HealBot_Options_IgnoreDebuffsDurationSecs,HEALBOT_OPTIONS_HOTTEXTDURATION,1,5,1,1,"0.5","2.5")
        HealBot_Options_IgnoreDebuffsDurationSecs:SetValue(HealBot_Config_Cures.IgnoreFastDurDebuffsSecs)
        HealBot_Options_SetText(HealBot_Options_IgnoreDebuffsDurationSecs,HEALBOT_OPTIONS_HOTTEXTDURATION .. ": " .. (HealBot_Config_Cures.IgnoreFastDurDebuffsSecs/2) .." Seconds")
        HealBot_Options_IgnoreDebuffsCoolDown:SetChecked(HealBot_Config_Cures.IgnoreOnCooldownDebuffs)
        HealBot_Options_SetText(HealBot_Options_IgnoreDebuffsCoolDown,HEALBOT_OPTIONS_IGNOREDEBUFFCOOLDOWN)
        HealBot_Options_IgnoreDebuffsFriend:SetChecked(HealBot_Config_Cures.IgnoreFriendDebuffs)
        HealBot_Options_SetText(HealBot_Options_IgnoreDebuffsFriend,HEALBOT_OPTIONS_IGNOREDEBUFFFRIEND)
        HealBot_Options_IgnoreCannotDispell:SetChecked(HealBot_Config_Cures.IgnoreCannotDispell)
        HealBot_Options_SetText(HealBot_Options_IgnoreCannotDispell,HEALBOT_OPTIONS_IGNORECANNOTDISPELL)
        HealBot_Options_CDCPriority1.initialize=HealBot_Options_CDCPriority1_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCPriority1, HealBot_Config_Cures.HealBotDebuffPriority[HEALBOT_DISEASE_en])
        HealBot_Options_CDCPriority2.initialize=HealBot_Options_CDCPriority2_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCPriority2, HealBot_Config_Cures.HealBotDebuffPriority[HEALBOT_MAGIC_en])
        HealBot_Options_CDCPriority3.initialize=HealBot_Options_CDCPriority3_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCPriority3, HealBot_Config_Cures.HealBotDebuffPriority[HEALBOT_POISON_en])
        HealBot_Options_CDCPriority4.initialize=HealBot_Options_CDCPriority4_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCPriority4, HealBot_Config_Cures.HealBotDebuffPriority[HEALBOT_CURSE_en])
        HealBot_Options_CDCPriority5.initialize=HealBot_Options_CDCPriority5_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCPriority5, HealBot_Config_Cures.HealBotDebuffPriority[HEALBOT_BLEED_en])
        local cdBarCol=HealBot_Globals.CustomDebuffsShowBarCol["DEFAULT"] or 4
        HealBot_Options_CDCDefaultBarColour.initialize=HealBot_Options_CDCDefaultBarColour_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCDefaultBarColour, HealBot_Options_Lists["AuraBarCol"][cdBarCol])
        HealBot_Options_SetLabel("HealBot_Options_Panel4_1", HEALBOT_OPTIONS_DEBUFFTEXT1)
        HealBot_Options_SetLabel("HealBot_Options_Panel4_2", HEALBOT_OPTIONS_BUFFSTEXT2)
        HealBot_Options_SetLabel("HealBot_Options_IgnoreDebuffsTxt", HEALBOT_OPTIONS_IGNOREDEBUFF)
        HealBot_Options_SetLabel("HealBot_Options_DebuffDisease_FontStr", HEALBOT_DISEASE)
        HealBot_Options_SetLabel("HealBot_Options_DebuffMagic_FontStr", HEALBOT_MAGIC)
        HealBot_Options_SetLabel("HealBot_Options_DebuffPoison_FontStr", HEALBOT_POISON)
        HealBot_Options_SetLabel("HealBot_Options_DebuffCurse_FontStr", HEALBOT_CURSE)
        HealBot_Options_SetLabel("HealBot_Options_DebuffBleed_FontStr", HEALBOT_BLEED)
        HealBot_Options_SetLabel("HealBot_Options_Panel4_3", HEALBOT_WORD_PRIORITY)
        HealBot_Options_SetLabel("HealBot_Options_CDCDefaultBarColourTxt", HEALBOT_OPTIONS_CDCBARS)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_DebuffsCustomTab(tab)
      --HealBot_setCall("HealBot_Options_DebuffsCustomTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_SetLabel("HealBot_Options_CDCCastByCustomTxt",HEALBOT_OPTIONS_CUSTOM_CASTBY)
        HealBot_Options_ResetCDebuffBtn:SetText(HEALBOT_WORD_RESET)
        HealBot_Options_DeleteCDebuffBtn:SetText(HEALBOT_OPTIONS_DELSKIN)
        HealBot_Options_NewCDebuffBtn:SetText(HEALBOT_OPTIONS_SAVESKIN)
        HealBot_Options_SetLabel("HealBot_Options_CDCPriorityCustomTxt",HEALBOT_WORD_PRIORITY)
        HealBot_Options_SetLabel("HealBot_Options_CDebuffFilterTxt",HEALBOT_PLUGIN_FILTER)
        HealBot_Options_SetLabel("HealBot_Options_CDebuffFilterCustomTxt",HEALBOT_PLUGIN_FILTER)
        HealBot_Options_SetLabel("HealBot_Options_CDCColTxt", HEALBOT_SKIN_HEADERBARCOL)
        HealBot_Options_SetLabel("HealBot_Options_CDCColTxtC",HEALBOT_SKIN_HEADERBARCOL)
        HealBot_Options_SetLabel("HealBot_Options_CDCIconGlowTxt", HEALBOT_SKIN_ICONGLOW)
        HealBot_Options_SetLabel("HealBot_Options_CDCIconGlowTxtC",HEALBOT_SKIN_ICONGLOW)
        HealBot_Options_SetLabel("HealBot_Options_CDCIconSetTxt", HEALBOT_SKIN_ICONSET)
        HealBot_Options_SetLabel("HealBot_Options_CDCIconSetTxtC",HEALBOT_SKIN_ICONSET)
        HealBot_Options_CDCAllDisease:SetChecked(HealBot_Config_Cures.HealBot_Custom_Debuffs_All[HEALBOT_DISEASE_en])
        HealBot_Options_SetText(HealBot_Options_CDCAllDisease,HEALBOT_OPTIONS_CUSTOM_ALLDISEASE)
        HealBot_Options_CDCAllMagic:SetChecked(HealBot_Config_Cures.HealBot_Custom_Debuffs_All[HEALBOT_MAGIC_en])
        HealBot_Options_SetText(HealBot_Options_CDCAllMagic,HEALBOT_OPTIONS_CUSTOM_ALLMAGIC)
        HealBot_Options_CDCAllPoison:SetChecked(HealBot_Config_Cures.HealBot_Custom_Debuffs_All[HEALBOT_POISON_en])
        HealBot_Options_SetText(HealBot_Options_CDCAllPoison,HEALBOT_OPTIONS_CUSTOM_ALLPOISON)
        HealBot_Options_CDCAllCurse:SetChecked(HealBot_Config_Cures.HealBot_Custom_Debuffs_All[HEALBOT_CURSE_en])
        HealBot_Options_SetText(HealBot_Options_CDCAllCurse,HEALBOT_OPTIONS_CUSTOM_ALLCURSE)
        HealBot_Options_CDCAllBleed:SetChecked(HealBot_Config_Cures.HealBot_Custom_Debuffs_All[HEALBOT_BLEED_en])
        HealBot_Options_SetText(HealBot_Options_CDCAllBleed,HEALBOT_OPTIONS_CUSTOM_ALLBLEED)
        HealBot_Options_CDCAllBoss:SetChecked(HealBot_Config_Cures.AlwaysShowBoss)
        HealBot_Options_SetText(HealBot_Options_CDCAllBoss,HEALBOT_OPTIONS_CUSTOM_ALLBOSS)
        HealBot_Options_CDCAllTimed:SetChecked(HealBot_Config_Cures.AlwaysShowTimed)
        HealBot_Options_SetText(HealBot_Options_CDCAllTimed,HEALBOT_OPTIONS_CUSTOM_ALLTIMED)
        HealBot_Options_SetLabel("HealBot_Options_CustomDebuff_CDCIDMethodText",HEALBOT_OPTIONS_CUSTOM_IDMETHOD)
        HealBot_Options_SetLabel("HealBot_Options_CDebuffText", HEALBOT_CUSTOM_CATEGORY)
        HealBot_Options_SetLabel("HealBot_Options_CDebuffCustomText", HEALBOT_OPTIONS_DEBUFFNAME)
        HealBot_Options_SetLabel("HealBot_Options_CustomDebuff_CastByText", HEALBOT_OPTIONS_CUSTOM_CASTBY)
        HealBot_Options_SetLabel("HealBot_Options_CustomDebuff_CDCIDMethod", HEALBOT_OPTIONS_CUSTOM_IDMETHOD)
        HealBot_Options_SetLabel("HealBot_Options_CDebuffText2", HEALBOT_OPTIONS_NEWDEBUFFTEXT)
        HealBot_Options_SetLabel("HealBot_Options_CDebuffTagTxt", HEALBOT_WORD_TAG)
        HealBot_Options_SetLabel("HealBot_Options_CustomDebuff_PriorityTxt", HEALBOT_WORD_PRIORITY)
        HealBot_Options_SetLabel("HealBot_Options_PageCDebuff", HEALBOT_OPTIONS_PAGE)
        HealBot_Options_SetLabel("HealBot_Options_DebuffSortTxt", HEALBOT_OPTIONS_TAB_SORT)
        HealBot_Options_SetLabel("HealBot_Options_DebuffFilterTxt", HEALBOT_PLUGIN_FILTER)
        HealBot_Options_DebuffSort.initialize=HealBot_Options_DebuffSort_DropDown
        UIDropDownMenu_SetText(HealBot_Options_DebuffSort, HealBot_Options_Lists["AuraCustomSort"][HealBot_Config_Cures.ListSortOrder])
        HealBot_Options_DebuffFilter.initialize=HealBot_Options_DebuffFilter_DropDown
        if HealBot_Config_Cures.ListSortFilter == 7 then
            UIDropDownMenu_SetText(HealBot_Options_DebuffFilter, HealBot_Config_Cures.ListSortFilterTag)
        elseif HealBot_Config_Cures.ListSortFilter == 1 then
            UIDropDownMenu_SetText(HealBot_Options_DebuffFilter, HEALBOT_WORDS_NONE)
        else
            UIDropDownMenu_SetText(HealBot_Options_DebuffFilter, HealBot_Options_Lists["AuraCustomFilter"][HealBot_Config_Cures.ListSortFilter-1])
        end
        HealBot_Options_TabRunOnce[tab]=true
    end
    HealBot_Options_CDebuffCat.initialize=HealBot_Options_CDebuffCat_DropDown
    UIDropDownMenu_SetText(HealBot_Options_CDebuffCat, HealBot_Options_Lists["CDebuffCat"][hb_lVars["CDebuffCatID"]])
    local CDebuffCat_List=HealBot_Options_CDebuffCat_genList()
    hb_lVars["numCustomDebuffs"]=#CDebuffCat_List
    HealBot_Options_CDebuffCatNameUpdate()
    HealBot_Options_CDebuffTxt1.initialize=HealBot_Options_CDebuffTxt1_DropDown
    UIDropDownMenu_SetText(HealBot_Options_CDebuffTxt1, HealBot_Options_CDebuffTextID(hb_lVars["CDebuffcustomSpellID"]))
    HealBot_Options_NewAura_SetIcon("HealBot_Options_CDebuffIcon", hb_lVars["CDebuffcustomSpellID"])
    hb_lVars["customDebuffPriority"]=15
    if hb_lVars["CDebuffcustomSpellID"] and HealBot_Globals.CustomDebuffs[hb_lVars["CDebuffcustomSpellID"]] then
        hb_lVars["customDebuffPriority"]=HealBot_Globals.CustomDebuffs[hb_lVars["CDebuffcustomSpellID"]]
    end
    HealBot_Options_CDCPriorityC.initialize=HealBot_Options_CDCPriorityC_DropDown
    UIDropDownMenu_SetSelectedID(HealBot_Options_CDCPriorityC, hb_lVars["customDebuffPriority"])
    UIDropDownMenu_SetText(HealBot_Options_CDCPriorityC, hb_lVars["customDebuffPriority"])
    local x=HealBot_Globals.CustomDebuffsFilter[hb_lVars["CDebuffcustomSpellID"]] or 1
    HealBot_Options_CDebuffFilterC.initialize=HealBot_Options_CDebuffFilterC_DropDown
    UIDropDownMenu_SetSelectedID(HealBot_Options_CDebuffFilterC, x)
    UIDropDownMenu_SetText(HealBot_Options_CDebuffFilterC, HealBot_Options_Lists["AuraFilters"][x])
    HealBot_Options_CDCCastBy.initialize=HealBot_Options_CDCCastBy_DropDown
    local castBy=HEALBOT_CUSTOM_CASTBY_EVERYONE
    if HealBot_Globals.CureCustomDefaultCastBy == 2 then
        castBy=HEALBOT_CUSTOM_CASTBY_ENEMY
    end
    if hb_lVars["CDebuffcustomSpellID"] and HealBot_Globals.FilterCustomDebuff[hb_lVars["CDebuffcustomSpellID"]] then
        castBy=HealBot_CDebuffCasyBy_List[HealBot_Globals.FilterCustomDebuff[hb_lVars["CDebuffcustomSpellID"]]]
    end
    UIDropDownMenu_SetText(HealBot_Options_CDCCastBy, castBy)
    HealBot_Options_CDCCol.initialize=HealBot_Options_CDCCol_DropDown
    local cdcDropdown=HealBot_Globals.CustomDebuffsShowBarCol[hb_lVars["CDebuffcustomSpellID"]] or 4
    UIDropDownMenu_SetText(HealBot_Options_CDCCol, HealBot_Options_Lists["AuraBarCol"][cdcDropdown])
    HealBot_Options_CDCIconGlow.initialize=HealBot_Options_CDCIconGlow_DropDown
    cdcDropdown=HealBot_Globals.CustomDebuffsIconGlow[hb_lVars["CDebuffcustomSpellID"]] or 1
    UIDropDownMenu_SetText(HealBot_Options_CDCIconGlow, HealBot_Options_Lists["AuraIconGlow"][cdcDropdown])
    HealBot_Options_CDCIconSet.initialize=HealBot_Options_CDCIconSet_DropDown
    cdcDropdown=HealBot_Globals.CustomDebuffsIconSet[hb_lVars["CDebuffcustomSpellID"]] or 1
    UIDropDownMenu_SetText(HealBot_Options_CDCIconSet, HealBot_Options_Lists["IconSets"][cdcDropdown])
    HealBot_Options_CDCIDMethod.initialize=HealBot_Options_CDCIDMethod_DropDown
    UIDropDownMenu_SetText(HealBot_Options_CDCIDMethod, HealBot_Options_Class_HoTctlIDMethod_List[(HealBot_Globals.CustomDebuffIDMethod[hb_lVars["CDebuffcustomSpellID"]] or 2)])
    HealBot_Options_SetEnableDisableCDBtn()
    HealBot_Options_CDebuffTag:SetText(HealBot_Globals.CDCTag[hb_lVars["CDebuffcustomSpellID"]] or "")
    HealBot_SetCDCBarColours()
end

function HealBot_Options_DebuffsWarningTab(tab)
      --HealBot_setCall("HealBot_Options_DebuffsWarningTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_CDCCol_ShowOnHealthBar:SetChecked(HealBot_Config_Cures.CDCshownHB)
        HealBot_Options_SetText(HealBot_Options_CDCCol_ShowOnHealthBar,HEALBOT_OPTIONS_CDCSHOWHBARS)
        HealBot_Options_ShowOnHealthBarDispelOnly:SetChecked(HealBot_Config_Cures.CDCshownHBDispelOnly)
        HealBot_Options_SetText(HealBot_Options_ShowOnHealthBarDispelOnly,HEALBOT_OPTIONS_WARNINGDISPELLONLY)
        HealBot_Options_CDCCol_AlwaysEnableBar:SetChecked(HealBot_Config_Cures.EnableBar)
        HealBot_Options_SetText(HealBot_Options_CDCCol_AlwaysEnableBar,HEALBOT_OPTIONS_ALWAYSENABLEBAR)
        HealBot_Options_CDCWarnRange1.initialize=HealBot_Options_CDCWarnRange1_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCWarnRange1, HealBot_Options_Lists["RangeWarning"][HealBot_Config_Cures.WarnRange_Bar])
        HealBot_Options_ShowDebuffWarning:SetChecked(HealBot_Config_Cures.ShowDebuffWarning)
        HealBot_Options_SetText(HealBot_Options_ShowDebuffWarning,HEALBOT_OPTIONS_SHOWDEBUFFWARNING)
        HealBot_Options_ShowDebuffWarningDispelOnly:SetChecked(HealBot_Config_Cures.ShowDebuffWarningDispelOnly)
        HealBot_Options_SetText(HealBot_Options_ShowDebuffWarningDispelOnly,HEALBOT_OPTIONS_WARNINGDISPELLONLY)
        HealBot_Options_CDCWarnRange3.initialize=HealBot_Options_CDCWarnRange3_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCWarnRange3, HealBot_Options_Lists["RangeWarning"][HealBot_Config_Cures.WarnRange_Screen])
        HealBot_Options_SoundDebuffWarning:SetChecked(HealBot_Config_Cures.SoundDebuffWarning)
        HealBot_Options_SetText(HealBot_Options_SoundDebuffWarning,HEALBOT_OPTIONS_SOUNDDEBUFFWARNING)
        HealBot_Options_SoundDebuffWarningDispelOnly:SetChecked(HealBot_Config_Cures.SoundDebuffWarningDispelOnly)
        HealBot_Options_SetText(HealBot_Options_SoundDebuffWarningDispelOnly,HEALBOT_OPTIONS_WARNINGDISPELLONLY)
        HealBot_Options_CDCWarnRange4.initialize=HealBot_Options_CDCWarnRange4_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCWarnRange4, HealBot_Options_Lists["RangeWarning"][HealBot_Config_Cures.WarnRange_Sound])
        HealBot_Options_CDCSoundChan.initialize=HealBot_Options_CDCSoundChan_DropDown
        UIDropDownMenu_SetText(HealBot_Options_CDCSoundChan, HealBot_Options_Lists["SoundChannels"][HealBot_Config_Cures.SoundDebuffChan])
        HealBot_Options_UpdateMediaSound(HealBot_Options_WarningSound,HealBot_Config_Cures.SoundDebuffPlay)
        HealBot_Options_SetLabel("HealBot_Options_CDCSoundChanTxt", HEALBOT_OPTIONS_SOUNDCHAN)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_BuffsGeneralBuffsTab(tab)
      --HealBot_setCall("HealBot_Options_BuffsGeneralBuffsTab")
    if not HealBot_Options_TabRunOnce[tab] then
        local cdBarCol=HealBot_Globals.CustomBuffsShowBarCol["DEFAULT"] or 3
        HealBot_Options_BuffDefaultBarColour.initialize=HealBot_Options_BuffDefaultBarColour_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffDefaultBarColour, HealBot_Options_Lists["AuraBarCol"][cdBarCol])
        local BuffTextClass=HealBot_Config_Buffs.HealBotBuffText
        if not BuffTextClass[HealBot_Options_getDropDownId_bySpec(1)] then BuffTextClass[HealBot_Options_getDropDownId_bySpec(1)]=HEALBOT_WORDS_NONE  end;
        HealBot_Options_BuffTxt1.initialize=HealBot_Options_BuffTxt1_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffTxt1, BuffTextClass[HealBot_Options_getDropDownId_bySpec(1)])
        local BuffDropDownClass=HealBot_Config_Buffs.HealBotBuffDropDown
        if not BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(1)] then BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(1)]=1 end;
        HealBot_Options_BuffGroups1.initialize=HealBot_Options_BuffGroups1_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffGroups1, HealBot_Options_BuffTxt_List[BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(1)]])
        BuffTextClass=HealBot_Config_Buffs.HealBotBuffText
        if not BuffTextClass[HealBot_Options_getDropDownId_bySpec(2)] then BuffTextClass[HealBot_Options_getDropDownId_bySpec(2)]=HEALBOT_WORDS_NONE  end;
        HealBot_Options_BuffTxt2.initialize=HealBot_Options_BuffTxt2_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffTxt2, BuffTextClass[HealBot_Options_getDropDownId_bySpec(2)])
        BuffDropDownClass=HealBot_Config_Buffs.HealBotBuffDropDown
        if not BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(2)] then BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(2)]=1 end;
        HealBot_Options_BuffGroups2.initialize=HealBot_Options_BuffGroups2_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffGroups2, HealBot_Options_BuffTxt_List[BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(2)]])
        BuffTextClass=HealBot_Config_Buffs.HealBotBuffText
        if not BuffTextClass[HealBot_Options_getDropDownId_bySpec(3)] then BuffTextClass[HealBot_Options_getDropDownId_bySpec(3)]=HEALBOT_WORDS_NONE  end;
        HealBot_Options_BuffTxt3.initialize=HealBot_Options_BuffTxt3_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffTxt3, BuffTextClass[HealBot_Options_getDropDownId_bySpec(3)])
        BuffDropDownClass=HealBot_Config_Buffs.HealBotBuffDropDown
        if not BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(3)] then BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(3)]=1 end;
        HealBot_Options_BuffGroups3.initialize=HealBot_Options_BuffGroups3_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffGroups3, HealBot_Options_BuffTxt_List[BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(3)]])
        BuffTextClass=HealBot_Config_Buffs.HealBotBuffText
        if not BuffTextClass[HealBot_Options_getDropDownId_bySpec(4)] then BuffTextClass[HealBot_Options_getDropDownId_bySpec(4)]=HEALBOT_WORDS_NONE  end;
        HealBot_Options_BuffTxt4.initialize=HealBot_Options_BuffTxt4_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffTxt4, BuffTextClass[HealBot_Options_getDropDownId_bySpec(4)])
        BuffDropDownClass=HealBot_Config_Buffs.HealBotBuffDropDown
        if not BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(4)] then BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(4)]=1 end;
        HealBot_Options_BuffGroups4.initialize=HealBot_Options_BuffGroups4_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffGroups4, HealBot_Options_BuffTxt_List[BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(4)]])
        BuffTextClass=HealBot_Config_Buffs.HealBotBuffText
        if not BuffTextClass[HealBot_Options_getDropDownId_bySpec(5)] then BuffTextClass[HealBot_Options_getDropDownId_bySpec(5)]=HEALBOT_WORDS_NONE  end;
        HealBot_Options_BuffTxt5.initialize=HealBot_Options_BuffTxt5_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffTxt5, BuffTextClass[HealBot_Options_getDropDownId_bySpec(5)])
        BuffDropDownClass=HealBot_Config_Buffs.HealBotBuffDropDown
        if not BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(5)] then BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(5)]=1 end;
        HealBot_Options_BuffGroups5.initialize=HealBot_Options_BuffGroups5_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffGroups5, HealBot_Options_BuffTxt_List[BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(5)]])
        BuffTextClass=HealBot_Config_Buffs.HealBotBuffText
        if not BuffTextClass[HealBot_Options_getDropDownId_bySpec(6)] then BuffTextClass[HealBot_Options_getDropDownId_bySpec(6)]=HEALBOT_WORDS_NONE  end;
        HealBot_Options_BuffTxt6.initialize=HealBot_Options_BuffTxt6_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffTxt6, BuffTextClass[HealBot_Options_getDropDownId_bySpec(6)])
        BuffDropDownClass=HealBot_Config_Buffs.HealBotBuffDropDown
        if not BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(6)] then BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(6)]=1 end;
        HealBot_Options_BuffGroups6.initialize=HealBot_Options_BuffGroups6_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffGroups6, HealBot_Options_BuffTxt_List[BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(6)]])
        BuffTextClass=HealBot_Config_Buffs.HealBotBuffText
        if not BuffTextClass[HealBot_Options_getDropDownId_bySpec(7)] then BuffTextClass[HealBot_Options_getDropDownId_bySpec(7)]=HEALBOT_WORDS_NONE  end;
        HealBot_Options_BuffTxt7.initialize=HealBot_Options_BuffTxt7_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffTxt7, BuffTextClass[HealBot_Options_getDropDownId_bySpec(7)])
        BuffDropDownClass=HealBot_Config_Buffs.HealBotBuffDropDown
        if not BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(7)] then BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(7)]=1 end;
        HealBot_Options_BuffGroups7.initialize=HealBot_Options_BuffGroups7_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffGroups7, HealBot_Options_BuffTxt_List[BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(7)]])
        BuffTextClass=HealBot_Config_Buffs.HealBotBuffText
        if not BuffTextClass[HealBot_Options_getDropDownId_bySpec(8)] then BuffTextClass[HealBot_Options_getDropDownId_bySpec(8)]=HEALBOT_WORDS_NONE  end;
        HealBot_Options_BuffTxt8.initialize=HealBot_Options_BuffTxt8_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffTxt8, BuffTextClass[HealBot_Options_getDropDownId_bySpec(8)])
        BuffDropDownClass=HealBot_Config_Buffs.HealBotBuffDropDown
        if not BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(8)] then BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(8)]=1 end;
        HealBot_Options_BuffGroups8.initialize=HealBot_Options_BuffGroups8_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffGroups8, HealBot_Options_BuffTxt_List[BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(8)]])
        HealBot_Options_SetLabel("HealBot_Options_Panel5_1", HEALBOT_OPTIONS_BUFFSTEXT1)
        HealBot_Options_SetLabel("HealBot_Options_Panel5_2", HEALBOT_OPTIONS_BUFFSTEXT2)
        HealBot_Options_SetLabel("HealBot_Options_BuffDefaultBarColourTxt", HEALBOT_OPTIONS_CDCBARS)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_BuffsExtraBuffsTab(tab, invUp)
      --HealBot_setCall("HealBot_Options_BuffsExtraBuffsTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_MonitorExtraBuffsOnlyInInstance:SetChecked(HealBot_Config_Buffs.ExtraBuffsOnlyInInstance)
        HealBot_Options_SetText(HealBot_Options_MonitorExtraBuffsOnlyInInstance,HEALBOT_OPTIONS_ONLY_IN_INSTANCE)
        local BuffDropDownClass=HealBot_Config_Buffs.HealBotBuffDropDown
        HealBot_Options_BuffWeaponEnchant1.initialize=HealBot_Options_BuffWeaponEnchant1_DropDown
        if not BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(9)] then BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(9)]=1 end;
        if not HealBot_Buff_WeaponEnchant_List[1][BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(9)]] then
            BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(9)]=1
        end
        UIDropDownMenu_SetText(HealBot_Options_BuffWeaponEnchant1, HealBot_Buff_WeaponEnchant_List[1][BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(9)]])
        HealBot_Options_BuffWeaponEnchant2.initialize=HealBot_Options_BuffWeaponEnchant2_DropDown
        if not BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(10)] then BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(10)]=1 end;
        if not HealBot_Buff_WeaponEnchant_List[2][BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(10)]] then
            BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(10)]=1
        end
        UIDropDownMenu_SetText(HealBot_Options_BuffWeaponEnchant2, HealBot_Buff_WeaponEnchant_List[2][BuffDropDownClass[HealBot_Options_getDropDownId_bySpec(10)]])
        HealBot_Options_BuffCheckWellFed:SetChecked(HealBot_Config_Buffs.CheckWellFed)
        HealBot_Options_SetText(HealBot_Options_BuffCheckWellFed,HEALBOT_OPTIONS_CHECKWELLFED)
        HealBot_Options_BuffCheckManaDrink:SetChecked(HealBot_Config_Buffs.CheckManaDrink)
        HealBot_Options_SetText(HealBot_Options_BuffCheckManaDrink,HEALBOT_OPTIONS_CHECKLOWMANA)
        HealBot_Options_SetLabel("HealBot_Options_BuffWellFedItemTxt", HEALBOT_OPTIONS_PRIMARYITEM)
        HealBot_Options_SetLabel("HealBot_Options_BuffBackupWellFedItemTxt", HEALBOT_OPTIONS_BACKUPITEM)
        HealBot_Options_BuffWellFedItem:SetText(HealBot_Config_Buffs.WellFedItem)
        HealBot_Options_BuffBackupWellFedItem:SetText(HealBot_Config_Buffs.BackupWellFedItem)
        HealBot_Options_BuffWellFedItems.initialize=HealBot_Options_BuffWellFedItems_DropDown
        HealBot_Options_BackupBuffWellFedItems.initialize=HealBot_Options_BackupBuffWellFedItems_DropDown
        HealBot_Options_SetLabel("HealBot_Options_BuffManaDrinkItemTxt", HEALBOT_OPTIONS_PRIMARYITEM)
        HealBot_Options_SetLabel("HealBot_Options_BuffBackupManaDrinkItemTxt", HEALBOT_OPTIONS_BACKUPITEM)
        HealBot_Options_BuffManaDrinkItem:SetText(HealBot_Config_Buffs.ManaDrinkItem)
        HealBot_Options_BuffBackupManaDrinkItem:SetText(HealBot_Config_Buffs.BackupManaDrinkItem)
        HealBot_Options_BuffManaDrinkItems.initialize=HealBot_Options_BuffManaDrinkItems_DropDown
        HealBot_Options_BuffBackupManaDrinkItems.initialize=HealBot_Options_BuffBackupManaDrinkItems_DropDown
        HealBot_Options_BuffExtraCheck1:SetChecked(HealBot_Config_Buffs.CustomBuffCheck[1])
        HealBot_Options_BuffExtraCheck2:SetChecked(HealBot_Config_Buffs.CustomBuffCheck[2])
        HealBot_Options_BuffExtraCheck3:SetChecked(HealBot_Config_Buffs.CustomBuffCheck[3])
        HealBot_Options_BuffExtraCheck4:SetChecked(HealBot_Config_Buffs.CustomBuffCheck[4])
        HealBot_Options_BuffExtraBuff1:SetText(HealBot_Config_Buffs.CustomBuffName[1] or "")
        HealBot_Options_BuffExtraBuff2:SetText(HealBot_Config_Buffs.CustomBuffName[2] or "")
        HealBot_Options_BuffExtraBuff3:SetText(HealBot_Config_Buffs.CustomBuffName[3] or "")
        HealBot_Options_BuffExtraBuff4:SetText(HealBot_Config_Buffs.CustomBuffName[4] or "")
        HealBot_Options_BuffExtraItem1:SetText(HealBot_Config_Buffs.CustomItemName[1] or "")
        HealBot_Options_BuffExtraItem2:SetText(HealBot_Config_Buffs.CustomItemName[2] or "")
        HealBot_Options_BuffExtraItem3:SetText(HealBot_Config_Buffs.CustomItemName[3] or "")
        HealBot_Options_BuffExtraItem4:SetText(HealBot_Config_Buffs.CustomItemName[4] or "")
        HealBot_Options_BuffExtraItems1.initialize=HealBot_Options_BuffExtraItems1_DropDown
        HealBot_Options_BuffExtraItems2.initialize=HealBot_Options_BuffExtraItems2_DropDown
        HealBot_Options_BuffExtraItems3.initialize=HealBot_Options_BuffExtraItems3_DropDown
        HealBot_Options_BuffExtraItems4.initialize=HealBot_Options_BuffExtraItems4_DropDown
        HealBot_Options_SetLabel("HealBot_Options_Panel5_1_Weapon", HEALBOT_OPTIONS_BUFFSTEXTWEMAIN)
        HealBot_Options_SetLabel("HealBot_Options_Panel5_2_Weapon", HEALBOT_OPTIONS_BUFFSTEXTWEOFF)
        HealBot_Options_SetLabel("HealBot_Options_Panel5_3_Weapon", HEALBOT_OPTIONS_BUFFSTEXT3)
        HealBot_Options_SetLabel("HealBot_Options_WellFedCol", HEALBOT_OPTIONS_BUFFSTEXT3)
        HealBot_Options_SetLabel("HealBot_Options_ManaDrinkCol", HEALBOT_OPTIONS_BUFFSTEXT3)
        HealBot_Options_SetLabel("HealBot_Options_ExtraBuffCol", HEALBOT_OPTIONS_BUFFSTEXT3)
        HealBot_Options_SetLabel("HealBot_Options_ExtraBuffName", HEALBOT_OPTIONS_BUFFNAME)
        HealBot_Options_SetLabel("HealBot_Options_ExtraBuffItemName", HEALBOT_OPTIONS_SPELLITEMNAME)
        HealBot_Options_val_OnLoad(HealBot_Options_BuffManaDrinkThreshold,HEALBOT_MANA_LOWTHRESHOLD,20,80,1,5)
        HealBot_Options_BuffManaDrinkThreshold:SetValue(HealBot_Config_Buffs.ManaDrinkThreshold)
        HealBot_Options_SetText(HealBot_Options_BuffManaDrinkThreshold,HEALBOT_MANA_LOWTHRESHOLD..": "..(HealBot_Config_Buffs.ManaDrinkThreshold).."%")

        HealBot_Options_TabRunOnce[tab]=true
    elseif invUp then
        HealBot_Options_BuffWellFedItems.initialize=HealBot_Options_BuffWellFedItems_DropDown
        HealBot_Options_BackupBuffWellFedItems.initialize=HealBot_Options_BackupBuffWellFedItems_DropDown
        HealBot_Options_BuffManaDrinkItems.initialize=HealBot_Options_BuffManaDrinkItems_DropDown
        HealBot_Options_BuffBackupManaDrinkItems.initialize=HealBot_Options_BuffBackupManaDrinkItems_DropDown
        HealBot_Options_BuffExtraItems1.initialize=HealBot_Options_BuffExtraItems1_DropDown
        HealBot_Options_BuffExtraItems2.initialize=HealBot_Options_BuffExtraItems2_DropDown
        HealBot_Options_BuffExtraItems3.initialize=HealBot_Options_BuffExtraItems3_DropDown
        HealBot_Options_BuffExtraItems4.initialize=HealBot_Options_BuffExtraItems4_DropDown
    end
end

function HealBot_Options_BuffsExtraBuffsTabInvUpdate()
    HealBot_Options_BuffsExtraBuffsTab("BuffsExtraBuffs", true)
end

function HealBot_Options_BuffsCustomTab(tab)
      --HealBot_setCall("HealBot_Options_BuffsCustomTab")
    local HoTctlName_List=HealBot_Options_Class_HoTctlName_genList()
    local sId=HealBot_Options_CDebuffGetId(hb_lVars["HoTname"])
    local sName=HealBot_Options_SpellGetName(sId) or ""
    hb_lVars["FilterHoTctlName"]=HealBot_Options_FilterHoTctl_List[hb_lVars["FilterHoTctlID"]]
    HealBot_Options_FilterHoTctl.initialize=HealBot_Options_FilterHoTctl_DropDown
    UIDropDownMenu_SetText(HealBot_Options_FilterHoTctl, hb_lVars["FilterHoTctlName"])
    HealBot_Options_NewBuffHoTBtn:SetText(HEALBOT_OPTIONS_SAVESKIN)
    HealBot_Options_AddNewCDebuff:SetText(HEALBOT_OPTIONS_ADDNEWDEBUFFTEXT)
    HealBot_Options_Class_HoTctlName.initialize=HealBot_Options_Class_HoTctlName_DropDown
    UIDropDownMenu_SetText(HealBot_Options_Class_HoTctlName, hb_lVars["HoTname"])
    HealBot_Options_NewAura_SetIcon("HealBot_Options_BuffShowIcon", sId)
    HealBot_Options_BuffPriorityC.initialize=HealBot_Options_BuffPriorityC_DropDown
    HealBot_Options_BuffFilterC.initialize=HealBot_Options_BuffFilterC_DropDown
    HealBot_Options_Class_HoTctlAction.initialize=HealBot_Options_Class_HoTctlAction_DropDown
    HealBot_Options_Class_HoTctlIDMethod.initialize=HealBot_Options_Class_HoTctlIDMethod_DropDown
    HealBot_Options_SetEnableDisableBuffBtn()
    hb_lVars["numCustomBuffs"]=#HoTctlName_List
    local x=1
    if not hb_lVars["FilterHoTctlNameTrim"] then hb_lVars["FilterHoTctlNameTrim"]=hbv_GetClass("En", hb_lVars["FilterHoTctlName"]) end
    if hb_lVars["FilterHoTctlNameTrim"] and HealBot_Globals.WatchHoT[hb_lVars["FilterHoTctlNameTrim"]] and sId then
        x=HealBot_Globals.WatchHoT[hb_lVars["FilterHoTctlNameTrim"]][sId] or 1
    end
    HealBot_Options_Class_HoTctlAction:SetAlpha(1)
    UIDropDownMenu_SetText(HealBot_Options_Class_HoTctlAction, HealBot_Options_Class_HoTctlAction_List[x])
    HealBot_Options_Class_HoTctlIDMethod:SetAlpha(1)
    if HealBot_Globals.CustomBuffIDMethod[sId] and HealBot_Globals.CustomBuffIDMethod[sId]>1 then HealBot_Globals.CustomBuffIDMethod[sId]=nil end
    x=HealBot_Globals.CustomBuffIDMethod[sId] or 2
    UIDropDownMenu_SetText(HealBot_Options_Class_HoTctlIDMethod, HealBot_Options_Class_HoTctlIDMethod_List[x])
    HealBot_Options_BuffPriorityC:SetAlpha(1)
    x=HealBot_Globals.CustomBuffs[sId] or 20
    UIDropDownMenu_SetSelectedID(HealBot_Options_BuffPriorityC, x)
    UIDropDownMenu_SetText(HealBot_Options_BuffPriorityC, x)
    HealBot_Options_BuffFilterC:SetAlpha(1)
    x=HealBot_Globals.CustomBuffsFilter[sId] or 1
    UIDropDownMenu_SetSelectedID(HealBot_Options_BuffFilterC, x)
    UIDropDownMenu_SetText(HealBot_Options_BuffFilterC, HealBot_Options_Lists["AuraFilters"][x])
    HealBot_Options_ObjectsEnableDisable("HealBot_Options_BuffHoTTag",true)
    HealBot_Options_BuffHoTTag:SetText(HealBot_Globals.CustomBuffTag[sId] or "")
    HealBot_Options_ObjectsEnableDisable("HealBot_Options_ResetBuffBtn",true)
    HealBot_Options_ObjectsEnableDisable("HealBot_Options_EnableDisableBuffBtn",true)
    HealBot_Options_ObjectsEnableDisable("HealBot_Options_DeleteBuffHoTBtn",true)
    HealBot_Options_BuffCatNameUpdate()
    HealBot_SetCustomBuffBarColours()
    HealBot_Timers_Set("AURA","CustomBuffListPrep")
    local cbBarDropdown=HealBot_Globals.CustomBuffsShowBarCol[sId] or HealBot_Globals.CustomBuffsShowBarCol[sName] or 1
    HealBot_Options_CustomBuffCol.initialize=HealBot_Options_CustomBuffCol_DropDown
    UIDropDownMenu_SetText(HealBot_Options_CustomBuffCol, HealBot_Options_Lists["AuraBarCol"][cbBarDropdown])
    cbBarDropdown=HealBot_Globals.CustomBuffsIconGlow[sId] or 1
    HealBot_Options_CustomBuffIconGlow.initialize=HealBot_Options_CustomBuffIconGlow_DropDown
    UIDropDownMenu_SetText(HealBot_Options_CustomBuffIconGlow, HealBot_Options_Lists["AuraIconGlow"][cbBarDropdown])
    cbBarDropdown=HealBot_Globals.CustomBuffsIconSet[sId] or 1
    HealBot_Options_BuffIconSet.initialize=HealBot_Options_BuffIconSet_DropDown
    UIDropDownMenu_SetText(HealBot_Options_BuffIconSet, HealBot_Options_Lists["IconSets"][cbBarDropdown])
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ResetBuffBtn:SetText(HEALBOT_WORD_RESET)
        HealBot_Options_SetLabel("HealBot_Options_Class_HoTctlNameTxt",HEALBOT_OPTIONS_BUFFNAME)
        HealBot_Options_SetLabel("HealBot_Options_Class_HoTctlActionTxt",HEALBOT_OPTIONS_CUSTOM_CASTBY)
        HealBot_Options_SetLabel("HealBot_Options_Class_HoTctlIDMethodTxt",HEALBOT_OPTIONS_CUSTOM_IDMETHOD)
        HealBot_Options_SetLabel("HealBot_Options_Class_HoTctlFilterNameTxt",HEALBOT_SORTBY_CLASS)
        HealBot_Options_SetLabel("HealBot_Options_CustomBuffColTxt",HEALBOT_SKIN_HEADERBARCOL)
        HealBot_Options_SetLabel("HealBot_Options_CustomBuffColTxtC",HEALBOT_SKIN_HEADERBARCOL)
        HealBot_Options_SetLabel("HealBot_Options_CustomBuffIconGlowTxt",HEALBOT_SKIN_ICONGLOW)
        HealBot_Options_SetLabel("HealBot_Options_CustomBuffIconGlowTxtC",HEALBOT_SKIN_ICONGLOW)
        HealBot_Options_SetLabel("HealBot_Options_BuffIconSetTxt",HEALBOT_SKIN_ICONSET)
        HealBot_Options_SetLabel("HealBot_Options_BuffIconSetCustomTxt",HEALBOT_SKIN_ICONSET)
        HealBot_Options_SetLabel("HealBot_Options_HoTctlActionCustomTxt",HEALBOT_OPTIONS_CUSTOM_CASTBY)
        HealBot_Options_SetLabel("HealBot_Options_HoTctlIDMethodCustomTxt",HEALBOT_OPTIONS_CUSTOM_IDMETHOD)
        HealBot_Options_SetLabel("HealBot_Options_BuffFilterCustomTxt",HEALBOT_PLUGIN_FILTER)
        HealBot_Options_SetLabel("HealBot_Options_BuffPriorityCustomTxt",HEALBOT_WORD_PRIORITY)
        HealBot_Options_SetLabel("HealBot_Options_BuffText2", HEALBOT_OPTIONS_NEWHOTBUFFTEXT)
        HealBot_Options_SetLabel("HealBot_Options_BuffTagTxt", HEALBOT_WORD_TAG)
        HealBot_Options_SetLabel("HealBot_Options_CustomBuff_PriorityTxt", HEALBOT_WORD_PRIORITY)
        HealBot_Options_SetLabel("HealBot_Options_BuffSortTxt",HEALBOT_OPTIONS_TAB_SORT)
        HealBot_Options_SetLabel("HealBot_Options_BuffFilterTxt",HEALBOT_PLUGIN_FILTER)
        HealBot_Options_HoTctlActionCustom:Disable()
        HealBot_Options_HoTctlIDMethodCustom:Disable()
        HealBot_Options_BuffPriorityCustom:Disable()
        HealBot_Options_BuffFilterCustom:Disable()
        HealBot_Options_CustomBuffColCustom:Disable()
        HealBot_Options_BuffIconSetCustom:Disable()
        HealBot_Options_CustomBuffIconGlowCustom:Disable()
        HealBot_Options_EnableDisableBuffBtnCustom:Disable()
        HealBot_Options_BuffAuto.initialize=HealBot_Options_BuffAuto_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffAuto, HealBot_Options_Lists["BuffsCustomAuto"][HealBot_Config_Buffs.AutoBuff])
        HealBot_Options_BuffAutoCastBy.initialize=HealBot_Options_BuffAutoCastBy_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffAutoCastBy, HealBot_Options_Lists["BuffsCustomAutoCastBy"][HealBot_Config_Buffs.AutoBuffCastBy])
        HealBot_Options_BuffSort.initialize=HealBot_Options_BuffSort_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffSort, HealBot_Options_Lists["AuraCustomSort"][HealBot_Config_Buffs.ListSortOrder])
        HealBot_Options_BuffFilter.initialize=HealBot_Options_BuffFilter_DropDown
        if HealBot_Config_Buffs.ListSortFilter == 7 then
            UIDropDownMenu_SetText(HealBot_Options_BuffFilter, HealBot_Config_Buffs.ListSortFilterTag)
        elseif HealBot_Config_Buffs.ListSortFilter == 1 then
            UIDropDownMenu_SetText(HealBot_Options_BuffFilter, HEALBOT_WORDS_NONE)
        else
            UIDropDownMenu_SetText(HealBot_Options_BuffFilter, HealBot_Options_Lists["AuraCustomFilter"][HealBot_Config_Buffs.ListSortFilter-1])
        end
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_BuffsWarningTab(tab)
      --HealBot_setCall("HealBot_Options_BuffsWarningTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_BuffCol_ShowOnHealthBar:SetChecked(HealBot_Config_Buffs.CBshownHB)
        HealBot_Options_SetText(HealBot_Options_BuffCol_ShowOnHealthBar,HEALBOT_OPTIONS_CDCSHOWHBARS)
        HealBot_Options_BuffCol_ShowOnHealthBarMissingOnly:SetChecked(HealBot_Config_Buffs.CBshownHBMissingOnly)
        HealBot_Options_SetText(HealBot_Options_BuffCol_ShowOnHealthBarMissingOnly,HEALBOT_OPTIONS_WARNINGMISSINGONLY)
        HealBot_Options_BuffCol_AlwaysEnableBar:SetChecked(HealBot_Config_Buffs.EnableBar)
        HealBot_Options_SetText(HealBot_Options_BuffCol_AlwaysEnableBar,HEALBOT_OPTIONS_ALWAYSENABLEBAR)
        HealBot_Options_BuffWarnRange1.initialize=HealBot_Options_BuffWarnRange1_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffWarnRange1, HealBot_Options_Lists["RangeWarning"][HealBot_Config_Buffs.WarnRange_Bar])
        HealBot_Options_ShowBuffWarning:SetChecked(HealBot_Config_Buffs.ShowBuffWarning)
        HealBot_Options_SetText(HealBot_Options_ShowBuffWarning,HEALBOT_OPTIONS_SHOWBUFFWARNING)
        HealBot_Options_ShowBuffWarningMissingOnly:SetChecked(HealBot_Config_Buffs.ShowBuffWarningMissingOnly)
        HealBot_Options_SetText(HealBot_Options_ShowBuffWarningMissingOnly,HEALBOT_OPTIONS_WARNINGMISSINGONLY)
        HealBot_Options_BuffWarnRange3.initialize=HealBot_Options_BuffWarnRange3_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffWarnRange3, HealBot_Options_Lists["RangeWarning"][HealBot_Config_Buffs.WarnRange_Screen])
        HealBot_Options_SoundBuffWarning:SetChecked(HealBot_Config_Buffs.SoundBuffWarning)
        HealBot_Options_SetText(HealBot_Options_SoundBuffWarning,HEALBOT_OPTIONS_SOUNDBUFFWARNING)
        HealBot_Options_SoundBuffWarningMissingOnly:SetChecked(HealBot_Config_Buffs.SoundBuffWarningMissingOnly)
        HealBot_Options_SetText(HealBot_Options_SoundBuffWarningMissingOnly,HEALBOT_OPTIONS_WARNINGMISSINGONLY)
        HealBot_Options_BuffWarnRange4.initialize=HealBot_Options_BuffWarnRange4_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffWarnRange4, HealBot_Options_Lists["RangeWarning"][HealBot_Config_Buffs.WarnRange_Sound])
        HealBot_Options_BuffSoundChan.initialize=HealBot_Options_BuffSoundChan_DropDown
        UIDropDownMenu_SetText(HealBot_Options_BuffSoundChan, HealBot_Options_Lists["SoundChannels"][HealBot_Config_Buffs.SoundBuffChan])
        HealBot_Options_SetLabel("HealBot_Options_BuffSoundChanTxt", HEALBOT_OPTIONS_SOUNDCHAN)
        HealBot_Options_UpdateMediaSound(HealBot_Options_BuffWarningSound,HealBot_Config_Buffs.SoundBuffPlay)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_TipsGeneralTab(tab)
      --HealBot_setCall("HealBot_Options_TipsGeneralTab")
        HealBot_Options_ShowTooltip:SetChecked(HealBot_Globals.ShowTooltip)
        HealBot_Options_SetText(HealBot_Options_ShowTooltip,HEALBOT_OPTIONS_SHOWTOOLTIP)
        HealBot_Options_HideTooltipInCombat:SetChecked(HealBot_Globals.DisableToolTipInCombat)
        HealBot_Options_SetText(HealBot_Options_HideTooltipInCombat,HEALBOT_OPTIONS_DISABLETOOLTIPINCOMBAT)
        HealBot_Options_UseGameTooltip:SetChecked(HealBot_Globals.Tooltip_UseGameTooltip)
        HealBot_Options_SetText(HealBot_Options_UseGameTooltip,HEALBOT_OPTIONS_USEGAMETOOLTIP)
        HealBot_Options_ShowTooltipShowUnitTip:SetChecked(HealBot_Globals.ShowGameUnitInfo)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipShowUnitTip,HEALBOT_OPTIONS_SHOWWOWTOOLTIP)
        HealBot_Options_sliderlabels_Init(HealBot_Options_TooltipScale,HEALBOT_OPTION_TOOLTIPSCALE,50,200,5,2,0.5,2)
        HealBot_Options_TooltipScale:SetValue(HealBot_Globals.Tooltip_Scale*100)
        HealBot_Options_SetText(HealBot_Options_TooltipScale, HEALBOT_OPTION_TOOLTIPSCALE..": "..HealBot_Globals.Tooltip_Scale)
        HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_TooltipAlpha,HEALBOT_OPTIONS_ALPHA,0.25,1,0.01,5)
        HealBot_Options_TooltipAlpha:SetValue(HealBot_Globals.Tooltip_Alpha);
        HealBot_Options_Pct_OnValueChanged(HealBot_Options_TooltipAlpha)
        HealBot_Options_val_OnLoad(HealBot_Options_TooltipHeaderFontSize,HEALBOT_TOOLTIP_HEADERFONTSIZE,4,28,1,2)
        HealBot_Options_TooltipHeaderFontSize:SetValue(HealBot_Globals.Tooltip_HeaderFontSize or 14)
        HealBot_Options_SetText(HealBot_Options_TooltipHeaderFontSize,HEALBOT_TOOLTIP_HEADERFONTSIZE..": "..HealBot_Globals.Tooltip_HeaderFontSize)
        HealBot_Options_val_OnLoad(HealBot_Options_TooltipDetailFontSize,HEALBOT_TOOLTIP_DETAILFONTSIZE,4,28,1,2)
        HealBot_Options_TooltipDetailFontSize:SetValue(HealBot_Globals.Tooltip_DetailFontSize or 12)
        HealBot_Options_SetText(HealBot_Options_TooltipDetailFontSize,HEALBOT_TOOLTIP_DETAILFONTSIZE..": "..HealBot_Globals.Tooltip_DetailFontSize)
        HealBot_Options_UpdateMediaFont(HealBot_Options_TooltipHeaderFont,HealBot_Globals.Tooltip_HeaderFont,HEALBOT_TOOLTIP_HEADERFONT)
        HealBot_Options_UpdateMediaFont(HealBot_Options_TooltipDetailFont,HealBot_Globals.Tooltip_DetailFont,HEALBOT_TOOLTIP_DETAILFONT)
        g=_G["HealBot_Options_TipsGeneralbTxt"]
        g:SetText(HEALBOT_OPTIONS_TAB_GENERAL)
        HealBot_Options_SetTooltipState()
end

function HealBot_Options_TipsTargetTab(tab)
      --HealBot_setCall("HealBot_Options_TipsTargetTab")
        HealBot_Options_ShowTooltipTarget:SetChecked(HealBot_Globals.Tooltip_ShowTarget)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipTarget,HEALBOT_OPTIONS_SHOWUNITTOOLTIP)
        HealBot_Options_ShowTooltipHealthLine:SetChecked(HealBot_Globals.Tooltip_ShowHealth)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipHealthLine,HEALBOT_TOOLTIP_SHOWHEALTH)
        HealBot_Options_ShowTooltipLevel:SetChecked(HealBot_Globals.Tooltip_ShowLevel)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipLevel,HEALBOT_TOOLTIP_SHOWLEVEL)
        HealBot_Options_ShowTooltipSpec:SetChecked(HealBot_Globals.Tooltip_ShowSpec)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipSpec,HEALBOT_TOOLTIP_SHOWSPEC)
        HealBot_Options_ShowTooltipManaLine:SetChecked(HealBot_Globals.Tooltip_ShowMana)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipManaLine,HEALBOT_TOOLTIP_SHOWMANA)
        HealBot_Options_ShowTooltipRanks:SetChecked(HealBot_Globals.Tooltip_ShowRank)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipRanks,HEALBOT_SHOW_RAIDRANK)
        HealBot_Options_ShowTooltipRoles:SetChecked(HealBot_Globals.Tooltip_ShowRole)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipRoles,HEALBOT_SHOW_PLAYERROLE)
        HealBot_Options_ShowTooltipHideRoleWhenRank:SetChecked(HealBot_Globals.Tooltip_HideRoleWhenRank)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipHideRoleWhenRank,HEALBOT_SHOW_HIDEROLEWHENRANK)
        HealBot_Options_ShowTooltipMyBuffs:SetChecked(HealBot_Globals.Tooltip_ShowMyBuffs)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipMyBuffs,HEALBOT_OPTIONS_SHOWUNITBUFFTIME)
        HealBot_Options_ShowTooltipGuild:SetChecked(HealBot_Globals.Tooltip_ShowGuild)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipGuild,HEALBOT_OPTIONS_SHOWGUILD)
        HealBot_Options_ShowTooltipGuildTitle:SetChecked(HealBot_Globals.Tooltip_ShowGuildTitle)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipGuildTitle,HEALBOT_OPTIONS_SHOWGUILDTITLE)
        HealBot_Options_ShowTooltipGuildRank:SetChecked(HealBot_Globals.Tooltip_ShowGuildRank)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipGuildRank,HEALBOT_OPTIONS_SHOWGUILDRANK)
        HealBot_Options_ShowTooltipTitle:SetChecked(HealBot_Globals.Tooltip_ShowTitle)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipTitle,HEALBOT_OPTIONS_SHOWTITLE)
        HealBot_Options_ShowTooltipRequiredBuffs:SetChecked(HealBot_Globals.Tooltip_ShowRequiredBuffs)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipRequiredBuffs,HEALBOT_OPTIONS_SHOWUNITBUFFREQUIRED)
        HealBot_Options_ShowTooltipDebuffs:SetChecked(HealBot_Globals.Tooltip_ShowDebuffs)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipDebuffs,HEALBOT_OPTIONS_TIPSSHOWDEBUFFS)
        g=_G["HealBot_Options_TipsTargetbTxt"]
        g:SetText(HEALBOT_DISABLED_TARGET)
        HealBot_Options_SetTooltipState()
end

function HealBot_Options_TipsSpellsTab(tab)
      --HealBot_setCall("HealBot_Options_TipsSpellsTab")
        HealBot_Options_ShowTooltipSpellCoolDown:SetChecked(HealBot_Globals.Tooltip_ShowCD)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipSpellCoolDown,HEALBOT_OPTIONS_SHOWCDTOOLTIP)
        HealBot_Options_ShowTooltipBuffIconInfo:SetChecked(HealBot_Globals.Tooltip_ShowBuffIconInfo)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipBuffIconInfo,HEALBOT_OPTIONS_SHOWICONBINFOTIP)
        HealBot_Options_ShowTooltipBuffIconCompact:SetChecked(HealBot_Globals.Tooltip_ShowBuffIconCompact)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipBuffIconCompact,HEALBOT_OPTIONS_COMPACT)
        HealBot_Options_ShowTooltipDebuffIconInfo:SetChecked(HealBot_Globals.Tooltip_ShowDebuffIconInfo)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipDebuffIconInfo,HEALBOT_OPTIONS_SHOWICONDINFOTIP)
        HealBot_Options_ShowTooltipDebuffIconCompact:SetChecked(HealBot_Globals.Tooltip_ShowDebuffIconCompact)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipDebuffIconCompact,HEALBOT_OPTIONS_COMPACT)
        HealBot_Options_ShowTooltipSpellExtra:SetChecked(HealBot_Globals.Tooltip_ShowSpellExtra)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipSpellExtra,HEALBOT_TOOLTIP_SHOWSPELLEXTRA)
        HealBot_Options_ShowTooltipSpellInfo:SetChecked(HealBot_Globals.Tooltip_ShowSpellInfo)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipSpellInfo,HEALBOT_TOOLTIP_SHOWASSIGNEDSPELLS)
        HealBot_Options_ShowTooltipSpellIgnoreGlobalCoolDown:SetChecked(HealBot_Globals.Tooltip_IgnoreGCD)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipSpellIgnoreGlobalCoolDown,HEALBOT_OPTIONS_IGNOREGCDTOOLTIP)
        HealBot_Options_ShowTooltipShowHoT:SetChecked(HealBot_Globals.Tooltip_ShowHoT)
        HealBot_Options_SetText(HealBot_Options_ShowTooltipShowHoT,HEALBOT_OPTIONS_TOOLTIPSHOWHOT)
        HealBot_Options_val_OnLoad(HealBot_Options_TipMaxButtons,HEALBOT_OPTIONS_TTMAXBUTTONS,3,20,1,2)
        HealBot_Options_TipMaxButtons:SetValue(HealBot_Globals.Tooltip_MaxButtons)
        HealBot_Options_SetText(HealBot_Options_TipMaxButtons,HEALBOT_OPTIONS_TTMAXBUTTONS..": "..HealBot_Globals.Tooltip_MaxButtons)
        g=_G["HealBot_Options_TipsSpellsbTxt"]
        g:SetText(HEALBOT_OPTIONS_TAB_SPELLS)
        HealBot_Options_SetTooltipState()
end

function HealBot_Options_TipsTab(tab)
      --HealBot_setCall("HealBot_Options_TipsTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_BindsTab(tab)
      --HealBot_setCall("HealBot_Options_BindsTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_TestTab(tab)
      --HealBot_setCall("HealBot_Options_TestTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_TestBarsButton:SetText(HEALBOT_OPTIONS_TURNTESTBARSON)
        HealBot_Options_TestBarsProfile.initialize=HealBot_Options_TestBarsProfile_DropDown
        UIDropDownMenu_SetText(HealBot_Options_TestBarsProfile, HealBot_Options_TestBarsProfile_List[HealBot_Globals.TestBars["PROFILE"]])
        HealBot_Options_SetLabel("HealBot_Options_TestBarsProfileTxt",HEALBOT_WORDS_PROFILE)
        HealBot_Options_val_OnLoad(HealBot_Options_NumberTestTanks,HEALBOT_OPTION_NUMTANKS,0,8,1,2)
        HealBot_Options_NumberTestTanks:SetValue(HealBot_Globals.TestBars["TANKS"])
        HealBot_Options_SetText(HealBot_Options_NumberTestTanks,HEALBOT_OPTION_NUMTANKS..": "..HealBot_Globals.TestBars["TANKS"])
        HealBot_Options_val_OnLoad(HealBot_Options_NumberTestHealers,HEALBOT_OPTION_NUMHEALERS,0,12,1,2)
        HealBot_Options_NumberTestHealers:SetValue(HealBot_Globals.TestBars["HEALERS"])
        HealBot_Options_SetText(HealBot_Options_NumberTestHealers,HEALBOT_OPTION_NUMHEALERS..": "..HealBot_Globals.TestBars["HEALERS"])
        HealBot_Options_val_OnLoad(HealBot_Options_NumberTestMyTargets,HEALBOT_OPTION_NUMMYTARGETS,0,10,1,2)
        HealBot_Options_NumberTestMyTargets:SetValue(HealBot_Globals.TestBars["TARGETS"])
        HealBot_Options_SetText(HealBot_Options_NumberTestMyTargets,HEALBOT_OPTION_NUMMYTARGETS..": "..HealBot_Globals.TestBars["TARGETS"])
        HealBot_Options_val_OnLoad(HealBot_Options_NumberTestPets,HEALBOT_OPTION_NUMPETS,0,10,1,2)
        HealBot_Options_NumberTestPets:SetValue(HealBot_Globals.TestBars["PETS"])
        HealBot_Options_SetText(HealBot_Options_NumberTestPets,HEALBOT_OPTION_NUMPETS..": "..HealBot_Globals.TestBars["PETS"])
        HealBot_Options_val_OnLoad(HealBot_Options_NumberTestEnemy,HEALBOT_OPTION_NUMENEMYS,0,10,1,2)
        HealBot_Options_NumberTestEnemy:SetValue(HealBot_Globals.TestBars["ENEMY"])
        HealBot_Options_SetText(HealBot_Options_NumberTestEnemy,HEALBOT_OPTION_NUMENEMYS..": "..HealBot_Globals.TestBars["ENEMY"])
        HealBot_Options_TestShowDebuffIcons:SetChecked(HealBot_Globals.TestBarsIcons["DEBUFF"])
        HealBot_Options_SetText(HealBot_Options_TestShowDebuffIcons,HEALBOT_OPTION_DEBUFFICONS)
        HealBot_Options_TestShowBuffIcons:SetChecked(HealBot_Globals.TestBarsIcons["BUFF"])
        HealBot_Options_SetText(HealBot_Options_TestShowBuffIcons,HEALBOT_OPTION_BUFFICONS)
        HealBot_Options_TestShowExtraIcons:SetChecked(HealBot_Globals.TestBarsIcons["EXTRA"])
        HealBot_Options_SetText(HealBot_Options_TestShowExtraIcons,HEALBOT_OPTION_EXTRAICONS)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_ImportExportSkinsTab(tab)
      --HealBot_setCall("HealBot_Options_ImportExportSkinsTab")
    HealBot_Options_InOutSkin.initialize=HealBot_Options_InOutSkin_DropDown
    UIDropDownMenu_SetText(HealBot_Options_InOutSkin, Healbot_Config_Skins.Skins[hb_lVars["InOutSkin"]])
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ShareSkinb:SetText(HEALBOT_OPTIONS_BUTTONEXPORT)
        local loaded=nil
        loaded=HealBot_WoWAPI_LoadAddOn("HealBot_ExtraSkins")
        if loaded then
            HealBot_Options_ExtraSkins.initialize=HealBot_Options_ExtraSkins_DropDown
        else
            HealBot_Options_ExtraSkins:Hide()
        end
        HealBot_Options_SetLabel("HealBot_Options_ExtraSkinst",HEALBOT_OPTIONS_EXTRASKINS)
        HealBot_Options_LoadSkinb:SetText(HEALBOT_OPTIONS_BUTTONIMPORT)
        HealBot_Options_InOutSkint:SetText(HEALBOT_OPTIONS_EXPORTSKIN)
        HealBot_Options_SetLabel("HealBot_Options_InOutSkint",HEALBOT_OPTIONS_EXPORTSKIN)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_ImportExportCustomDebuffsTab(tab)
      --HealBot_setCall("HealBot_Options_ImportExportCustomDebuffsTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ShareCDebuffb:SetText(HEALBOT_OPTIONS_BUTTONEXPORT)
        HealBot_Options_ImportMethodCDebuff.initialize=HealBot_Options_ImportMethodCDebuff_DropDown
        UIDropDownMenu_SetText(HealBot_Options_ImportMethodCDebuff, HealBot_Options_Lists["ImportMethods"][hb_lVars["InMethodDebuff"]])
        HealBot_Options_LoadCDebuffb:SetText(HEALBOT_OPTIONS_BUTTONIMPORT)
        HealBot_Options_SetLabel("HealBot_Options_ImportMethodCDebufft",HEALBOT_OPTIONS_BUTTONIMPORTMETHOD)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_ImportExportCustomBuffsTab(tab)
      --HealBot_setCall("HealBot_Options_ImportExportCustomBuffsTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ImportMethodBuffs.initialize=HealBot_Options_ImportMethodBuffs_DropDown
        UIDropDownMenu_SetText(HealBot_Options_ImportMethodBuffs, HealBot_Options_Lists["ImportMethods"][hb_lVars["InMethodBuff"]])
        HealBot_Options_SetLabel("HealBot_Options_ImportMethodBuffst",HEALBOT_OPTIONS_BUTTONIMPORTMETHOD)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_ImportExportSpellsTab(tab)
      --HealBot_setCall("HealBot_Options_ImportExportSpellsTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_ImportMethodSpells.initialize=HealBot_Options_ImportMethodSpells_DropDown
        UIDropDownMenu_SetText(HealBot_Options_ImportMethodSpells, HealBot_Options_Lists["ImportMethods"][hb_lVars["InMethodSpell"]])
        HealBot_Options_SetLabel("HealBot_Options_ImportMethodSpellst",HEALBOT_OPTIONS_BUTTONIMPORTMETHOD)
        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_ImportExportPresetColoursTab(tab)
      --HealBot_setCall("HealBot_Options_ImportExportPresetColoursTab")
    if not HealBot_Options_TabRunOnce[tab] then

        HealBot_Options_TabRunOnce[tab]=true
    end
end

function HealBot_Options_PluginsTab(tab)
      --HealBot_setCall("HealBot_Options_PluginsTab")
    if not HealBot_Options_TabRunOnce[tab] then
        HealBot_Options_Plugins.initialize=HealBot_Options_Plugins_DropDown
        UIDropDownMenu_SetText(HealBot_Options_Plugins, HealBot_Options_Lists["Plugins"][hb_lVars["curPlugin"]])
        HealBot_Options_SetLabel("HealBot_Options_PluginsTxt",HEALBOT_OPTIONS_PLUGINS)
        HealBot_Options_SetLabel("HealBot_Options_PluginNATxt",HEALBOT_OPTIONS_PLUGIN_NA)
        HealBot_Options_SetLabel("HealBot_Options_PluginNAReasonTxt",HEALBOT_OPTIONS_PLUGIN_NA)
        HealBot_Options_Plugins_ShowFrame()
        HealBot_Options_TabRunOnce[tab]=true
    end
end

local HealBot_Options_TabFuncs={
                                ["About"]=HealBot_Options_AboutTab,
                                ["General"]=HealBot_Options_GeneralTab,
                                ["Overrides"]=HealBot_Options_OverridesEffectsTabBorder,
                                ["OverridesEffectsBorder"]=HealBot_Options_OverridesEffectsTabBorder,
                                ["OverridesEffectsBars"]=HealBot_Options_OverridesEffectsTabBars,
                                ["OverridesColourClass"]=HealBot_Options_OverridesColourClassTab,
                                ["OverridesColourRole"]=HealBot_Options_OverridesColourRoleTab,
                                ["OverridesColourPower"]=HealBot_Options_OverridesColourPowerTab,
                                ["OverridesColourAdaptive"]=HealBot_Options_OverridesColourAdaptiveTab,
                                ["OverrideChat"]=HealBot_Options_OverrideChatTab,
                                ["OverrideFrames"]=HealBot_Options_OverrideFramesTab,
                                ["Spells"]=HealBot_Options_SpellsTab,
                                ["SkinsGeneral"]=HealBot_Options_SkinsGeneralTab,
                                ["SkinsEffectsBorder"]=HealBot_Options_SkinsEffectsBorderTab,
                                ["SkinsEffectsBars"]=HealBot_Options_SkinsEffectsBarsTab,
                                ["SkinsColourClass"]=HealBot_Options_SkinsColourClassTab,
                                ["SkinsColourRole"]=HealBot_Options_SkinsColourRoleTab,
                                ["SkinsColourPower"]=HealBot_Options_SkinsColourPowerTab,
                                ["SkinsColoursAdaptive"]=HealBot_Options_SkinsColourAdaptiveTab,
                                ["SkinsFramesEnemyAura"]=HealBot_Options_SkinsEnemyAuraTab,
                                ["SkinsFramesEnemyUnitTargets"]=HealBot_Options_SkinsUnitTargetsTab,
                                ["SkinsFramesEnemyEnemyUnits"]=HealBot_Options_SkinsEnemyUnitsTab,
                                ["SkinsFramesEnemyTargetOfTarget"]=HealBot_Options_SkinsEnemyTargetOfTargetTab,
                                ["SkinsChat"]=HealBot_Options_SkinsChatTab,
                                ["SkinsFramesGeneral"]=HealBot_Options_SkinsFramesGeneralTab,
                                ["SkinsFramesHealGroups"]=HealBot_Options_SkinsFramesHealGroupsTab,
                                ["SkinsFramesHeadersBars"]=HealBot_Options_SkinsFramesHeadersBarsTab,
                                ["SkinsFramesHeadersFrames"]=HealBot_Options_SkinsFramesHeadersFramesTab,
                                ["SkinsFramesBarsGeneral"]=HealBot_Options_SkinsFramesBarsGeneralTab,
                                ["SkinsFramesBarsColour"]=HealBot_Options_SkinsFramesBarsColourTab,
                                ["SkinsFramesBarsSort"]=HealBot_Options_SkinsFramesBarsSortTab,
                                ["SkinsFramesBarsVisibility"]=HealBot_Options_SkinsFramesBarsVisibilityTab,
                                ["SkinsFramesBarsAggro"]=HealBot_Options_SkinsFramesBarsAggroTab,
                                ["SkinsFramesBarsAuxSettings"]=HealBot_Options_SkinsFramesBarsAuxSettingsTab,
                                ["SkinsFramesBarsAuxConfig"]=HealBot_Options_SkinsFramesBarsAuxConfigTab,
                                ["SkinsFramesTextNameText"]=HealBot_Options_SkinsFramesTextNameTextTab,
                                ["SkinsFramesTextNameColours"]=HealBot_Options_SkinsFramesTextNameColoursTab,
                                ["SkinsFramesTextHealthText"]=HealBot_Options_SkinsFramesTextHealthTextTab,
                                ["SkinsFramesTextHealthColours"]=HealBot_Options_SkinsFramesTextHealthColoursTab,
                                ["SkinsFramesTextHealthInHeals"]=HealBot_Options_SkinsFramesTextHealthInHealsTab,
                                ["SkinsFramesTextHealthOverheals"]=HealBot_Options_SkinsFramesTextHealthOverhealsTab,
                                ["SkinsFramesTextStateText"]=HealBot_Options_SkinsFramesTextStateTextTab,
                                ["SkinsFramesTextStateColours"]=HealBot_Options_SkinsFramesTextStateColoursTab,
                                ["SkinsFramesTextAggroText"]=HealBot_Options_SkinsFramesTextAggroTextTab,
                                ["SkinsFramesTextAggroColours"]=HealBot_Options_SkinsFramesTextAggroColoursTab,
                                ["SkinsFramesTextAuxText"]=HealBot_Options_SkinsFramesTextAuxTextTab,
                                ["SkinsFramesTextAuxColours"]=HealBot_Options_SkinsFramesTextAuxColoursTab,
                                ["SkinsFramesIconsDebuffsGeneral"]=HealBot_Options_SkinsFramesIconsDebuffsGeneralTab,
                                ["SkinsFramesIconsDebuffsText"]=HealBot_Options_SkinsFramesIconsDebuffsTextTab,
                                ["SkinsFramesIconsBuffsGeneral"]=HealBot_Options_SkinsFramesIconsBuffsGeneralTab,
                                ["SkinsFramesIconsBuffsText"]=HealBot_Options_SkinsFramesIconsBuffsTextTab,
                                ["SkinsFramesIconsExtrasClass"]=HealBot_Options_SkinsFramesIconsExtrasClassTab,
                                ["SkinsFramesIconsExtrasRank"]=HealBot_Options_SkinsFramesIconsExtrasRankTab,
                                ["SkinsFramesIconsExtrasRaidTarget"]=HealBot_Options_SkinsFramesIconsExtrasRaidTargetTab,
                                ["SkinsFramesIconsExtrasCombat"]=HealBot_Options_SkinsFramesIconsExtrasCombatTab,
                                ["SkinsFramesIconsExtrasReadyCheck"]=HealBot_Options_SkinsFramesIconsExtrasReadyCheckTab,
                                ["SkinsFramesIconsExtrasOORArrow"]=HealBot_Options_SkinsFramesIconsExtrasOORArrowTab,
                                ["SkinsFramesActionIconsGeneral"]=HealBot_Options_SkinsFramesActionIconsGeneralTab,
                                ["SkinsFramesActionIconsIcons"]=HealBot_Options_SkinsFramesActionIconsIconsTab,
                                ["SkinsFramesActionIconsText"]=HealBot_Options_SkinsFramesActionIconsTextTab,
                                ["SkinsFramesActionIconsConfig"]=HealBot_Options_SkinsFramesActionIconsConfigTab,
                                ["SkinsFramesIndicatorsAggro"]=HealBot_Options_SkinsFramesIndicatorsAggroTab,
                                ["SkinsFramesIndicatorsLowMana"]=HealBot_Options_SkinsFramesIndicatorsLowManaTab,
                                ["SkinsFramesIndicatorsSelfCast"]=HealBot_Options_SkinsFramesIndicatorsSelfCastTab,
                                ["SkinsFramesIndicatorsPower"]=HealBot_Options_SkinsFramesIndicatorsPowerTab,
                                ["SkinsFramesEmergencyGeneral"]=HealBot_Options_SkinsFramesEmergencyGeneralTab,
                                ["SkinsFramesEmergencyColours"]=HealBot_Options_SkinsFramesEmergencyColoursTab,
                                ["DebuffsGeneral"]=HealBot_Options_DebuffsGeneralTab,
                                ["DebuffsCustom"]=HealBot_Options_DebuffsCustomTab,
                                ["DebuffsWarning"]=HealBot_Options_DebuffsWarningTab,
                                ["BuffsGeneralBuffs"]=HealBot_Options_BuffsGeneralBuffsTab,
                                ["BuffsExtraBuffs"]=HealBot_Options_BuffsExtraBuffsTab,
                                ["BuffsCustom"]=HealBot_Options_BuffsCustomTab,
                                ["BuffsWarning"]=HealBot_Options_BuffsWarningTab,
                                ["TipsGeneral"]=HealBot_Options_TipsGeneralTab,
                                ["TipsTarget"]=HealBot_Options_TipsTargetTab,
                                ["TipsSpells"]=HealBot_Options_TipsSpellsTab,
                                ["Binds"]=HealBot_Options_BindsTab,
                                ["Test"]=HealBot_Options_TestTab,
                                ["ImportExportSkins"]=HealBot_Options_ImportExportSkinsTab,
                                ["ImportExportCustomDebuffs"]=HealBot_Options_ImportExportCustomDebuffsTab,
                                ["ImportExportCustomBuffs"]=HealBot_Options_ImportExportCustomBuffsTab,
                                ["ImportExportSpells"]=HealBot_Options_ImportExportSpellsTab,
                                ["ImportExportPresetColours"]=HealBot_Options_ImportExportPresetColoursTab,
                                ["Plugins"]=HealBot_Options_PluginsTab,
                               }
local HealBot_Options_SubTabs={
                               ["Overrides"]="OverridesEffectsBorder",
                               ["SkinsEffects"]="SkinsEffectsBorder",
                               ["SkinsColour"]="SkinsColourClass",
                               ["SkinsFramesEnemy"]="SkinsFramesEnemyAura",
                               ["SkinsFramesHeaders"]="SkinsFramesHeadersBars",
                               ["SkinsFramesBars"]="SkinsFramesBarsGeneral",
                               ["SkinsFramesBarsAux"]="SkinsFramesBarsAuxSettings",
                               ["SkinsFramesText"]="SkinsFramesTextNameText",
                               ["SkinsFramesTextName"]="SkinsFramesTextNameText",
                               ["SkinsFramesTextHealth"]="SkinsFramesTextHealthText",
                               ["SkinsFramesTextState"]="SkinsFramesTextStateText",
                               ["SkinsFramesTextAggro"]="SkinsFramesTextAggroText",
                               ["SkinsFramesTextAux"]="SkinsFramesTextAuxText",
                               ["SkinsFramesIcons"]="SkinsFramesIconsDebuffsGeneral",
                               ["SkinsFramesIconsDebuffs"]="SkinsFramesIconsDebuffsGeneral",
                               ["SkinsFramesIconsBuffs"]="SkinsFramesIconsBuffsGeneral",
                               ["SkinsFramesIconsExtras"]="SkinsFramesIconsExtrasClass",
                               ["SkinsFramesActionIcons"]="SkinsFramesActionIconsGeneral",
                               ["ShowActionIconsText"]="SkinsFramesActionIconsText",
                               ["SkinsFramesIndicators"]="SkinsFramesIndicatorsAggro",
                               ["SkinsFramesEmergency"]="SkinsFramesEmergencyGeneral",
                               ["BuffsGeneral"]="BuffsGeneralBuffs",
                               ["Tips"]="TipsGeneral",
                               ["ImportExport"]="ImportExportSkins",
                              }

function HealBot_Options_UpdateTab(tabNo, subTabNo, tab, isParent, subTab)
      --HealBot_setCall("HealBot_Options_UpdateTab")
    if isParent then
        HealBot_Options_SubTabs[tab]=subTab or HealBot_Options_SubTabs[tab]
        tab=HealBot_Options_SubTabs[tab]
    end
    hb_lVars["CurrentTab"]=tab or hb_lVars["CurrentTab"] or "About"
    HealBot_Options_TabFuncs[hb_lVars["CurrentTab"]](hb_lVars["CurrentTab"])
    if tab and tab~="Spells" then hb_lVars["SpellsTabOpenWarnId"]=0 end
    if tabNo then
        HealBot_Options_ShowPanel(tabNo, subTabNo)
    end
    HealBot_Options_ActionIconsBind_End()
end

function HealBot_Options_ResetUpdate()
      --HealBot_setCall("HealBot_Options_ResetUpdate")
    HealBot_Options_TabRunOnce={}
    HealBot_Options_UpdateTab()
end

function HealBot_Options_ResetUpdateCurrentTab()
    if hb_lVars["CurrentTab"] then
        HealBot_Options_TabRunOnce[hb_lVars["CurrentTab"]]=false
        HealBot_Options_UpdateTab()
    else
        HealBot_Options_ResetUpdate()
    end
end

function HealBot_Options_SkinsFramesInit()
      --HealBot_setCall("HealBot_Options_SkinsFramesInit")
    HealBot_Options_SelectSkin.initialize=HealBot_Options_Skins_DropDown
    UIDropDownMenu_SetText(HealBot_Options_SelectSkin, Healbot_Config_Skins.Skins[Healbot_Config_Skins.Skin_ID])
    HealBot_Options_FrameAliasList()
    HealBot_Options_FramesSelFrame.initialize=HealBot_Options_FramesSelFrame_DropDown
    UIDropDownMenu_SetText(HealBot_Options_FramesSelFrame, HealBot_Options_HealGroupsFrame_List[hb_lVars["Frame"]])
    HealBot_Options_SetLabel("HealBot_PresetColours_AliasHeader",HEALBOT_OPTIONS_FRAME_ALIAS)
    HealBot_Options_SetLabel("HealBot_PresetColours_BarHeader",HEALBOT_OPTIONS_PRESET_COLOUR)
    for id=1,10 do
        f=_G["HealBot_PresetColourAlias"..id]
        f:SetText(HealBot_Globals.PresetColoursAlias[id])
        f=_G["HealBot_PresetColourpick"..id]
        HealBot_Globals.PresetColours[id].R=tonumber(HealBot_Globals.PresetColours[id].R or 1) or 1
        HealBot_Globals.PresetColours[id].G=tonumber(HealBot_Globals.PresetColours[id].G or 1) or 1
        HealBot_Globals.PresetColours[id].B=tonumber(HealBot_Globals.PresetColours[id].B or 1) or 1
        HealBot_Globals.PresetColours[id].A=tonumber(HealBot_Globals.PresetColours[id].A or 1) or 1
        f:SetStatusBarColor(HealBot_Globals.PresetColours[id].R,
                            HealBot_Globals.PresetColours[id].G,
                            HealBot_Globals.PresetColours[id].B,
                            HealBot_Globals.PresetColours[id].A)
    end
    HealBot_Options_InOutCompressExport:SetChecked(HealBot_Globals.CompressExport)
    HealBot_Options_SetText(HealBot_Options_InOutCompressExport,HEALBOT_OPTION_COMPRESSEXPORT)
    HealBot_Options_EFClass_Reset()
    HealBot_Comms_About()
    HealBot_Options_DisableHealBotOpt:SetChecked(HealBot_Config.DisableHealBot)
    HealBot_Options_DisableHealBotSolo:SetChecked(HealBot_Config.DisableSolo)
    HealBot_Options_DisableHealBotSpec:SetChecked(HealBot_Config.DisableOnSpec[HealBot_Config.Spec])
    --HealBot_Options_SelectSpellsFrame:Hide()
    HealBot_Options_NewSkinb:Disable()
    HealBot_Options_SetLabel("HealBot_Options_ScaleFrameText",HEALBOT_OPTIONS_SKINTEXT)
    HealBot_Options_SetLabel("HealBot_Options_SelectSkinDisabledTxt",HEALBOT_OPTIONS_SKINTEXT)
    HealBot_Options_DeleteSkin:SetText(HEALBOT_OPTIONS_DELSKIN)
    HealBot_Options_SetLabel("HealBot_Options_ScaleFrameText2",HEALBOT_OPTIONS_NEWSKINTEXT)
    HealBot_Options_NewSkinb:SetText(HEALBOT_OPTIONS_SAVESKIN)
    HealBot_Options_ApplyTab2Frames:SetText(HEALBOT_OPTIONS_SET_ALL_FRAMES)
    HealBot_Options_SetLabel("HealBot_Options_SkinAuthorName",Healbot_Config_Skins.Author[Healbot_Config_Skins.Current_Skin])
    if HEALBOT_GAME_VERSION<4 then
        hbv_Skins_SetFrameVar("", "BarText", "TAGSUM", hb_lVars["Frame"])
        hbv_Skins_SetFrameVar(false, "BarTextCol", "SUM", hb_lVars["Frame"])
        for f=1,10 do
            for x=1,9 do
                if hbv_Aux_GetBarVar("USE", f, x)>hb_lVars["MaxClassicAuxBarAssign"] then
                    hbv_Data_AuxSetBarVar(1, "USE", f, x)
                end
            end
        end
    end
    HealBot_setLuVars("TargetNeedReset", true)
    HealBot_setLuVars("FocusNeedReset", true)
    hb_lVars["cSkin"]=Healbot_Config_Skins.Current_Skin
    hb_lVars["SelectSpellsFrame"]=false
    HealBot_Options_SetLabel("HealBot_Options_FramesSelFrameFontStr",HEALBOT_OPTIONS_FRAME)
    if hb_lVars["Frame"] == 10 then
        HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsEmergencyPanel"],false)
        HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesEmergencyTabNotAvail",true)
        HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsIndicatorsPanel"],false)
        HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesIndicatorsTabNotAvail",true)
    else
        HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsEmergencyPanel"],true)
        HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesEmergencyTabNotAvail",false)
        HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsIndicatorsPanel"],true)
        HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesIndicatorsTabNotAvail",false)
    end
    if hb_lVars["CurrentSkinsBarsPanel"] == "HealBot_Options_SkinsFramesBarsSort" then
        if hb_lVars["Frame"]>7 and hb_lVars["Frame"]<10 then
            HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesBarsTabNotAvail",true)
            HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsBarsPanel"],false)
        else
            HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsBarsPanel"],true)
            HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesBarsTabNotAvail",false)
        end
    elseif hb_lVars["CurrentSkinsBarsPanel"] == "HealBot_Options_SkinsFramesBarsAggro" then
        if hb_lVars["Frame"] == 10 then
            HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesBarsTabNotAvail",true)
            HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsBarsPanel"],false)
        else
            HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsBarsPanel"],true)
            HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesBarsTabNotAvail",false)
        end
    else
        HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsBarsPanel"],true)
        HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesBarsTabNotAvail",false)
    end
    if hb_lVars["CurrentSkinsBarsPanel"] == "HealBot_Options_SkinsFramesBarsColours" then
        HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsBarsPanel"],true)
    end
    HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesBarsColoursCustom",false)
    if hb_lVars["CurrentSkinsTextStatePanel"] == "HealBot_Options_SkinsFrameTextStateColour" then
        HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsTextStatePanel"],true)
    end
    if hb_lVars["CurrentSkinsTextNamePanel"] == "HealBot_Options_SkinsFrameTextNameColour" then
        HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsTextNamePanel"],true)
    end
    if hb_lVars["CurrentSkinsTextHealthPanel"] == "HealBot_Options_SkinsFrameTextHealthColour" then
        HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsTextHealthPanel"],true)
    end
    if hb_lVars["CurrentSkinsTextAggroPanel"] == "HealBot_Options_SkinsFrameTextAggroColour" then
        HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsTextAggroPanel"],true)
    end
    HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesTextColoursCustom",false)
    HealBot_Timers_Set("SKINS","ResetUpdate")
end

function HealBot_Options_CopyFrameTab()
      --HealBot_setCall("HealBot_Options_CopyFrameTab")
    HealBot_Options_SetText(HealBot_Options_CopyTab24,"X")
    HealBot_Options_SetText(HealBot_Options_CopyTab25,"Y")
    HealBot_Options_SetText(HealBot_Options_CopyTab1,HEALBOT_OPTIONS_TAB_GENERAL)
    HealBot_Options_SetText(HealBot_Options_CopyTab2,HEALBOT_OPTIONS_TAB_BARS)
    HealBot_Options_SetText(HealBot_Options_CopyTab3,HEALBOT_OPTIONS_TAB_FRAMES)
    HealBot_Options_SetText(HealBot_Options_CopyTab4,HEALBOT_OPTIONS_TAB_GENERAL)
    HealBot_Options_SetText(HealBot_Options_CopyTab5,HEALBOT_WORD_COLOURS)
    HealBot_Options_SetText(HealBot_Options_CopyTab6,HEALBOT_OPTIONS_TAB_SORT)
    HealBot_Options_SetText(HealBot_Options_CopyTab7,HEALBOT_OPTIONS_TAB_VISIBILITY)
    HealBot_Options_SetText(HealBot_Options_CopyTab8,HEALBOT_OPTIONS_TAB_AGGRO)
    HealBot_Options_SetText(HealBot_Options_CopyTab9,HEALBOT_OPTIONS_TAB_AUX)
    HealBot_Options_SetText(HealBot_Options_CopyTab23,HEALBOT_OPTIONS_TAB_STATETEXT)
    HealBot_Options_SetText(HealBot_Options_CopyTab10,HEALBOT_OPTIONS_TAB_NAMETEXT)
    HealBot_Options_SetText(HealBot_Options_CopyTab11,HEALBOT_WORD_HEALTH)
    HealBot_Options_SetText(HealBot_Options_CopyTab12,HEALBOT_OPTIONS_TAB_AGGRO)
    HealBot_Options_SetText(HealBot_Options_CopyTab13,HEALBOT_OPTIONS_TAB_AUX)
    HealBot_Options_SetText(HealBot_Options_CopyTab14,HEALBOT_OPTIONS_TAB_DEBUFFS)
    HealBot_Options_SetText(HealBot_Options_CopyTab15,HEALBOT_OPTIONS_TAB_BUFFS)
    HealBot_Options_SetText(HealBot_Options_CopyTab16,HEALBOT_OPTIONS_TAB_EXTRAS)
    HealBot_Options_SetText(HealBot_Options_CopyTab17,HEALBOT_OPTIONS_TAB_AGGRO)
    HealBot_Options_SetText(HealBot_Options_CopyTab18,HEALBOT_OPTIONS_LOWMANA)
    HealBot_Options_SetText(HealBot_Options_CopyTab22,HEALBOT_OPTIONS_SELFCASTIND)
    HealBot_Options_SetText(HealBot_Options_CopyTab19,HEALBOT_OPTIONS_POWER)
    HealBot_Options_SetText(HealBot_Options_CopyTab20,HEALBOT_OPTIONS_TAB_GENERAL)
    HealBot_Options_SetText(HealBot_Options_CopyTab21,HEALBOT_WORD_COLOURS)
end

function HealBot_Options_CustomColoursFrameTab()
      --HealBot_setCall("HealBot_Options_CustomColoursFrameTab")
    HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_CustomColourInjured,HEALBOT_OPTIONS_EMERGINJTRIG,0,1,0.01,5)
    HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_CustomColourCritical,HEALBOT_OPTIONS_EMERGCRITTRIG,0,1,0.01,5)
    HealBot_Options_Pct_OnValueChanged(HealBot_Options_CustomColourInjured)
    HealBot_Options_Pct_OnValueChanged(HealBot_Options_CustomColourCritical)
    HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_TextCustomColourInjured,HEALBOT_OPTIONS_EMERGINJTRIG,0,1,0.01,5)
    HealBot_Options_Pct_OnLoad_MinMax(HealBot_Options_TextCustomColourCritical,HEALBOT_OPTIONS_EMERGCRITTRIG,0,1,0.01,5)
    HealBot_Options_Pct_OnValueChanged(HealBot_Options_TextCustomColourInjured)
    HealBot_Options_Pct_OnValueChanged(HealBot_Options_TextCustomColourCritical)
end

function HealBot_Options_DebuffsTab()
      --HealBot_setCall("HealBot_Options_DebuffsTab")
    HealBot_Options_MonitorDebuffs:SetChecked(HealBot_Config_Cures.DebuffWatch)
    HealBot_Options_SetText(HealBot_Options_MonitorDebuffs,HEALBOT_OPTIONS_MONITORDEBUFFS)
    HealBot_Options_MonitorDebuffsInCombat:SetChecked(HealBot_Config_Cures.DebuffWatchInCombat)
    HealBot_Options_SetText(HealBot_Options_MonitorDebuffsInCombat,HEALBOT_OPTIONS_MONITORDEBUFFSC)
    HealBot_Options_MonitorDebuffsWhenGrouped:SetChecked(HealBot_Config_Cures.DebuffWatchWhenGrouped)
    HealBot_Options_SetText(HealBot_Options_MonitorDebuffsWhenGrouped,HEALBOT_OPTIONS_IN_A_GROUP)
    HealBot_Options_MonitorDebuffsWhenMounted:SetChecked(HealBot_Config_Cures.DebuffWatchWhenMounted)
    HealBot_Options_SetText(HealBot_Options_MonitorDebuffsWhenMounted,HEALBOT_OPTIONS_ALSO_WHEN_MOUNTED)
    HealBot_SetCDCBarColours()
end

function HealBot_Options_BuffsTab()
      --HealBot_setCall("HealBot_Options_BuffsTab")
    HealBot_Options_MonitorBuffs:SetChecked(HealBot_Config_Buffs.BuffWatch)
    HealBot_Options_SetText(HealBot_Options_MonitorBuffs,HEALBOT_OPTIONS_MONITORBUFFS)
    HealBot_Options_MonitorBuffsInCombat:SetChecked(HealBot_Config_Buffs.BuffWatchInCombat)
    HealBot_Options_SetText(HealBot_Options_MonitorBuffsInCombat,HEALBOT_OPTIONS_MONITORGBUFFSC)
    HealBot_Options_MonitorCustomBuffsInCombat:SetChecked(HealBot_Config_Buffs.BuffCustomWatchInCombat)
    HealBot_Options_SetText(HealBot_Options_MonitorCustomBuffsInCombat,HEALBOT_OPTIONS_MONITORCBUFFSC)
    HealBot_Options_MonitorBuffsWhenGrouped:SetChecked(HealBot_Config_Buffs.BuffWatchWhenGrouped)
    HealBot_Options_SetText(HealBot_Options_MonitorBuffsWhenGrouped,HEALBOT_OPTIONS_IN_A_GROUP)
    HealBot_Options_MonitorBuffsWhenMounted:SetChecked(HealBot_Config_Buffs.BuffWatchWhenMounted)
    HealBot_Options_SetText(HealBot_Options_MonitorBuffsWhenMounted,HEALBOT_OPTIONS_ALSO_WHEN_MOUNTED)
    HealBot_Options_MonitorBuffsPalaBlessing:SetChecked(HealBot_Config_Buffs.PalaBlessingsAsOne)
    HealBot_Options_SetText(HealBot_Options_MonitorBuffsPalaBlessing,HEALBOT_OPTIONS_PALADIN_BLESSINGS)
    HealBot_Options_valtime_OnLoad(HealBot_Options_ShortBuffTimer,HEALBOT_OPTIONS_SHORTBUFFTIMER,0,120,5,6)
    HealBot_Options_ShortBuffTimer:SetValue(HealBot_Config_Buffs.ShortBuffTimer)
    HealBot_Options_BuffTimer_OnValueChanged(HealBot_Options_ShortBuffTimer,"SHORT")
    HealBot_Options_valtime_OnLoad(HealBot_Options_LongBuffTimer,HEALBOT_OPTIONS_LONGBUFFTIMER,0,300,15,4)
    HealBot_Options_LongBuffTimer:SetValue(HealBot_Config_Buffs.LongBuffTimer)
    HealBot_Options_BuffTimer_OnValueChanged(HealBot_Options_LongBuffTimer,"LONG")
    HealBot_Options_SetLabel("HealBot_Options_Panel5_4", HEALBOT_OPTIONS_BUFFSTEXTTIMER)
    HealBot_Timers_Set("AURA","BuffBarColours")
end

function HealBot_Options_EnemyTab()
      --HealBot_setCall("HealBot_Options_EnemyTab")
    if HEALBOT_GAME_VERSION<2 then
        HealBot_Options_ShowEnemyIncArena:Hide()
        HealBot_Options_ShowEnemyIncArenaPets:Hide()
        HealBot_Options_EnemyExistsArena:Hide()
        HealBot_Options_EnemyCombatArena:Hide()
        HealBot_Options_ShowEnemyIncFocus:Hide()
        HealBot_Options_EnemyExistsFocus:Hide()
        HealBot_Options_EnemyCombatFocus:Hide()
        HealBot_Options_ShowEnemyNumBoss:Hide()
        HealBot_Options_EnemyExistsBosses:Hide()
        HealBot_Options_EnemySkinsFrameEnemyUnitsb:Hide()
        HealBot_Options_EnemySkinsFrameUnitTargetsb:ClearAllPoints()
        HealBot_Options_EnemySkinsFrameUnitTargetsb:SetPoint("TOP",0,-10)
        HealBot_Options_EnemySkinsFrameAurab:ClearAllPoints()
        HealBot_Options_EnemySkinsFrameAurab:SetPoint("TOP",-170,-10)
        HealBot_Options_EnemySkinsFrameTargetOfTargetb:ClearAllPoints()
        HealBot_Options_EnemySkinsFrameTargetOfTargetb:SetPoint("TOP",170,-10)
    end
end

function HealBot_Options_IndicatorsTab()
      --HealBot_setCall("HealBot_Options_IndicatorsTab")
    local showPowerTab=false
    if HEALBOT_GAME_VERSION>3 and HealBot_Data["PCLASSTRIM"] then
        if HealBot_Data["PCLASSTRIM"] == hbv_GetClass("En", HEALBOT_ROGUE) or
           HealBot_Data["PCLASSTRIM"] == hbv_GetClass("En", HEALBOT_PALADIN) or
           HealBot_Data["PCLASSTRIM"] == hbv_GetClass("En", HEALBOT_WARLOCK) or
           HealBot_Data["PCLASSTRIM"] == hbv_GetClass("En", HEALBOT_MONK) or
           HealBot_Data["PCLASSTRIM"] == hbv_GetClass("En", HEALBOT_DRUID) or
           HealBot_Data["PCLASSTRIM"] == hbv_GetClass("En", HEALBOT_EVOKER) then
            showPowerTab=true
        end
    end
    if showPowerTab then
        HealBot_Options_SkinsFrameIndicatorsPowerb:Show()
        HealBot_Options_SkinsFrameIndicatorsAggrob:SetWidth(130)
        HealBot_Options_SkinsFrameIndicatorsAggrob:ClearAllPoints()
        HealBot_Options_SkinsFrameIndicatorsAggrob:SetPoint("TOP",-210,-10)
        HealBot_Options_SkinsFrameIndicatorsLowManab:SetWidth(130)
        HealBot_Options_SkinsFrameIndicatorsLowManab:ClearAllPoints()
        HealBot_Options_SkinsFrameIndicatorsLowManab:SetPoint("TOP",-70,-10)
        HealBot_Options_SkinsFrameIndicatorsSelfCastb:SetWidth(130)
        HealBot_Options_SkinsFrameIndicatorsSelfCastb:ClearAllPoints()
        HealBot_Options_SkinsFrameIndicatorsSelfCastb:SetPoint("TOP",70,-10)
        if HealBot_Data["PCLASSTRIM"] == hbv_GetClass("En", HEALBOT_PALADIN) then
            HealBot_Options_ShowPowerCounterText:SetText(HEALBOT_OPTIONS_SHOWPOWERCOUNTER_PALA)
        elseif HealBot_Data["PCLASSTRIM"] == hbv_GetClass("En", HEALBOT_ROGUE) then
            HealBot_Options_ShowPowerCounterText:SetText(HEALBOT_OPTIONS_SHOWPOWERCOUNTER_ROGU)
        elseif HealBot_Data["PCLASSTRIM"] == hbv_GetClass("En", HEALBOT_WARLOCK) then
            HealBot_Options_ShowPowerCounterText:SetText(HEALBOT_OPTIONS_SHOWPOWERCOUNTER_WARL)
        elseif HealBot_Data["PCLASSTRIM"] == hbv_GetClass("En", HEALBOT_MONK) then
            HealBot_Options_ShowPowerCounterText:SetText(HEALBOT_OPTIONS_SHOWPOWERCOUNTER_MONK)
        end
    else
        HealBot_Options_SkinsFrameIndicatorsPowerb:Hide()
        HealBot_Options_SkinsFrameIndicatorsAggrob:SetWidth(175)
        HealBot_Options_SkinsFrameIndicatorsAggrob:ClearAllPoints()
        HealBot_Options_SkinsFrameIndicatorsAggrob:SetPoint("TOP",-190,-10)
        HealBot_Options_SkinsFrameIndicatorsLowManab:SetWidth(175)
        HealBot_Options_SkinsFrameIndicatorsLowManab:ClearAllPoints()
        HealBot_Options_SkinsFrameIndicatorsLowManab:SetPoint("TOP",0,-10)
        HealBot_Options_SkinsFrameIndicatorsSelfCastb:SetWidth(175)
        HealBot_Options_SkinsFrameIndicatorsSelfCastb:ClearAllPoints()
        HealBot_Options_SkinsFrameIndicatorsSelfCastb:SetPoint("TOP",190,-10)
    end
end

function HealBot_Options_MediaUpdateFonts()
      --HealBot_setCall("HealBot_Options_MediaUpdateFonts")
    HealBot_Media_UpdateType("Fonts", hb_lVars["Frame"], hb_lVars["AuxTxtBar"])
end

function HealBot_Options_MediaUpdateTextures()
      --HealBot_setCall("HealBot_Options_MediaUpdateTextures")
    HealBot_Media_UpdateType("Textures", hb_lVars["Frame"])
end

function HealBot_Options_MediaUpdateSounds()
      --HealBot_setCall("HealBot_Options_MediaUpdateSounds")
    HealBot_Media_UpdateType("Sounds", hb_lVars["Frame"])
end

local HealBot_Options_ExtraTabFuncs={
                                     [1]=HealBot_Options_SkinsFramesInit,
                                     [2]=HealBot_Options_ResetUpdate,
                                     [3]=HealBot_SetSkinColours,
                                     [4]=HealBot_Options_CopyFrameTab,
                                     [5]=HealBot_Options_CustomColoursFrameTab,
                                     [6]=HealBot_Options_DebuffsTab,
                                     [7]=HealBot_Options_BuffsTab,
                                     [8]=HealBot_Options_EnemyTab,
                                     [9]=HealBot_Options_IndicatorsTab,
                                    [10]=HealBot_Options_MediaUpdateFonts,
                                    [11]=HealBot_Options_MediaUpdateTextures,
                                    [12]=HealBot_Options_MediaUpdateSounds,
                                    }

function HealBot_Options_DoInitExtras(tab)
      --HealBot_setCall("HealBot_Options_DoInitExtras")
    if HealBot_Options_ExtraTabFuncs[tab] then
        HealBot_Options_ExtraTabFuncs[tab]()
        C_Timer.After(0.02, function() HealBot_Options_DoInitExtras(tab+1) end)
    else
        hb_lVars["RunInitExtras"]=false
    end
end

function HealBot_Options_InitExtras()
      --HealBot_setCall("HealBot_Options_InitExtras")
    if HealBot_Options:IsVisible() then
        if not hb_lVars["RunInitExtras"] then
            hb_lVars["RunInitExtras"]=true
            HealBot_Options_DoInitExtras(1)
        else
            HealBot_Timers_Set("LAST","OptionsInitExtraTabs",true,true) -- All recall require a delay
        end
    end
end

function HealBot_Options_SetTooltipState()
      --HealBot_setCall("HealBot_Options_SetTooltipState")
    if HealBot_Globals.ShowTooltip then
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HideTooltipInCombat",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipPosSettings",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipCustomAnchor",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipShowUnitTip",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_UseGameTooltip",true)
        if HealBot_Globals.Tooltip_UseGameTooltip then
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipHeaderFont",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipHeaderFontSize",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipDetailFont",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipDetailFontSize",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipScale",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipAlpha",false)
        else
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipHeaderFont",true)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipHeaderFontSize",true)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipDetailFont",true)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipDetailFontSize",true)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipScale",true)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipAlpha",true)
        end
        if HealBot_Globals.ShowGameUnitInfo then
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipTarget",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpellInfo",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpellExtra",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpellCoolDown",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpellIgnoreGlobalCoolDown",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipShowHoT",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipMyBuffs",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipGuild",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipGuildTitle",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipGuildRank",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipTitle",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipRequiredBuffs",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipDebuffs",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipLevel",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpec",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipHealthLine",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipManaLine",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipRanks",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipRoles",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipHideRoleWhenRank",false)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_TipMaxButtons",false)
        else
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipTarget",true)
            HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpellInfo",true)
            if HealBot_Globals.Tooltip_ShowSpellInfo then
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpellExtra",true)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpellCoolDown",true)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpellIgnoreGlobalCoolDown",true)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipShowHoT",true)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_TipMaxButtons",true)
            else
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpellExtra",false)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpellCoolDown",false)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpellIgnoreGlobalCoolDown",false)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipShowHoT",false)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_TipMaxButtons",false)
            end
            if HealBot_Globals.Tooltip_ShowTarget then
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipMyBuffs",true)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipGuild",true)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipGuildTitle",true)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipGuildRank",true)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipTitle",true)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipRequiredBuffs",true)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipDebuffs",true)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipLevel",true)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpec",true)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipHealthLine",true)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipManaLine",true)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipRanks",true)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipRoles",true)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipHideRoleWhenRank",true)
            else
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipMyBuffs",false)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipGuild",false)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipGuildTitle",false)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipGuildRank",false)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipTitle",false)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipRequiredBuffs",false)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipDebuffs",false)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipLevel",false)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpec",false)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipHealthLine",false)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipManaLine",false)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipRanks",false)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipRoles",false)
                HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipHideRoleWhenRank",false)
            end
        end
    else
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_HideTooltipInCombat",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipTarget",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipMyBuffs",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipGuild",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipGuildTitle",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipGuildRank",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipTitle",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipRequiredBuffs",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipDebuffs",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipLevel",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpec",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipHealthLine",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipManaLine",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipRanks",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_UseGameTooltip",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipRoles",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipHideRoleWhenRank",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpellInfo",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpellExtra",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpellCoolDown",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipSpellIgnoreGlobalCoolDown",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipShowHoT",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_ShowTooltipShowUnitTip",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipPosSettings",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipCustomAnchor",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_TipMaxButtons",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipScale",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipAlpha",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipHeaderFont",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipHeaderFontSize",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipDetailFont",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_TooltipDetailFontSize",false)
    end
end

function HealBot_Options_SetEFGroups()
      --HealBot_setCall("HealBot_Options_SetEFGroups")
    local g=nil
    for x=1,8 do
        g=_G["HealBot_Options_EFGroup"..x]
        if hbv_Skins_GetFocusGroup(x) then
            g:SetChecked(true)
        else
            g:SetChecked(false)
        end
        HealBot_Options_SetText(g,x)
        g=_G["HealBot_Options_OverrideEFGroup"..x]
        if HealBot_Globals.OverrideFocusGroups[x] then
            g:SetChecked(true)
        else
            g:SetChecked(false)
        end
        HealBot_Options_SetText(g,x)
    end
end

local HealBot_disabledState=-1
hbCurSkin=Healbot_Config_Skins.Current_Skin
function HealBot_Options_SetSkins(force)
      --HealBot_setCall("HealBot_Options_SetSkins")
    if hbCurSkin~=Healbot_Config_Skins.Current_Skin or force then
        if hbCurSkin~=Healbot_Config_Skins.Current_Skin then
            hb_lVars["HeaderSwitchNumColsHdrOn"]=0
            hb_lVars["HeaderSwitchNumColsHdrOff"]=0
            HealBot_Panel_resetInitFrames()
            HealBot_Action_setLuVars("resetIcon", true)
            HealBot_Action_setLuVars("resetSkin", true)
            HealBot_Action_setLuVars("resetIndicator", true)
            HealBot_Action_setLuVars("resetText", true)
            --HealBot_Action_setLuVars("resetAux", true)
            HealBot_Update_RemoveExtraIcons(91)
            HealBot_Update_RemoveExtraIcons(92)
            HealBot_Update_RemoveExtraIcons(93)
            HealBot_Update_RemoveExtraIcons(94)
            HealBot_Aux_resetBars()
            HealBot_Timers_Set("AURA","RaidTargetUpdateAll")
            HealBot_Timers_Set("SKINS","SkinsFormat")
            HealBot_Timers_Set("SKINS","SkinColours")
            HealBot_Timers_Set("SKINS","SetSkinBars")
            HealBot_Timers_Set("SKINS","SetSkinText")
        end
        if Healbot_Config_Skins.Current_Skin == HEALBOT_SKINS_STD then
            HealBot_Options_DeleteSkin:Disable();
        else
            HealBot_Options_DeleteSkin:Enable();
        end
        HealBot_Options_RaidTargetUpdate()
        HealBot_Options_CheckReadyCheckEvent()
        hbCurSkin=Healbot_Config_Skins.Current_Skin
    end
end

function HealBot_Options_SetSkinText()
      --HealBot_setCall("HealBot_Options_SetSkinText")
    HealBot_Media_UpdateFont(HealBot_HeadBarColorpickt,
                             hbv_Skins_GetFrameVar("HeadText", "FONT", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("HeadText", "HEIGHT", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("HeadText", "OUTLINE", hb_lVars["Frame"]),
                             "Options_SetSkinText - HeadText")
    HealBot_Media_UpdateFont(HealBot_HeadTextColorpickt,
                             hbv_Skins_GetFrameVar("HeadText", "FONT", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("HeadText", "HEIGHT", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("HeadText", "OUTLINE", hb_lVars["Frame"]),
                             "Options_SetSkinText - HeadText")
    HealBot_Media_UpdateFont(HealBot_FrameAliasColorpickt,
                             hbv_Skins_GetFrameVar("FrameAlias", "FONT", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("FrameAlias", "SIZE", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("FrameAlias", "OUTLINE", hb_lVars["Frame"]),
                             "Options_SetSkinText - FrameAlias")
    HealBot_Media_UpdateFont(HealBot_FrameAliasTextColorpickt,
                             hbv_Skins_GetFrameVar("FrameAlias", "FONT", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("FrameAlias", "SIZE", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("FrameAlias", "OUTLINE", hb_lVars["Frame"]),
                             "Options_SetSkinText - FrameAlias")
    HealBot_Media_UpdateFont(HealBot_BarHealthyCustomColourt,
                             hbv_Skins_GetFrameVar("BarText", "FONT", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("BarText", "HEIGHT", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("BarText", "OUTLINE", hb_lVars["Frame"]),
                             "Options_SetSkinText - BarText")
    HealBot_Media_UpdateFont(HealBot_BarInjuredCustomColourt,
                             hbv_Skins_GetFrameVar("BarText", "FONT", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("BarText", "HEIGHT", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("BarText", "OUTLINE", hb_lVars["Frame"]),
                             "Options_SetSkinText - BarText")
    HealBot_Media_UpdateFont(HealBot_BarCriticalCustomColourt,
                             hbv_Skins_GetFrameVar("BarText", "FONT", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("BarText", "HEIGHT", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("BarText", "OUTLINE", hb_lVars["Frame"]),
                             "Options_SetSkinText - BarText")
    HealBot_Media_UpdateFont(HealBot_BarHealthyCustomColourEnemyt,
                             hbv_Skins_GetFrameVar("BarText", "FONT", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("BarText", "HEIGHT", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("BarText", "OUTLINE", hb_lVars["Frame"]),
                             "Options_SetSkinText - BarText")
    HealBot_Media_UpdateFont(HealBot_BarInjuredCustomColourEnemyt,
                             hbv_Skins_GetFrameVar("BarText", "FONT", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("BarText", "HEIGHT", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("BarText", "OUTLINE", hb_lVars["Frame"]),
                             "Options_SetSkinText - BarText")
    HealBot_Media_UpdateFont(HealBot_BarCriticalCustomColourEnemyt,
                             hbv_Skins_GetFrameVar("BarText", "FONT", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("BarText", "HEIGHT", hb_lVars["Frame"]),
                             hbv_Skins_GetFrameVar("BarText", "OUTLINE", hb_lVars["Frame"]),
                             "Options_SetSkinText - BarText")
    HealBot_Media_UpdateUsedMedia("font", hb_lVars["Frame"])
end

function HealBot_Options_SetSkinBars()
      --HealBot_setCall("HealBot_Options_SetSkinBars")
    HealBot_Media_UpdateTextureRef("HealBot_DiseaseColorpick", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_MagicColorpick", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_PoisonColorpick", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_CurseColorpick", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_BleedColorpick", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_CustomColorpick", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_BuffCustomColorpick", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    for x=1,10 do
        HealBot_Media_UpdateTextureRef("HealBot_PresetColourpick"..x, hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    end
    for x=1,16 do
        HealBot_Media_UpdateTextureRef("HealBot_Buff"..x.."Colour", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    end
    HealBot_Media_UpdateTextureRef("HealBot_NameTextDeadCol", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_StateTextDeadCol", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_NameTextResCol", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_StateTextResCol", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_NameTextSummonCol", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_StateTextSummonCol", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_AuxTextCustomColour", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_ExtraOverHealCustomColour", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_ExtraInHealCustomColour", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_ExtraHealthCustomColour", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_AuxBarCustomColour", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_BarHealthyCustomColour", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_BarInjuredCustomColour", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_BarCriticalCustomColour", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_BarHealthyCustomColourEnemy", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_BarInjuredCustomColourEnemy", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_BarCriticalCustomColourEnemy", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_TextHealthyCustomColour", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_TextInjuredCustomColour", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_TextCriticalCustomColour", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_TextHealthyCustomColourEnemy", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_TextInjuredCustomColourEnemy", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_TextCriticalCustomColourEnemy", hbv_Skins_GetFrameVar("HealBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HealBar")
    HealBot_Media_UpdateTextureRef("HealBot_EmergCustomColCrit", hbv_Skins_GetFrameVar("Emerg", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - Emerg")
    HealBot_Media_UpdateTextureRef("HealBot_EmergCustomColInj", hbv_Skins_GetFrameVar("Emerg", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - Emerg")
    HealBot_Media_UpdateTextureRef("HealBot_EmergCustomColHealthy", hbv_Skins_GetFrameVar("Emerg", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - Emerg")
    HealBot_Media_UpdateTextureRef("HealBot_HeadBarColorpick", hbv_Skins_GetFrameVar("HeadBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HeadBar")
    HealBot_Media_UpdateTextureRef("HealBot_HeadTextColorpick", hbv_Skins_GetFrameVar("HeadBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - HeadBar")
    HealBot_Media_UpdateTextureRef("HealBot_FrameAliasColorpick", hbv_Skins_GetFrameVar("FrameAliasBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - FrameAliasBar")
    HealBot_Media_UpdateTextureRef("HealBot_FrameAliasTextColorpick", hbv_Skins_GetFrameVar("FrameAliasBar", "TEXTURE", hb_lVars["Frame"]), "Options_SetSkinBars - FrameAliasBar")
    HealBot_Options_SetLabel("HealBot_Options_SkinAuthorName",Healbot_Config_Skins.Author[Healbot_Config_Skins.Current_Skin])
    HealBot_DiseaseColorpick:GetStatusBarTexture():SetHorizTile(false)
    HealBot_MagicColorpick:GetStatusBarTexture():SetHorizTile(false)
    HealBot_PoisonColorpick:GetStatusBarTexture():SetHorizTile(false)
    HealBot_CurseColorpick:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BleedColorpick:GetStatusBarTexture():SetHorizTile(false)
    HealBot_CustomColorpick:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BuffCustomColorpick:GetStatusBarTexture():SetHorizTile(false)
    HealBot_PresetColourpick1:GetStatusBarTexture():SetHorizTile(false)
    HealBot_PresetColourpick2:GetStatusBarTexture():SetHorizTile(false)
    HealBot_PresetColourpick3:GetStatusBarTexture():SetHorizTile(false)
    HealBot_PresetColourpick4:GetStatusBarTexture():SetHorizTile(false)
    HealBot_PresetColourpick5:GetStatusBarTexture():SetHorizTile(false)
    HealBot_PresetColourpick6:GetStatusBarTexture():SetHorizTile(false)
    HealBot_PresetColourpick7:GetStatusBarTexture():SetHorizTile(false)
    HealBot_PresetColourpick8:GetStatusBarTexture():SetHorizTile(false)
    HealBot_PresetColourpick9:GetStatusBarTexture():SetHorizTile(false)
    HealBot_PresetColourpick10:GetStatusBarTexture():SetHorizTile(false)
    HealBot_HeadBarColorpick:GetStatusBarTexture():SetHorizTile(false)
    HealBot_HeadTextColorpick:GetStatusBarTexture():SetHorizTile(false)
    HealBot_FrameAliasColorpick:GetStatusBarTexture():SetHorizTile(false)
    HealBot_FrameAliasTextColorpick:GetStatusBarTexture():SetHorizTile(false)
    HealBot_Buff1Colour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_Buff2Colour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_Buff3Colour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_Buff4Colour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_Buff5Colour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_Buff6Colour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_Buff7Colour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_Buff8Colour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_Buff9Colour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_Buff10Colour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_Buff11Colour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_Buff12Colour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_Buff13Colour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_Buff14Colour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_Buff15Colour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_Buff16Colour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomHealthColourHealthy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomHealthColourCritical:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomHealthColourInjured:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomHealthColourHealthyEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomHealthColourCriticalEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomHealthColourInjuredEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_ColRoleTankpick:GetStatusBarTexture():SetHorizTile(false)
    HealBot_ColRoleHealpick:GetStatusBarTexture():SetHorizTile(false)
    HealBot_ColRoleDPSpick:GetStatusBarTexture():SetHorizTile(false)
    HealBot_NameTextCustomColourCritical:GetStatusBarTexture():SetHorizTile(false)
    HealBot_NameTextCustomColourInjured:GetStatusBarTexture():SetHorizTile(false)
    HealBot_NameTextCustomColourHealthy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_NameTextCustomColourCriticalEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_NameTextCustomColourInjuredEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_NameTextCustomColourHealthyEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_StateTextCustomColourHealthy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_StateTextCustomColourInjured:GetStatusBarTexture():SetHorizTile(false)
    HealBot_StateTextCustomColourCritical:GetStatusBarTexture():SetHorizTile(false)
    HealBot_StateTextCustomColourHealthyEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_StateTextCustomColourInjuredEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_StateTextCustomColourCriticalEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_NameTextDeadCol:GetStatusBarTexture():SetHorizTile(false)
    HealBot_StateTextDeadCol:GetStatusBarTexture():SetHorizTile(false)
    HealBot_NameTextResCol:GetStatusBarTexture():SetHorizTile(false)
    HealBot_StateTextResCol:GetStatusBarTexture():SetHorizTile(false)
    HealBot_NameTextSummonCol:GetStatusBarTexture():SetHorizTile(false)
    HealBot_StateTextSummonCol:GetStatusBarTexture():SetHorizTile(false)
    HealBot_EmergCustomColCrit:GetStatusBarTexture():SetHorizTile(false)
    HealBot_EmergCustomColInj:GetStatusBarTexture():SetHorizTile(false)
    HealBot_EmergCustomColHealthy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_AuxTextCustomColour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_ExtraOverHealCustomColour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_ExtraInHealCustomColour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_ExtraHealthCustomColour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_AuxBarCustomColour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_HealthTextCustomColourHealthy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_HealthTextCustomColourInjured:GetStatusBarTexture():SetHorizTile(false)
    HealBot_HealthTextCustomColourCritical:GetStatusBarTexture():SetHorizTile(false)
    HealBot_HealthTextCustomColourHealthyEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_HealthTextCustomColourInjuredEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_HealthTextCustomColourCriticalEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_AggroTextCustomColour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomHealthBackColourHealthy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomHealthBackColourInjured:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomHealthBackColourCritical:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomHealthBackColourHealthyEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomHealthBackColourInjuredEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomHealthBackColourCriticalEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomBorderColourHealthy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomBorderColourInjured:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomBorderColourCritical:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomBorderColourHealthyEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomBorderColourInjuredEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomBorderColourCriticalEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomIHColourHealthy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomIHColourInjured:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomIHColourCritical:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomIHColourHealthyEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomIHColourInjuredEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomIHColourCriticalEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomAbsorbColourHealthy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomAbsorbColourInjured:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomAbsorbColourCritical:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomAbsorbColourHealthyEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomAbsorbColourInjuredEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCustomAbsorbColourCriticalEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarHealthyCustomColour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarInjuredCustomColour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCriticalCustomColour:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarHealthyCustomColourEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarInjuredCustomColourEnemy:GetStatusBarTexture():SetHorizTile(false)
    HealBot_BarCriticalCustomColourEnemy:GetStatusBarTexture():SetHorizTile(false)
    local barScale=HealBot_BarCustomHealthColourHealthy:GetScale();
    HealBot_ColRoleTankpick:SetScale(barScale + 0.01);
    HealBot_ColRoleTankpick:SetScale(barScale);
    HealBot_ColRoleHealpick:SetScale(barScale + 0.01);
    HealBot_ColRoleHealpick:SetScale(barScale);
    HealBot_ColRoleDPSpick:SetScale(barScale + 0.01);
    HealBot_ColRoleDPSpick:SetScale(barScale);
    HealBot_BarCustomHealthColourHealthy:SetScale(barScale + 0.01);
    HealBot_BarCustomHealthColourHealthy:SetScale(barScale);
    HealBot_BarCustomHealthColourCritical:SetScale(barScale + 0.01);
    HealBot_BarCustomHealthColourCritical:SetScale(barScale);
    HealBot_BarCustomHealthColourInjured:SetScale(barScale + 0.01);
    HealBot_BarCustomHealthColourInjured:SetScale(barScale);
    HealBot_BarCustomHealthColourHealthyEnemy:SetScale(barScale + 0.01);
    HealBot_BarCustomHealthColourHealthyEnemy:SetScale(barScale);
    HealBot_BarCustomHealthColourCriticalEnemy:SetScale(barScale + 0.01);
    HealBot_BarCustomHealthColourCriticalEnemy:SetScale(barScale);
    HealBot_BarCustomHealthColourInjuredEnemy:SetScale(barScale + 0.01);
    HealBot_BarCustomHealthColourInjuredEnemy:SetScale(barScale);
    HealBot_NameTextCustomColourHealthy:SetScale(barScale + 0.01)
    HealBot_NameTextCustomColourHealthy:SetScale(barScale)
    HealBot_NameTextCustomColourInjured:SetScale(barScale + 0.01)
    HealBot_NameTextCustomColourInjured:SetScale(barScale)
    HealBot_NameTextCustomColourCritical:SetScale(barScale + 0.01)
    HealBot_NameTextCustomColourCritical:SetScale(barScale)
    HealBot_NameTextCustomColourHealthyEnemy:SetScale(barScale + 0.01)
    HealBot_NameTextCustomColourHealthyEnemy:SetScale(barScale)
    HealBot_NameTextCustomColourInjuredEnemy:SetScale(barScale + 0.01)
    HealBot_NameTextCustomColourInjuredEnemy:SetScale(barScale)
    HealBot_NameTextCustomColourCriticalEnemy:SetScale(barScale + 0.01)
    HealBot_NameTextCustomColourCriticalEnemy:SetScale(barScale)
    HealBot_StateTextCustomColourHealthy:SetScale(barScale + 0.01)
    HealBot_StateTextCustomColourHealthy:SetScale(barScale)
    HealBot_StateTextCustomColourInjured:SetScale(barScale + 0.01)
    HealBot_StateTextCustomColourInjured:SetScale(barScale)
    HealBot_StateTextCustomColourCritical:SetScale(barScale + 0.01)
    HealBot_StateTextCustomColourCritical:SetScale(barScale)
    HealBot_StateTextCustomColourHealthyEnemy:SetScale(barScale + 0.01)
    HealBot_StateTextCustomColourHealthyEnemy:SetScale(barScale)
    HealBot_StateTextCustomColourInjuredEnemy:SetScale(barScale + 0.01)
    HealBot_StateTextCustomColourInjuredEnemy:SetScale(barScale)
    HealBot_StateTextCustomColourCriticalEnemy:SetScale(barScale + 0.01)
    HealBot_StateTextCustomColourCriticalEnemy:SetScale(barScale)
    HealBot_NameTextDeadCol:SetScale(barScale + 0.01)
    HealBot_NameTextDeadCol:SetScale(barScale)
    HealBot_StateTextDeadCol:SetScale(barScale + 0.01)
    HealBot_StateTextDeadCol:SetScale(barScale)
    HealBot_NameTextResCol:SetScale(barScale + 0.01)
    HealBot_NameTextResCol:SetScale(barScale)
    HealBot_StateTextResCol:SetScale(barScale + 0.01)
    HealBot_StateTextResCol:SetScale(barScale)
    HealBot_NameTextSummonCol:SetScale(barScale + 0.01)
    HealBot_NameTextSummonCol:SetScale(barScale)
    HealBot_StateTextSummonCol:SetScale(barScale + 0.01)
    HealBot_StateTextSummonCol:SetScale(barScale)
    HealBot_EmergCustomColCrit:SetScale(barScale + 0.01)
    HealBot_EmergCustomColCrit:SetScale(barScale)
    HealBot_EmergCustomColInj:SetScale(barScale + 0.01)
    HealBot_EmergCustomColInj:SetScale(barScale)
    HealBot_EmergCustomColHealthy:SetScale(barScale + 0.01)
    HealBot_EmergCustomColHealthy:SetScale(barScale)
    HealBot_AuxTextCustomColour:SetScale(barScale + 0.01)
    HealBot_AuxTextCustomColour:SetScale(barScale)
    HealBot_ExtraOverHealCustomColour:SetScale(barScale + 0.01)
    HealBot_ExtraOverHealCustomColour:SetScale(barScale)
    HealBot_ExtraInHealCustomColour:SetScale(barScale + 0.01)
    HealBot_ExtraInHealCustomColour:SetScale(barScale)
    HealBot_ExtraHealthCustomColour:SetScale(barScale + 0.01)
    HealBot_ExtraHealthCustomColour:SetScale(barScale)
    HealBot_AuxBarCustomColour:SetScale(barScale + 0.01)
    HealBot_AuxBarCustomColour:SetScale(barScale)
    HealBot_HealthTextCustomColourHealthy:SetScale(barScale + 0.01)
    HealBot_HealthTextCustomColourHealthy:SetScale(barScale)
    HealBot_HealthTextCustomColourInjured:SetScale(barScale + 0.01)
    HealBot_HealthTextCustomColourInjured:SetScale(barScale)
    HealBot_HealthTextCustomColourCritical:SetScale(barScale + 0.01)
    HealBot_HealthTextCustomColourCritical:SetScale(barScale)
    HealBot_HealthTextCustomColourHealthyEnemy:SetScale(barScale + 0.01)
    HealBot_HealthTextCustomColourHealthyEnemy:SetScale(barScale)
    HealBot_HealthTextCustomColourInjuredEnemy:SetScale(barScale + 0.01)
    HealBot_HealthTextCustomColourInjuredEnemy:SetScale(barScale)
    HealBot_HealthTextCustomColourCriticalEnemy:SetScale(barScale + 0.01)
    HealBot_HealthTextCustomColourCriticalEnemy:SetScale(barScale)
    HealBot_AggroTextCustomColour:SetScale(barScale + 0.01)
    HealBot_AggroTextCustomColour:SetScale(barScale)
    HealBot_BarCustomHealthBackColourHealthy:SetScale(barScale + 0.01);
    HealBot_BarCustomHealthBackColourHealthy:SetScale(barScale);
    HealBot_BarCustomHealthBackColourInjured:SetScale(barScale + 0.01);
    HealBot_BarCustomHealthBackColourInjured:SetScale(barScale);
    HealBot_BarCustomHealthBackColourCritical:SetScale(barScale + 0.01);
    HealBot_BarCustomHealthBackColourCritical:SetScale(barScale);
    HealBot_BarCustomHealthBackColourHealthyEnemy:SetScale(barScale + 0.01);
    HealBot_BarCustomHealthBackColourHealthyEnemy:SetScale(barScale);
    HealBot_BarCustomHealthBackColourInjuredEnemy:SetScale(barScale + 0.01);
    HealBot_BarCustomHealthBackColourInjuredEnemy:SetScale(barScale);
    HealBot_BarCustomHealthBackColourCriticalEnemy:SetScale(barScale + 0.01);
    HealBot_BarCustomHealthBackColourCriticalEnemy:SetScale(barScale);
    HealBot_BarCustomBorderColourHealthy:SetScale(barScale + 0.01);
    HealBot_BarCustomBorderColourHealthy:SetScale(barScale);
    HealBot_BarCustomBorderColourInjured:SetScale(barScale + 0.01);
    HealBot_BarCustomBorderColourInjured:SetScale(barScale);
    HealBot_BarCustomBorderColourCritical:SetScale(barScale + 0.01);
    HealBot_BarCustomBorderColourCritical:SetScale(barScale);
    HealBot_BarCustomBorderColourHealthyEnemy:SetScale(barScale + 0.01);
    HealBot_BarCustomBorderColourHealthyEnemy:SetScale(barScale);
    HealBot_BarCustomBorderColourInjuredEnemy:SetScale(barScale + 0.01);
    HealBot_BarCustomBorderColourInjuredEnemy:SetScale(barScale);
    HealBot_BarCustomBorderColourCriticalEnemy:SetScale(barScale + 0.01);
    HealBot_BarCustomBorderColourCriticalEnemy:SetScale(barScale);
    HealBot_BarCustomIHColourHealthy:SetScale(barScale + 0.01);
    HealBot_BarCustomIHColourHealthy:SetScale(barScale);
    HealBot_BarCustomIHColourInjured:SetScale(barScale + 0.01);
    HealBot_BarCustomIHColourInjured:SetScale(barScale);
    HealBot_BarCustomIHColourCritical:SetScale(barScale + 0.01);
    HealBot_BarCustomIHColourCritical:SetScale(barScale);
    HealBot_BarCustomIHColourHealthyEnemy:SetScale(barScale + 0.01);
    HealBot_BarCustomIHColourHealthyEnemy:SetScale(barScale);
    HealBot_BarCustomIHColourInjuredEnemy:SetScale(barScale + 0.01);
    HealBot_BarCustomIHColourInjuredEnemy:SetScale(barScale);
    HealBot_BarCustomIHColourCriticalEnemy:SetScale(barScale + 0.01);
    HealBot_BarCustomIHColourCriticalEnemy:SetScale(barScale);
    HealBot_BarCustomAbsorbColourHealthy:SetScale(barScale + 0.01);
    HealBot_BarCustomAbsorbColourHealthy:SetScale(barScale);
    HealBot_BarCustomAbsorbColourInjured:SetScale(barScale + 0.01);
    HealBot_BarCustomAbsorbColourInjured:SetScale(barScale);
    HealBot_BarCustomAbsorbColourCritical:SetScale(barScale + 0.01);
    HealBot_BarCustomAbsorbColourCritical:SetScale(barScale);
    HealBot_BarCustomAbsorbColourHealthyEnemy:SetScale(barScale + 0.01);
    HealBot_BarCustomAbsorbColourHealthyEnemy:SetScale(barScale);
    HealBot_BarCustomAbsorbColourInjuredEnemy:SetScale(barScale + 0.01);
    HealBot_BarCustomAbsorbColourInjuredEnemy:SetScale(barScale);
    HealBot_BarCustomAbsorbColourCriticalEnemy:SetScale(barScale + 0.01);
    HealBot_BarCustomAbsorbColourCriticalEnemy:SetScale(barScale);
    HealBot_BarHealthyCustomColour:SetScale(barScale + 0.01);
    HealBot_BarHealthyCustomColour:SetScale(barScale);
    HealBot_BarInjuredCustomColour:SetScale(barScale + 0.01);
    HealBot_BarInjuredCustomColour:SetScale(barScale);
    HealBot_BarCriticalCustomColour:SetScale(barScale + 0.01);
    HealBot_BarCriticalCustomColour:SetScale(barScale);
    HealBot_BarHealthyCustomColourEnemy:SetScale(barScale + 0.01);
    HealBot_BarHealthyCustomColourEnemy:SetScale(barScale);
    HealBot_BarInjuredCustomColourEnemy:SetScale(barScale + 0.01);
    HealBot_BarInjuredCustomColourEnemy:SetScale(barScale);
    HealBot_BarCriticalCustomColourEnemy:SetScale(barScale + 0.01);
    HealBot_BarCriticalCustomColourEnemy:SetScale(barScale);
    HealBot_Media_UpdateUsedMedia("statusbar", hb_lVars["Frame"])
end

function HealBot_Options_ShowPanel(tabNo, subTabNo)
      --HealBot_setCall("HealBot_Options_ShowPanel")
    local g=nil
    HealBot_Options_PresetColours:Hide()
    HealBot_Options_NewCustomCureFrame:Hide()
    HealBot_Options_NewCustomBuffsFrame:Hide()
    
    if hb_lVars["PrevTabNo"] and hb_lVars["PrevTabNo"]~=tabNo then
        g=_G["HealBot_Options_Panel"..hb_lVars["PrevTabNo"]]
        g:Hide();
        g=_G["HealBot_Contents_ButtonT"..hb_lVars["PrevTabNo"]]
        g:SetStatusBarColor(0.2,0.2,0.2,0)
        g=_G["HealBot_Contents_ButtonT"..hb_lVars["PrevTabNo"].."Txt"]
        g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],OptionThemes[HealBot_Globals.OptionsTheme]["G"],OptionThemes[HealBot_Globals.OptionsTheme]["B"],OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    end
    if hb_lVars["subTabNo3"] then
        g=_G["HealBot_Contents_ButtonT"..hb_lVars["subTabNo3"].."Txt"]
        g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],OptionThemes[HealBot_Globals.OptionsTheme]["G"],OptionThemes[HealBot_Globals.OptionsTheme]["B"],OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    end
    if hb_lVars["subTabNo4"] then
        g=_G["HealBot_Contents_ButtonT"..hb_lVars["subTabNo4"].."Txt"]
        g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],OptionThemes[HealBot_Globals.OptionsTheme]["G"],OptionThemes[HealBot_Globals.OptionsTheme]["B"],OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    end
    if hb_lVars["subTabNo5"] then
        g=_G["HealBot_Contents_ButtonT"..hb_lVars["subTabNo5"].."Txt"]
        g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],OptionThemes[HealBot_Globals.OptionsTheme]["G"],OptionThemes[HealBot_Globals.OptionsTheme]["B"],OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    end
    if hb_lVars["subTabNo9"] then
        g=_G["HealBot_Contents_ButtonT"..hb_lVars["subTabNo9"].."Txt"]
        g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],OptionThemes[HealBot_Globals.OptionsTheme]["G"],OptionThemes[HealBot_Globals.OptionsTheme]["B"],OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    end
    if tabNo == 3 and not subTabNo and not hb_lVars["subTabNo3"] then subTabNo=301 end
    if tabNo == 4 and not subTabNo and not hb_lVars["subTabNo4"] then subTabNo=41 end
    if tabNo == 5 and not subTabNo and not hb_lVars["subTabNo5"] then subTabNo=51 end
    hb_lVars["TabNo"]=tabNo;

    if subTabNo then
        if tabNo == 3 then
            hb_lVars["subTabNo3"]=subTabNo
        elseif tabNo == 4 then
            hb_lVars["subTabNo4"]=subTabNo
        elseif tabNo == 5 then
            hb_lVars["subTabNo5"]=subTabNo
        elseif tabNo == 9 then
            hb_lVars["subTabNo9"]=subTabNo
        end
        if subTabNo>50 and subTabNo<54 then
            HealBot_Options_MonitorBuffsWhenGrouped:Show()
            HealBot_Options_MonitorBuffsWhenMounted:Show()
            HealBot_Options_MonitorBuffsInCombat:Show()
            HealBot_Options_MonitorCustomBuffsInCombat:Show()
            if subTabNo == 51 and HealBot_Data["PCLASSTRIM"] and HealBot_Data["PCLASSTRIM"] == hbv_GetClass("En", HEALBOT_PALADIN) and HEALBOT_GAME_VERSION<4 then
                HealBot_Options_MonitorBuffsPalaBlessing:Show()
            else
                HealBot_Options_MonitorBuffsPalaBlessing:Hide()
            end
        end
    end;

    g=_G["HealBot_Options_Panel"..tabNo]
    g:Show();
    g=_G["HealBot_Contents_ButtonT"..tabNo]
    g:SetStatusBarColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],
                        OptionThemes[HealBot_Globals.OptionsTheme]["G"],
                        OptionThemes[HealBot_Globals.OptionsTheme]["B"],
                        OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    g=_G["HealBot_Contents_ButtonT"..tabNo.."Txt"]
    g:SetTextColor(1,1,1,1)

    if tabNo == 3 and hb_lVars["subTabNo3"]>308 and hb_lVars["subTabNo3"]<399 then
        g=_G["HealBot_Contents_ButtonT308Txt"]
        g:SetTextColor(1,1,1,1)
    else
        g=_G["HealBot_Contents_ButtonT308Txt"]
        g:SetTextColor(OptionThemes[HealBot_Globals.OptionsTheme]["R"],OptionThemes[HealBot_Globals.OptionsTheme]["G"],OptionThemes[HealBot_Globals.OptionsTheme]["B"],OptionThemes[HealBot_Globals.OptionsTheme]["A"])
    end
    hb_lVars["PrevTabNo"]=tabNo;
    if subTabNo then
        g=_G["HealBot_Contents_ButtonT"..subTabNo.."Txt"]
        g:SetTextColor(1,1,1,1)
    elseif tabNo == 3 then
        if hb_lVars["subTabNo3"] then
            g=_G["HealBot_Contents_ButtonT"..hb_lVars["subTabNo3"].."Txt"]
            g:SetTextColor(1,1,1,1)
        else
            g=_G["HealBot_Contents_ButtonT301Txt"]
            g:SetTextColor(1,1,1,1)
        end
    elseif tabNo == 4 then
        if hb_lVars["subTabNo4"] then
            g=_G["HealBot_Contents_ButtonT"..hb_lVars["subTabNo4"].."Txt"]
            g:SetTextColor(1,1,1,1)
            if hb_lVars["subTabNo4"] == 42 then
                HealBot_Options_ShowCurePanel("HealBot_Options_CustomCureFrame")
            end
        else
            g=_G["HealBot_Contents_ButtonT41Txt"]
            g:SetTextColor(1,1,1,1)
        end
    elseif tabNo == 5 then
        if hb_lVars["subTabNo5"] then
            g=_G["HealBot_Contents_ButtonT"..hb_lVars["subTabNo5"].."Txt"]
            g:SetTextColor(1,1,1,1)
            if hb_lVars["subTabNo5"] == 52 then
                HealBot_Options_ShowBuffPanel("HealBot_Options_BuffIconFrame")
            end
        else
            g=_G["HealBot_Contents_ButtonT51Txt"]
            g:SetTextColor(1,1,1,1)
        end
    end
    hb_lVars["PanelShown"]=true
end

hb_lVars["CurrentOverridePanel"]="HealBot_Options_Override_EffectsFrame"
hb_lVars["CurrentOverridePanelButton"]="HealBot_Options_OverrideEffectb"
function HealBot_Options_ShowOverridePanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowOverridePanel")
    HealBot_Options_UpdateTab(nil, nil, "Overrides", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentOverridePanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentOverridePanelButton"]],
                                        _G[hb_lVars["CurrentOverridePanelButton"].."Txt"],false)
    hb_lVars["CurrentOverridePanel"]=frameName
    hb_lVars["CurrentOverridePanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentOverridePanelButton"]],
                                        _G[hb_lVars["CurrentOverridePanelButton"].."Txt"],true)
end

hb_lVars["CurrentTipsPanel"]="HealBot_Options_TipsGeneralFrame"
hb_lVars["CurrentTipsPanelButton"]="HealBot_Options_TipsGeneralb"
function HealBot_Options_ShowTipsPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowTipsPanel")
    HealBot_Options_UpdateTab(nil, nil, "Tips", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentTipsPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentTipsPanelButton"]],
                                        _G[hb_lVars["CurrentTipsPanelButton"].."Txt"],false)
    hb_lVars["CurrentTipsPanel"]=frameName
    hb_lVars["CurrentTipsPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentTipsPanelButton"]],
                                        _G[hb_lVars["CurrentTipsPanelButton"].."Txt"],true)
end

hb_lVars["CurrentInOutPanel"]="HealBot_Options_InOut_SkinFrame"
hb_lVars["CurrentInOutPanelButton"]="HealBot_Options_InOutSkinb"
function HealBot_Options_ShowInOutPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowInOutPanel")
    HealBot_Options_UpdateTab(nil, nil, "ImportExport", true, tab)
    if hb_lVars["CurrentInOutPanel"]~=frameName then
        HealBot_Options_ExtraSkins_Image(false)
        HealBot_Share_ClosePostLink()
        HealBot_Options_ObjectsShowHide(hb_lVars["CurrentInOutPanel"],false)
        HealBot_Options_ObjectsShowHide(frameName,true)
        HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentInOutPanelButton"]],
                                            _G[hb_lVars["CurrentInOutPanelButton"].."Txt"],false)
        hb_lVars["CurrentInOutPanel"]=frameName
        hb_lVars["CurrentInOutPanelButton"]=buttonName
        HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentInOutPanelButton"]],
                                            _G[hb_lVars["CurrentInOutPanelButton"].."Txt"],true)
    end
end

hb_lVars["CurrentBuffsGeneralPanel"]="HealBot_Options_BuffsPanelGeneralBuffs"
hb_lVars["CurrentBuffsGeneralPanelButton"]="HealBot_Options_BuffsPanelGeneralBuffsb"
function HealBot_Options_BuffsGeneralPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_BuffsGeneralPanel")
    HealBot_Options_UpdateTab(nil, nil, "BuffsGeneral", true, tab)
    if frameName == "HealBot_Options_BuffsPanelGeneralBuffs" then
        HealBot_Options_ObjectsShowHide("HealBot_Options_BuffsPanelTimers",true)
    else
        HealBot_Options_ObjectsShowHide("HealBot_Options_BuffsPanelTimers",false)
    end
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentBuffsGeneralPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentBuffsGeneralPanelButton"]],
                                        _G[hb_lVars["CurrentBuffsGeneralPanelButton"].."Txt"],false)
    hb_lVars["CurrentBuffsGeneralPanel"]=frameName
    hb_lVars["CurrentBuffsGeneralPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentBuffsGeneralPanelButton"]],
                                        _G[hb_lVars["CurrentBuffsGeneralPanelButton"].."Txt"],true)
end

function HealBot_Options_CopyFramesSelect(All)
      --HealBot_setCall("HealBot_Options_CopyFramesSelect")
    local g
    for x=1,9 do
        g=_G["HealBot_Options_CopyFrame"..x]
        g:SetChecked(All)
    end
end

function HealBot_Options_CopyTabsSelect(All)
      --HealBot_setCall("HealBot_Options_CopyTabsSelect")
    local g
    for x=1,25 do
        g=_G["HealBot_Options_CopyTab"..x]
        g:SetChecked(All)
    end
end

function HealBot_Options_InitCopyTabs()
      --HealBot_setCall("HealBot_Options_InitCopyTabs")
    HealBot_Options_CopyTabsSelect(false)
    HealBot_Options_CopyFramesSelect(false)
    local g
    if hbCurSkinSubFrameID == 1008 then
        g=_G["HealBot_Options_CopyTab1"]
    elseif hbCurSkinSubFrameID == 1010 then
        if hb_lVars["CurrentSkinsHeaderPanel"] == "HealBot_Options_SkinsFrameHeadersBar" then
            g=_G["HealBot_Options_CopyTab2"]
        else
            g=_G["HealBot_Options_CopyTab3"]
        end
    elseif hbCurSkinSubFrameID == 1011 then
        if hb_lVars["CurrentSkinsBarsPanel"] == "HealBot_Options_SkinsFramesBarsGeneral" then
            g=_G["HealBot_Options_CopyTab4"]
        elseif hb_lVars["CurrentSkinsBarsPanel"] == "HealBot_Options_SkinsFramesBarsColours" then
            g=_G["HealBot_Options_CopyTab5"]
        elseif hb_lVars["CurrentSkinsBarsPanel"] == "HealBot_Options_SkinsFramesBarsSort" then
            g=_G["HealBot_Options_CopyTab6"]
        elseif hb_lVars["CurrentSkinsBarsPanel"] == "HealBot_Options_SkinsFramesBarsVisibility" then
            g=_G["HealBot_Options_CopyTab7"]
        elseif hb_lVars["CurrentSkinsBarsPanel"] == "HealBot_Options_SkinsFramesBarsAggro" then
            g=_G["HealBot_Options_CopyTab8"]
        elseif hb_lVars["CurrentSkinsBarsPanel"] == "HealBot_Options_SkinsFramesBarsAux" then
            g=_G["HealBot_Options_CopyTab9"]
        end
    elseif hbCurSkinSubFrameID == 1013 then
        if hb_lVars["CurrentSkinsTextPanel"] == "HealBot_Options_SkinsFrameTextState" then
            g=_G["HealBot_Options_CopyTab23"]
        elseif hb_lVars["CurrentSkinsTextPanel"] == "HealBot_Options_SkinsFrameTextName" then
            g=_G["HealBot_Options_CopyTab10"]
        elseif hb_lVars["CurrentSkinsTextPanel"] == "HealBot_Options_SkinsFrameTextHealth" then
            g=_G["HealBot_Options_CopyTab11"]
        elseif hb_lVars["CurrentSkinsTextPanel"] == "HealBot_Options_SkinsFrameTextAggro" then
            g=_G["HealBot_Options_CopyTab12"]
        elseif hb_lVars["CurrentSkinsTextPanel"] == "HealBot_Options_SkinsFrameTextAux" then
            g=_G["HealBot_Options_CopyTab13"]
        end
    elseif hbCurSkinSubFrameID == 1014 then
        if hb_lVars["CurrentSkinsIconsPanel"] == "HealBot_Options_SkinsFrameIconsDebuff" then
            g=_G["HealBot_Options_CopyTab14"]
        elseif hb_lVars["CurrentSkinsIconsPanel"] == "HealBot_Options_SkinsFrameIconsBuff" then
            g=_G["HealBot_Options_CopyTab15"]
        elseif hb_lVars["CurrentSkinsIconsPanel"] == "HealBot_Options_SkinsFrameIconsExtra" then
            g=_G["HealBot_Options_CopyTab16"]
        end
    elseif hbCurSkinSubFrameID == 1016 then
        if hb_lVars["CurrentSkinsIndicatorsPanel"] == "HealBot_Options_SkinsFrameIndicatorsAggro" then
            g=_G["HealBot_Options_CopyTab17"]
        elseif hb_lVars["CurrentSkinsIndicatorsPanel"] == "HealBot_Options_SkinsFrameIndicatorsLowMana" then
            g=_G["HealBot_Options_CopyTab18"]
        elseif hb_lVars["CurrentSkinsIndicatorsPanel"] == "HealBot_Options_SkinsFrameIndicatorsSelfCast" then
            g=_G["HealBot_Options_CopyTab22"]
        elseif hb_lVars["CurrentSkinsIndicatorsPanel"] == "HealBot_Options_SkinsFrameIndicatorsPower" then
            g=_G["HealBot_Options_CopyTab19"]
        end
    elseif hbCurSkinSubFrameID == 1017 then
        if hb_lVars["CurrentSkinsEmergencyPanel"] == "HealBot_Options_SkinsFrameEmergGeneral" then
            g=_G["HealBot_Options_CopyTab20"]
        elseif hb_lVars["CurrentSkinsEmergencyPanel"] == "HealBot_Options_SkinsFrameEmergencyColour" then
            g=_G["HealBot_Options_CopyTab21"]
        end
    end
    g:SetChecked(true)

    local i=0
    for x=1,10 do
        if x~=hb_lVars["Frame"] then
            i=i+1
            g=_G["HealBot_Options_CopyFrame"..i]
            HealBot_Options_SetText(g,HealBot_Options_HealGroupsFrame_List[x])
            hbCopyFrameIdx[i]=x
        end
    end
end

hb_lVars["CurrentSkinsPanel"]="HealBot_Options_GeneralSkinsFrame"
hb_lVars["SkinsPanelCopyBackName"]=false
function HealBot_Options_ShowSkinsPanel(frameName, hbFrameID)
      --HealBot_setCall("HealBot_Options_ShowSkinsPanel")
    if hb_lVars["SkinsPanelCopyBackName"] and frameName == "BACK" then
        frameName=hb_lVars["SkinsPanelCopyBackName"]
        hbFrameID=hb_lVars["SkinsPanelCopyBackID"]
        hb_lVars["SkinsPanelCopyBackName"]=false
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_DeleteSkin",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_NewSkin",true)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_NewSkinb",true)
        HealBot_Options_SelectSkin:Show()
        HealBot_Options_SelectSkinDisabled:Hide()
    elseif hbFrameID == 1000 then
        hb_lVars["SkinsPanelCopyBackName"]=hb_lVars["CurrentSkinsPanel"]
        hb_lVars["SkinsPanelCopyBackID"]=hbCurSkinSubFrameID
        HealBot_Options_InitCopyTabs()
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_DeleteSkin",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_NewSkin",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_NewSkinb",false)
        HealBot_Options_ObjectsEnableDisable("HealBot_Options_SelectSkinDisabled",false)
        HealBot_Options_SelectSkinDisabled:SetText(Healbot_Config_Skins.Current_Skin)
        HealBot_Options_SelectSkin:Hide()
        HealBot_Options_SelectSkinDisabled:Show()
    end
    hbCurSkinSubFrameID=hbFrameID
    local g=_G[hb_lVars["CurrentSkinsPanel"]]
    g:Hide()
    g=_G[frameName]
    g:Show()
    hb_lVars["CurrentSkinsPanel"]=frameName
    HealBot_Options_SetSkins()
    g=_G["HealBot_Options_FramesSelFrame"]
    if hbCurSkinSubFrameID == 1008 or hbCurSkinSubFrameID>1009 then
        g:Show()
        g=_G["HealBot_Options_ApplyTab2Frames"]
        if hbCurSkinSubFrameID ~= 1015 then
            g:Show()
        else
            g:Hide()
        end
        g=_G["HealBot_Options_SkinURL"]
        g:Hide()
        g=_G["HealBot_Options_CopyTabsCurrentFrame"]
        g:Hide()
            g=_G["HealBot_Options_CopyTabsCurrentFrameName"]
            g:Hide()
    else
        g:Hide()
        g=_G["HealBot_Options_ApplyTab2Frames"]
        g:Hide()
        if hbFrameID == 1000 then
            g=_G["HealBot_Options_SkinURL"]
            g:Hide()
            g=_G["HealBot_Options_CopyTabsCurrentFrame"]
            g:Show()
            g=_G["HealBot_Options_CopyTabsCurrentFrameName"]
            g:SetText(HealBot_Options_HealGroupsFrame_List[hb_lVars["Frame"]])
        else
            g=_G["HealBot_Options_CopyTabsCurrentFrame"]
            g:Hide()
            g=_G["HealBot_Options_CopyTabsCurrentFrameName"]
            g:Hide()
            g=_G["HealBot_Options_SkinURL"]
        end
        g:Show()
    end
end

hb_lVars["CurrentCurePanel"]="HealBot_Options_CureDispelCleanse"
function HealBot_Options_ShowCurePanel(frameName)
      --HealBot_setCall("HealBot_Options_ShowCurePanel")
    local g=_G[hb_lVars["CurrentCurePanel"]]
    g:Hide()
    g=_G[frameName]
    g:Show()
    hb_lVars["CurrentCurePanel"]=frameName
end

hb_lVars["CurrentBuffPanel"]="HealBot_Options_BuffsPanel"
function HealBot_Options_ShowBuffPanel(frameName)
      --HealBot_setCall("HealBot_Options_ShowBuffPanel")
    local g=_G[hb_lVars["CurrentBuffPanel"]]
    g:Hide()
    g=_G[frameName]
    g:Show()
    hb_lVars["CurrentBuffPanel"]=frameName
end

hb_lVars["CurrentOverrideEffectsPanel"]="HealBot_Options_OverrideEffectBorder"
hb_lVars["CurrentOverrideEffectsPanelButton"]="HealBot_Options_OverrideEffectBorderb"
function HealBot_Options_ShowOverrideEffectsPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowOverrideEffectsPanel")
    HealBot_Options_UpdateTab(nil, nil, "Overrides", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentOverrideEffectsPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentOverrideEffectsPanelButton"]],
                                        _G[hb_lVars["CurrentOverrideEffectsPanelButton"].."Txt"],false)
    hb_lVars["CurrentOverrideEffectsPanel"]=frameName
    hb_lVars["CurrentOverrideEffectsPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentOverrideEffectsPanelButton"]],
                                        _G[hb_lVars["CurrentOverrideEffectsPanelButton"].."Txt"],true)
end

hb_lVars["CurrentEffectsPanel"]="HealBot_Options_EffectBorder"
hb_lVars["CurrentEffectsPanelButton"]="HealBot_Options_EffectBorderb"
function HealBot_Options_ShowEffectsPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowEffectsPanel")
    HealBot_Options_UpdateTab(nil, nil, "SkinsEffects", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentEffectsPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentEffectsPanelButton"]],
                                        _G[hb_lVars["CurrentEffectsPanelButton"].."Txt"],false)
    hb_lVars["CurrentEffectsPanel"]=frameName
    hb_lVars["CurrentEffectsPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentEffectsPanelButton"]],
                                        _G[hb_lVars["CurrentEffectsPanelButton"].."Txt"],true)
end

hb_lVars["CurrentOverrideColourPanel"]="HealBot_Options_OverrideColoursClass"
hb_lVars["CurrentOverrideColourPanelButton"]="HealBot_Options_OverrideColoursClassb"
function HealBot_Options_ShowOverrideColourPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowOverrideColourPanel")
    HealBot_Options_UpdateTab(nil, nil, "Overrides", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentOverrideColourPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentOverrideColourPanelButton"]],
                                        _G[hb_lVars["CurrentOverrideColourPanelButton"].."Txt"],false)
    hb_lVars["CurrentOverrideColourPanel"]=frameName
    hb_lVars["CurrentOverrideColourPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentOverrideColourPanelButton"]],
                                        _G[hb_lVars["CurrentOverrideColourPanelButton"].."Txt"],true)
end

hb_lVars["CurrentSkinsColourPanel"]="HealBot_Options_SkinsColoursClass"
hb_lVars["CurrentSkinsColourPanelButton"]="HealBot_Options_SkinsColoursClassb"
function HealBot_Options_ShowColourPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowColourPanel")
    HealBot_Options_UpdateTab(nil, nil, "SkinsColour", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsColourPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsColourPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsColourPanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsColourPanel"]=frameName
    hb_lVars["CurrentSkinsColourPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsColourPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsColourPanelButton"].."Txt"],true)
end

hb_lVars["CurrentSkinsEnemyPanel"]="HealBot_Options_EnemySkinsFrameAura"
hb_lVars["CurrentSkinsEnemyPanelButton"]="HealBot_Options_EnemySkinsFrameAurab"
function HealBot_Options_ShowEnemyPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowHeaderPanel")
    HealBot_Options_UpdateTab(nil, nil, "SkinsFramesEnemy", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsEnemyPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsEnemyPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsEnemyPanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsEnemyPanel"]=frameName
    hb_lVars["CurrentSkinsEnemyPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsEnemyPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsEnemyPanelButton"].."Txt"],true)
end

hb_lVars["CurrentSkinsHeaderPanel"]="HealBot_Options_SkinsFrameHeadersBar"
hb_lVars["CurrentSkinsHeaderPanelButton"]="HealBot_Options_SkinsFrameHeadersBarb"
function HealBot_Options_ShowHeaderPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowHeaderPanel")
    HealBot_Options_UpdateTab(nil, nil, "SkinsFramesHeaders", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsHeaderPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsHeaderPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsHeaderPanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsHeaderPanel"]=frameName
    hb_lVars["CurrentSkinsHeaderPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsHeaderPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsHeaderPanelButton"].."Txt"],true)
end

hb_lVars["CurrentSkinsTextPanel"]="HealBot_Options_SkinsFrameTextName"
hb_lVars["CurrentSkinsTextPanelButton"]="HealBot_Options_SkinsFrameTextNameb"
function HealBot_Options_ShowTextPanel(frameName, buttonName, tab, isParent)
      --HealBot_setCall("HealBot_Options_ShowTextPanel")
    if isParent then tab=HealBot_Options_SubTabs[tab] end
    HealBot_Options_UpdateTab(nil, nil, "SkinsFramesText", true, tab)

    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsTextPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsTextPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsTextPanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsTextPanel"]=frameName
    hb_lVars["CurrentSkinsTextPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsTextPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsTextPanelButton"].."Txt"],true)

    if frameName == "HealBot_Options_SkinsFrameTextName" then
        HealBot_Options_ShowTextNamePanel(hb_lVars["CurrentSkinsTextNamePanel"], hb_lVars["CurrentSkinsTextNamePanelButton"], HealBot_Options_SubTabs["SkinsFramesTextName"])
    elseif frameName == "HealBot_Options_SkinsFrameTextHealth" then
        HealBot_Options_ShowTextHealthPanel(hb_lVars["CurrentSkinsTextHealthPanel"], hb_lVars["CurrentSkinsTextHealthPanelButton"], HealBot_Options_SubTabs["SkinsFramesTextHealth"])
    elseif frameName == "HealBot_Options_SkinsFrameTextState" then
        HealBot_Options_ShowTextStatePanel(hb_lVars["CurrentSkinsTextStatePanel"], hb_lVars["CurrentSkinsTextStatePanelButton"], HealBot_Options_SubTabs["SkinsFramesTextState"])
    elseif frameName == "HealBot_Options_SkinsFrameTextAggro" then
        HealBot_Options_ShowTextAggroPanel(hb_lVars["CurrentSkinsTextAggroPanel"], hb_lVars["CurrentSkinsTextAggroPanelButton"], HealBot_Options_SubTabs["SkinsFramesTextAggro"])
    end
    HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesTextColoursCustom",false)
end

hb_lVars["CurrentSkinsTextStatePanel"]="HealBot_Options_SkinsFrameTextStateText"
hb_lVars["CurrentSkinsTextStatePanelButton"]="HealBot_Options_SkinsFrameTextStateTextb"
function HealBot_Options_ShowTextStatePanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowTextStatePanel")
    HealBot_Options_SubTabs["SkinsFramesTextState"]=tab
    HealBot_Options_UpdateTab(nil, nil, "SkinsFramesText", true, tab)
    HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesTextColoursCustom",false)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsTextStatePanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsTextStatePanelButton"]],
                                        _G[hb_lVars["CurrentSkinsTextStatePanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsTextStatePanel"]=frameName
    hb_lVars["CurrentSkinsTextStatePanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsTextStatePanelButton"]],
                                        _G[hb_lVars["CurrentSkinsTextStatePanelButton"].."Txt"],true)
end

hb_lVars["CurrentSkinsTextNamePanel"]="HealBot_Options_SkinsFrameTextNameText"
hb_lVars["CurrentSkinsTextNamePanelButton"]="HealBot_Options_SkinsFrameTextNameTextb"
function HealBot_Options_ShowTextNamePanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowTextNamePanel")
    HealBot_Options_SubTabs["SkinsFramesTextName"]=tab
    HealBot_Options_UpdateTab(nil, nil, "SkinsFramesText", true, tab)
    HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesTextColoursCustom",false)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsTextNamePanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsTextNamePanelButton"]],
                                        _G[hb_lVars["CurrentSkinsTextNamePanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsTextNamePanel"]=frameName
    hb_lVars["CurrentSkinsTextNamePanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsTextNamePanelButton"]],
                                        _G[hb_lVars["CurrentSkinsTextNamePanelButton"].."Txt"],true)
end

hb_lVars["CurrentSkinsTextHealthPanel"]="HealBot_Options_SkinsFrameTextHealthText"
hb_lVars["CurrentSkinsTextHealthPanelButton"]="HealBot_Options_SkinsFrameTextHealthTextb"
function HealBot_Options_ShowTextHealthPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowTextHealthPanel")
    HealBot_Options_SubTabs["SkinsFramesTextHealth"]=tab
    HealBot_Options_UpdateTab(nil, nil, "SkinsFramesText", true, tab)
    HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesTextColoursCustom",false)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsTextHealthPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsTextHealthPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsTextHealthPanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsTextHealthPanel"]=frameName
    hb_lVars["CurrentSkinsTextHealthPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsTextHealthPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsTextHealthPanelButton"].."Txt"],true)
end

hb_lVars["CurrentSkinsTextAggroPanel"]="HealBot_Options_SkinsFrameTextAggroText"
hb_lVars["CurrentSkinsTextAggroPanelButton"]="HealBot_Options_SkinsFrameTextAggroTextb"
function HealBot_Options_ShowTextAggroPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowTextAggroPanel")
    HealBot_Options_SubTabs["SkinsFramesTextAggro"]=tab
    HealBot_Options_UpdateTab(nil, nil, "SkinsFramesText", true, tab)
    HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesTextColoursCustom",false)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsTextAggroPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsTextAggroPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsTextAggroPanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsTextAggroPanel"]=frameName
    hb_lVars["CurrentSkinsTextAggroPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsTextAggroPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsTextAggroPanelButton"].."Txt"],true)
end

hb_lVars["CurrentSkinsTextAuxPanel"]="HealBot_Options_SkinsFrameTextAuxText"
hb_lVars["CurrentSkinsTextAuxPanelButton"]="HealBot_Options_SkinsFrameTextAuxTextb"
function HealBot_Options_ShowTextAuxPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowTextAuxPanel")
    HealBot_Options_SubTabs["SkinsFramesTextAux"]=tab
    HealBot_Options_UpdateTab(nil, nil, "SkinsFramesText", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsTextAuxPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsTextAuxPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsTextAuxPanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsTextAuxPanel"]=frameName
    hb_lVars["CurrentSkinsTextAuxPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsTextAuxPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsTextAuxPanelButton"].."Txt"],true)
end

hb_lVars["CurrentSkinsIconsPanel"]="HealBot_Options_SkinsFrameIconsDebuff"
hb_lVars["CurrentSkinsIconsPanelButton"]="HealBot_Options_SkinsFrameIconsDebuffb"
function HealBot_Options_ShowIconPanel(frameName, buttonName, tab, isParent)
      --HealBot_setCall("HealBot_Options_ShowIconPanel")
    if isParent then tab=HealBot_Options_SubTabs[tab] end
    HealBot_Options_UpdateTab(nil, nil, "SkinsFramesIcons", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsIconsPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsIconsPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsIconsPanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsIconsPanel"]=frameName
    hb_lVars["CurrentSkinsIconsPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsIconsPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsIconsPanelButton"].."Txt"],true)
end

hb_lVars["CurrentSkinsActionIconsPanel"]="HealBot_Options_SkinsFrameActionIconsGeneral"
hb_lVars["CurrentSkinsActionIconsPanelButton"]="HealBot_Options_SkinsFrameActionIconsGeneralb"
function HealBot_Options_ShowActionIconsPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowActionIconsPanel")
    HealBot_Options_UpdateTab(nil, nil, "SkinsFramesActionIcons", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsActionIconsPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsActionIconsPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsActionIconsPanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsActionIconsPanel"]=frameName
    hb_lVars["CurrentSkinsActionIconsPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsActionIconsPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsActionIconsPanelButton"].."Txt"],true)
end


hb_lVars["CurrentSkinsActionIconsTextPanel"]="HealBot_Options_SkinsActionIconsTextCD"
hb_lVars["CurrentSkinsActionIconsTextPanelButton"]="HealBot_Options_SkinsActionIconsTextCDb"
function HealBot_Options_ShowActionIconsTextPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowActionIconsTextPanel")
    HealBot_Options_SubTabs["ShowActionIconsText"]=tab
    HealBot_Options_UpdateTab(nil, nil, "SkinsFramesActionIcons", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsActionIconsTextPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsActionIconsTextPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsActionIconsTextPanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsActionIconsTextPanel"]=frameName
    hb_lVars["CurrentSkinsActionIconsTextPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsActionIconsTextPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsActionIconsTextPanelButton"].."Txt"],true)
end


hb_lVars["CurrentSkinsIndicatorsPanel"]="HealBot_Options_SkinsFrameIndicatorsAggro"
hb_lVars["CurrentSkinsIndicatorsPanelButton"]="HealBot_Options_SkinsFrameIndicatorsAggrob"
function HealBot_Options_ShowIndicatorsPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowIndicatorsPanel")
    HealBot_Options_UpdateTab(nil, nil, "SkinsFramesIndicators", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsIndicatorsPanel"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsIndicatorsPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsIndicatorsPanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsIndicatorsPanel"]=frameName
    hb_lVars["CurrentSkinsIndicatorsPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsIndicatorsPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsIndicatorsPanelButton"].."Txt"],true)
    if hb_lVars["Frame"] == 10 then
        HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesIndicatorsTabNotAvail",true)
    else
        HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsIndicatorsPanel"],true)
        HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesIndicatorsTabNotAvail",false)
    end
end

hb_lVars["CurrentSkinsEmergencyPanel"]="HealBot_Options_SkinsFrameEmergGeneral"
hb_lVars["CurrentSkinsEmergencyPanelButton"]="HealBot_Options_SkinsFrameEmergGeneralb"
function HealBot_Options_ShowEmergencyPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowEmergencyPanel")
    HealBot_Options_UpdateTab(nil, nil, "SkinsFramesEmergency", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsEmergencyPanel"],false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsEmergencyPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsEmergencyPanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsEmergencyPanel"]=frameName
    hb_lVars["CurrentSkinsEmergencyPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsEmergencyPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsEmergencyPanelButton"].."Txt"],true)
    if hb_lVars["Frame"] == 10 then
        HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesEmergencyTabNotAvail",true)
    else
        HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsEmergencyPanel"],true)
        HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesEmergencyTabNotAvail",false)
    end
end

hb_lVars["CurrentSkinsIconsDebuffPanel"]="HealBot_Options_SkinsFrameIconsDebuffGeneral"
hb_lVars["CurrentSkinsIconsDebuffPanelButton"]="HealBot_Options_SkinsFrameIconsDebuffGeneralb"
function HealBot_Options_ShowIconDebuffPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowIconDebuffPanel")
    HealBot_Options_SubTabs["SkinsFramesIconsDebuffs"]=tab
    HealBot_Options_UpdateTab(nil, nil, "SkinsFramesIcons", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsIconsDebuffPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsIconsDebuffPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsIconsDebuffPanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsIconsDebuffPanel"]=frameName
    hb_lVars["CurrentSkinsIconsDebuffPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsIconsDebuffPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsIconsDebuffPanelButton"].."Txt"],true)
end

hb_lVars["CurrentSkinsIconsBuffPanel"]="HealBot_Options_SkinsFrameIconsBuffGeneral"
hb_lVars["CurrentSkinsIconsBuffPanelButton"]="HealBot_Options_SkinsFrameIconsBuffGeneralb"
function HealBot_Options_ShowIconBuffPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowIconBuffPanel")
    HealBot_Options_SubTabs["SkinsFramesIconsBuffs"]=tab
    HealBot_Options_UpdateTab(nil, nil, "SkinsFramesIcons", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsIconsBuffPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsIconsBuffPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsIconsBuffPanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsIconsBuffPanel"]=frameName
    hb_lVars["CurrentSkinsIconsBuffPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsIconsBuffPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsIconsBuffPanelButton"].."Txt"],true)
end

hb_lVars["CurrentSkinsIconsExtraPanel"]="HealBot_Options_SkinsFrameIconsExtraClass"
hb_lVars["CurrentSkinsIconsExtraPanelButton"]="HealBot_Options_SkinsFrameIconsExtraClassb"
function HealBot_Options_ShowIconExtraPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowIconExtraPanel")
    HealBot_Options_SubTabs["SkinsFramesIconsExtras"]=tab
    HealBot_Options_UpdateTab(nil, nil, "SkinsFramesIcons", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsIconsExtraPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsIconsExtraPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsIconsExtraPanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsIconsExtraPanel"]=frameName
    hb_lVars["CurrentSkinsIconsExtraPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsIconsExtraPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsIconsExtraPanelButton"].."Txt"],true)
end

hb_lVars["CurrentSkinsBarsPanel"]="HealBot_Options_SkinsFramesBarsGeneral"
hb_lVars["CurrentSkinsBarsPanelButton"]="HealBot_Options_SkinsFramesBarsGeneralb"
function HealBot_Options_ShowBarsPanel(frameName, buttonName, tab, isParent)
      --HealBot_setCall("HealBot_Options_ShowBarsPanel")
    if isParent then tab=HealBot_Options_SubTabs[tab] end
    HealBot_Options_UpdateTab(nil, nil, "SkinsFramesBars", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsBarsPanel"],false)
    HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesBarsColoursCustom",false)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsBarsPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsBarsPanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsBarsPanel"]=frameName
    hb_lVars["CurrentSkinsBarsPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsBarsPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsBarsPanelButton"].."Txt"],true)
    if hb_lVars["CurrentSkinsBarsPanel"] == "HealBot_Options_SkinsFramesBarsSort" then
        if hb_lVars["Frame"]>7 and hb_lVars["Frame"]<10 then
            HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesBarsTabNotAvail",true)
        else
            HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsBarsPanel"],true)
            HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesBarsTabNotAvail",false)
        end
    elseif hb_lVars["CurrentSkinsBarsPanel"] == "HealBot_Options_SkinsFramesBarsAggro" then
        if hb_lVars["Frame"] == 10 then
            HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesBarsTabNotAvail",true)
        else
            HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsBarsPanel"],true)
            HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesBarsTabNotAvail",false)
        end
    else
        HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsBarsPanel"],true)
        HealBot_Options_ObjectsShowHide("HealBot_Options_SkinsFramesBarsTabNotAvail",false)
    end
end

hb_lVars["CurrentSkinsBarsAuxPanel"]="HealBot_Options_SkinsFramesBarsAuxAssign"
hb_lVars["CurrentSkinsBarsAuxPanelButton"]="HealBot_Options_SkinsFramesBarsAuxAssignb"
function HealBot_Options_ShowBarsAuxPanel(frameName, buttonName, tab)
      --HealBot_setCall("HealBot_Options_ShowBarsAuxPanel")
    HealBot_Options_SubTabs["SkinsFramesBarsAux"]=tab
    HealBot_Options_UpdateTab(nil, nil, "SkinsFramesBars", true, tab)
    HealBot_Options_ObjectsShowHide(hb_lVars["CurrentSkinsBarsAuxPanel"],false)
    HealBot_Options_ObjectsShowHide(frameName,true)
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsBarsAuxPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsBarsAuxPanelButton"].."Txt"],false)
    hb_lVars["CurrentSkinsBarsAuxPanel"]=frameName
    hb_lVars["CurrentSkinsBarsAuxPanelButton"]=buttonName
    HealBot_Options_InnerContent_Colour(_G[hb_lVars["CurrentSkinsBarsAuxPanelButton"]],
                                        _G[hb_lVars["CurrentSkinsBarsAuxPanelButton"].."Txt"],true)
end

function HealBot_Options_OnMouseDown(self)
      --HealBot_setCall("HealBot_Options_OnMouseDown")
    HealBot_StartMoving(self);
end

function HealBot_Options_OnMouseUp(self)
      --HealBot_setCall("HealBot_Options_OnMouseUp")
    HealBot_StopMoving(self);
end

function HealBot_Options_OnDragStart(self)
      --HealBot_setCall("HealBot_Options_OnDragStart")
    HealBot_StartMoving(self);
end

function HealBot_Options_OnDragStop(self)
      --HealBot_setCall("HealBot_Options_OnDragStop")
    HealBot_StopMoving(self);
end

local hbBlizzEvents={
    "CHARACTER_POINTS_CHANGED",
    "CVAR_UPDATE",
    "DISPLAY_SIZE_CHANGED",
    "GROUP_ROSTER_UPDATE",
    "HONOR_LEVEL_UPDATE",
    "IGNORELIST_UPDATE",
    "INCOMING_RESURRECT_CHANGED",
    "INCOMING_SUMMON_CHANGED",
    "INSTANCE_ENCOUNTER_ENGAGE_UNIT",
    "MODIFIER_STATE_CHANGED",
    "MUTELIST_UPDATE",
    "PARTY_LEADER_CHANGED",
    "PARTY_LFG_RESTRICTED",
    "PARTY_LOOT_METHOD_CHANGED",
    "PARTY_MEMBERS_CHANGED",
    "PARTY_MEMBER_DISABLE",
    "PARTY_MEMBER_ENABLE",
    "PET_ATTACK_START",
    "PET_ATTACK_STOP",
    "PET_UI_UPDATE",
    "PLAYER_ALIVE",
    "PLAYER_CONTROL_GAINED",
    "PLAYER_CONTROL_LOST",
    "PLAYER_ENTERING_WORLD",
    "PLAYER_ENTER_COMBAT",
    "PLAYER_EQUIPMENT_CHANGED",
    "PLAYER_FLAGS_CHANGED",
    "PLAYER_FOCUS_CHANGED",
    "PLAYER_LEAVE_COMBAT",
    "PLAYER_LEAVING_WORLD",
    "PLAYER_LEVEL_CHANGED",
    "PLAYER_LEVEL_UP",
    "PLAYER_REGEN_DISABLED",
    "PLAYER_REGEN_ENABLED",
    "PLAYER_ROLES_ASSIGNED",
    "PLAYER_SPECIALIZATION_CHANGED",
    "PLAYER_TALENT_UPDATE",
    "PLAYER_TARGET_CHANGED",
    "PLAYER_TARGET_SET_ATTACKING",
    "PLAYER_UPDATE_RESTING",
    "PLAYTIME_CHANGED",
    "PVP_TIMER_UPDATE",
    "QUEST_SESSION_JOINED",
    "QUEST_SESSION_LEFT",
    "RAID_ROSTER_UPDATE",
    "RAID_TARGET_UPDATE",
    "READY_CHECK",
    "READY_CHECK_CONFIRM",
    "READY_CHECK_FINISHED",
    "RUNE_POWER_UPDATE",
    "SPELL_UPDATE_COOLDOWN",
    "UI_SCALE_CHANGED",
    "UNIT_ABSORB_AMOUNT_CHANGED",
    "UNIT_ATTACK",
    "UNIT_AURA",
    "UNIT_CLASSIFICATION_CHANGED",
    "UNIT_COMBAT",
    "UNIT_COMBO_POINTS",
    "UNIT_CONNECTION",
    "UNIT_CTR_OPTIONS",
    "UNIT_DISPLAYPOWER",
    "UNIT_ENTERED_VEHICLE",
    "UNIT_ENTERING_VEHICLE",
    "UNIT_EXITING_VEHICLE",
    "UNIT_EXITED_VEHICLE",
    "UNIT_FACTION",
    "UNIT_FLAGS",
    "UNIT_HEALTH",
    "UNIT_HEALTH_FREQUENT",
    "UNIT_HEAL_PREDICTION",
    "UNIT_LEVEL",
    "UNIT_MAXHEALTH",
    "UNIT_MAXPOWER",
    "UNIT_NAME_UPDATE",
    "UNIT_OTHER_PARTY_CHANGED",
    "UNIT_PET",
    "UNIT_PHASE",
    "UNIT_PORTRAIT_UPDATE",
    "UNIT_POWER_BAR_HIDE",
    "UNIT_POWER_BAR_SHOW",
    "UNIT_POWER_FREQUENT",
    "UNIT_POWER_POINT_CHARGE",
    "UNIT_POWER_UPDATE",
    "UNIT_SPELLCAST_CHANNEL_START",
    "UNIT_SPELLCAST_CHANNEL_STOP",
    "UNIT_SPELLCAST_FAILED",
    "UNIT_SPELLCAST_INTERRUPTED",
    "UNIT_SPELLCAST_SENT",
    "UNIT_SPELLCAST_START",
    "UNIT_SPELLCAST_STOP",
    "UNIT_SPELLCAST_SUCCEEDED",
    "UNIT_TARGET",
    "UNIT_TARGETABLE_CHANGED",
    "UNIT_THREAT_LIST_UPDATE",
    "UNIT_THREAT_SITUATION_UPDATE",
    "UPDATE_ACTIVE_BATTLEFIELD",
    "UPDATE_INSTANCE_INFO",
    "UPDATE_CHAT_COLOR",
    "UPDATE_MOUSEOVER_UNIT",
    "UPDATE_SHAPESHIFT_FORM",
    "UPDATE_STEALTH",
    "VARIABLES_LOADED",
    "VOICE_START",
    "VOICE_STATUS_UPDATE",
    "VOICE_STOP",
    "ZONE_CHANGED_NEW_AREA",
    "ZONE_CHANGED",
    "ZONE_CHANGED_INDOORS",
}
local hbBlizzFramesHidden={}
local hbBlizzFramesEvents={}
local hbHiddenParent=CreateFrame('Frame', nil, UIParent)
hbHiddenParent:SetAllPoints()
hbHiddenParent:Hide()

function HealBot_Options_DisableEnablePlayerFrame(enable)
      --HealBot_setCall("HealBot_Options_DisableEnablePlayerFrame")
    if enable then
        HealBot_Options_UnitFrameEnable(PlayerFrame, "player")
        HealBot_Options_UnitFrameEnable(TotemFrame)
    else
        HealBot_Options_UnitFrameDisable(PlayerFrame)
        HealBot_Options_UnitFrameDisable(TotemFrame)
    end
end

function HealBot_Options_DisableEnablePetFrame(enable)
      --HealBot_setCall("HealBot_Options_DisableEnablePetFrame")
    if enable then
        HealBot_Options_UnitFrameEnable(PetFrame, "pet")
    else
        HealBot_Options_UnitFrameDisable(PetFrame)
    end
end

function HealBot_Options_DisableEnableTargetFrame(enable)
      --HealBot_setCall("HealBot_Options_DisableEnableTargetFrame")
    if enable then
        if not hbBlizzFramesEvents[TargetFrame:GetName()] then
            HealBot_Options_UnitFrameEnable(TargetFrame, "target")
        else
            HealBot_Options_UnitFrameEnable(TargetFrame)
        end
    else
        HealBot_Options_UnitFrameDisable(TargetFrame)
    end
end

function HealBot_Options_DisableEnableFocusFrame(enable)
      --HealBot_setCall("HealBot_Options_DisableEnableFocusFrame")
    if enable then
        if not hbBlizzFramesEvents[FocusFrame:GetName()] then
            HealBot_Options_UnitFrameEnable(FocusFrame, "focus")
        else
            HealBot_Options_UnitFrameEnable(FocusFrame)
        end
    else
        HealBot_Options_UnitFrameDisable(FocusFrame)
    end
end

function HealBot_Options_DisableEnablePartyFrame(enable)
      --HealBot_setCall("HealBot_Options_DisableEnablePartyFrame")
    if PartyFrame then
        if enable then
            HealBot_Options_UnitFrameEnable(PartyFrame)
        else
            HealBot_Options_UnitFrameDisable(PartyFrame)
        end
    else
        for x=1, 4 do
            local f=_G["PartyMemberFrame"..x]
            if enable then
                local u="Party"..x
                HealBot_Options_UnitFrameEnable(f, u)
            else
                HealBot_Options_UnitFrameDisable(f)
            end
        end
    end
    if CompactPartyFrame then
        if enable then
            HealBot_Options_UnitFrameEnable(CompactPartyFrame)
        else
            HealBot_Options_UnitFrameDisable(CompactPartyFrame)
        end
    end
end

function HealBot_Options_DisableEnableMiniBossFrame(enable)
      --HealBot_setCall("HealBot_Options_DisableEnableMiniBossFrame")
    for x=1, MAX_BOSS_FRAMES do
        local f=_G["Boss"..x.."TargetFrame"]
        if enable then
            local u="Boss"..x
            HealBot_Options_UnitFrameEnable(f, u)
        else
            HealBot_Options_UnitFrameDisable(f)
        end
    end
end

function HealBot_Options_DisableEnableRaidFrame(enable)
      --HealBot_setCall("HealBot_Options_DisableEnableRaidFrame")
    if CompactRaidFrameManager then
        if enable then
            HealBot_Options_UnitFrameEnable(CompactRaidFrameManager)
        else
            HealBot_Options_UnitFrameDisable(CompactRaidFrameManager)
        end
    end
    if CompactRaidFrameContainer then
        if enable then
            HealBot_Options_UnitFrameEnable(CompactRaidFrameContainer)
        else
            HealBot_Options_UnitFrameDisable(CompactRaidFrameContainer)
        end
    end
end

local function HealBot_Options_UnregisterBlizzEvents(f)
      --HealBot_setCall("HealBot_Options_UnregisterBlizzEvents")
    if f and not hb_lVars["RUNBLIZZEVENTS"] then
        if not hbBlizzFramesEvents[f:GetName()] then
            hbBlizzFramesEvents[f:GetName()]={}
        end
        for i=1, getn(hbBlizzEvents), 1 do
            if (f:IsEventRegistered(hbBlizzEvents[i])) then
                hbBlizzFramesEvents[f:GetName()][hbBlizzEvents[i]]=true
                f:UnregisterEvent(hbBlizzEvents[i])
            end
        end
    end
end

local function HealBot_Options_RegisterBlizzEvents(f)
      --HealBot_setCall("HealBot_Options_RegisterBlizzEvents")
    if f and hbBlizzFramesEvents[f:GetName()] then
        for event,_ in pairs(hbBlizzFramesEvents[f:GetName()]) do
            f:RegisterEvent(event)
            --HealBot_AddDebug("Reg Event "..event,"Events",true)
        end
    end
    hbBlizzFramesEvents[f:GetName()]=nil
end

local function HealBot_Options_UnitFrameHide(f)
      --HealBot_setCall("HealBot_Options_UnitFrameHide")
	if f and not hbBlizzFramesHidden[f:GetName()] then
		hbBlizzFramesHidden[f:GetName()]=f:GetParent()
		f:SetParent(hbHiddenParent)
        UnregisterUnitWatch(f)
        f:Hide()
        HealBot_Options_UnregisterBlizzEvents(f)
	end
end

local function HealBot_Options_UnitFrameShow(f, u)
      --HealBot_setCall("HealBot_Options_UnitFrameShow")
	if f and hbBlizzFramesHidden[f:GetName()] then
		f:SetParent(hbBlizzFramesHidden[f:GetName()])
        RegisterUnitWatch(f)
        if u and UnitExists(u) then f:Show() end
		hbBlizzFramesHidden[f:GetName()]=nil
        HealBot_Options_RegisterBlizzEvents(f)
	end
end

function HealBot_Options_UnitFrameDisable(f)
      --HealBot_setCall("HealBot_Options_UnitFrameDisable")
    if f then
        HealBot_Options_UnitFrameHide(f)
        local ToTFrame=_G[f:GetName().."ToT"]
        if ToTFrame then
            HealBot_Options_UnitFrameDisable(ToTFrame)
        end
    end
end

function HealBot_Options_UnitFrameEnable(f, u)
      --HealBot_setCall("HealBot_Options_UnitFrameEnable")
    if f then
        HealBot_Options_UnitFrameShow(f, u)
        local ToTFrame=_G[f:GetName().."ToT"]
        if ToTFrame then
            local uID=u or HEALBOT_WORDS_UNKNOWN
            HealBot_Options_UnitFrameEnable(ToTFrame, uID.."target")
        end
    end
end

function HealBot_Options_SetSliderValue(slider,value)
      --HealBot_setCall("HealBot_Options_SetSliderValue")
    if value then
        if value>1 then
            slider:SetValue(1)
        else
            slider:SetValue(2)
        end
        slider:SetValue(value)
    end
end

function HealBot_Options_UpdateMediaFont(object, name, label)
      --HealBot_setCall("HealBot_Options_UpdateMediaFont")
    if not name then
        name=HealBot_Media_FontName()
    end
    label=label or HEALBOT_OPTIONS_SKINFONT
    HealBot_Options_val_OnLoad(object,label,1,HealBot_Media_FontsCount(),1,5)
    HealBot_Options_SetText(object,label)
    HealBot_Options_SetSliderValue(object, HealBot_Media_FontIndex(name))
    local g=_G[object:GetName().."Text"]
    g:SetText((object.text or label) .. " ".. HealBot_Media_FontIndex(name)..": " ..name);
end

function HealBot_Options_UpdateMediaTexture(object, name)
      --HealBot_setCall("HealBot_Options_UpdateMediaTexture")
    if not name then
        name=HealBot_Media_TextureName()
    end
    HealBot_Options_val_OnLoad(object,HEALBOT_OPTIONS_SKINTEXTURE,1,HealBot_Media_TexturesCount(),1,5)
    HealBot_Options_SetText(object,HEALBOT_OPTIONS_SKINTEXTURE)
    HealBot_Options_SetSliderValue(object,HealBot_Media_TextureIndex(name))
    local g=_G[object:GetName().."Text"]
    g:SetText(object.text .. " ".. HealBot_Media_TextureIndex(name)..": " ..name);
end

function HealBot_Options_UpdateMediaSound(object, name)
      --HealBot_setCall("HealBot_Options_UpdateMediaSound")
    if not name then
        name=HealBot_Media_SoundName()
    end
    HealBot_Options_val_OnLoad(object,HEALBOT_OPTIONS_SOUND,1,HealBot_Media_SoundsCount(),1,5)
    HealBot_Options_SetText(object,HEALBOT_OPTIONS_SOUND)
    HealBot_Options_SetSliderValue(object,HealBot_Media_SoundIndex(name))
    local g=_G[object:GetName().."Text"]
    g:SetText(object.text .. " ".. HealBot_Media_SoundIndex(name)..": " ..name);
end

function HealBot_Options_Show_Help(index,show,top)
      --HealBot_setCall("HealBot_Options_Show_Help")
    if hb_lVars["TIPLOADED"] then
        if show then
            HealBot_Tooltip_OptionsHelp(HEALBOT_OPTIONS_HELP_TITLES[index],HEALBOT_OPTIONS_HELP_TEXT[index],top)
            hb_lVars["OPTIONSTIPVISIBLE"]=true
        else
            HealBot_Tooltip_Hide()
            hb_lVars["OPTIONSTIPVISIBLE"]=false
        end
    end
end
