--------------------------------------------------------------------------------
-- INITIALIZATION
--------------------------------------------------------------------------------
function Init()
	localization = GetGameLocalization()
	if not common.GetAddonRelatedTextGroup( localization ) then
		localization = "eng"
	end
	wtMain = mainForm:GetChildChecked( "DPanel", false )
	local wtDNDPanel = wtMain:GetChildChecked( "DNDPanel", false )
	local wtControl3DPanel = wtMain:GetChildChecked( "Control3DPanel", false )
	wtMain:Show( false )

	local wtHeader = wtMain:GetChildChecked( "Header", false )
	local wtBtLeft = wtDNDPanel:GetChildChecked( "BtLeft", false )
	local wtBtRight = wtDNDPanel:GetChildChecked( "BtRight", false )
	local wtBtZoomIn = wtDNDPanel:GetChildChecked( "BtZoomIn", false )
	local wtBtZoomOut = wtDNDPanel:GetChildChecked( "BtZoomOut", false )

	wtHeader:SetVal( "value", GetTextLocalized( "AddonName" ) )
	wtBtLeft:SetVal( "button_label", GetTextLocalized( "Left" ) )
	wtBtRight:SetVal( "button_label", GetTextLocalized( "Right" ) )
	wtBtZoomIn:SetVal( "button_label", GetTextLocalized( "Head" ) )
	wtBtZoomOut:SetVal( "button_label", GetTextLocalized( "All" ) )

	wtIcon = mainForm:GetChildChecked( "IconPanel", false )
--	wtIcon:Show( true )

	wtControl3D = wtControl3DPanel:GetChildChecked( "DControl", false )
	DnD:Init( 551, wtDNDPanel, wtMain, true )
	if avatar.IsExist() then onEvent [ "EVENT_AVATAR_CREATED" ]() end
	RegisterEventHandlers( onEvent )
	RegisterReactionHandlers( onReaction )

	alt_z()
end
--------------------------------------------------------------------------------
Init()
--------------------------------------------------------------------------------