function TalentSwitch.doFlash()

	local bars={"Action","MultiBarBottomLeft","MultiBarBottomRight","MultiBarLeft","MultiBarRight","BonusActionButton"}
	for bar=1,#bars do
	  for button=1,12 do
	    local buttonName = bars[bar].."Button"..button
	  --  print(buttonName,"contains",GetActionInfo(_G[buttonName].action))
		if _G[buttonName] then

			local type, id, sub = GetActionInfo(_G[buttonName].action)

			for i=1, 6 do
				if toFlash[i] ~= nil and tonumber(id) == tonumber(toFlash[i]) and type=="spell" then
print(buttonName)
					ActionButton_ShowOverlayGlow(_G[buttonName])
					frame:SetScript("OnUpdate", onUpdate)
					break

				end
			end
		end

	  end
	end

end

local function onUpdate(self,elapsed)
	total = total + elapsed
	if total >= 4 then
		--self:SetScript("OnUpdate", nil)
		local bars={"Action","MultiBarBottomLeft","MultiBarBottomRight","MultiBarLeft","MultiBarRight","BonusActionButton"}
		for bar=1,#bars do
		  for button=1,12 do
		    local buttonName = bars[bar].."Button"..button
		
			if _G[buttonName] then
			
				local type, id, sub = GetActionInfo(_G[buttonName].action)

				for i = 1, 6 do
					if toFlash[i] ~= nil and tonumber(id) == tonumber(toFlash[i]) and type=="spell" then
						ActionButton_HideOverlayGlow(_G[buttonName])
						break
					end
				end
			end

		  end
		end
		total = 0
	end
end