//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// MAGISTRAL INITIALIZATION — LATE EVENT ATTACHMENT (INSTEAD OF SPECIFY DIRECTLY IN HTML) ETC:
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Magistral.AdjustLayout()

//==================================================================================================

window.addEventListener('resize', Magistral.Window_OnResize, true)

window.addEventListener('focus', Magistral.EscapeToolPanelFocus, true)
window.addEventListener('contextmenu', Magistral.EscapeToolPanelFocus, true)
window.addEventListener('auxclick', Magistral.EscapeToolPanelFocus, true)

//==================================================================================================
/*
let blockingOverlayDIV = WIN.magistral_BlockingOverlayDIV
blockingOverlayDIV.addEventListener('onclick', HEvent.Neutralize, true)
blockingOverlayDIV.addEventListener('contextmenu', HEvent.Neutralize, true)
blockingOverlayDIV.addEventListener('auxclick', HEvent.Neutralize, true)
*/
WIN.magistral_OperationSPAN.onclick = Magistral.EscapeToolPanelFocus

WIN.magistral_ToolPanelDIV.onclick = Magistral.EscapeToolPanelFocus

WIN.magistral_BusyAnimationDIV.addEventListener('mousedown', Magistral.AbandomentDiv_OnClick, true)
WIN.magistral_AbandomentUpperDIV.addEventListener('mousedown', Magistral.AbandomentDiv_OnClick, true)
WIN.magistral_AbandomentLowerDIV.addEventListener('mousedown', Magistral.AbandomentDiv_OnClick, true)

WIN.magistral_BusyAnimationDIV.onmouseenter = Magistral.AbandomentDiv_OnMouseEnter
WIN.magistral_BusyAnimationDIV.onmousemove = Magistral.AbandomentDiv_OnMouseMove
WIN.magistral_BusyAnimationDIV.onmouseleave = Magistral.AbandomentDiv_OnMouseLeave

WIN.magistral_DropDownNavigationButtonDIV.onclick = Magistral.EscapeToolPanelFocus

WIN.magistral_DropdownIconBUTTON.onfocus = Magistral.EscapeToolPanelFocus

WIN.magistral_ReloadPageA.onclick = Magistral.ReloadPageA_OnClick
WIN.magistral_SelectAllContentA.onclick = Magistral.SelectAllContentA_OnClick

WIN.magistral_AbandomentUpperDIV.onmouseenter = Magistral.AbandomentDiv_OnMouseEnter
WIN.magistral_AbandomentUpperDIV.onmousemove = Magistral.AbandomentDiv_OnMouseMove
WIN.magistral_AbandomentUpperDIV.onmouseleave = Magistral.AbandomentDiv_OnMouseLeave

WIN.magistral_ToPageTopA.onclick = Magistral.ToPageTopA_OnClick
WIN.magistral_ToPageBottomA.onclick = Magistral.ToPageBottomA_OnClick

WIN.magistral_AbandomentLowerDIV.onmouseenter = Magistral.AbandomentDiv_OnMouseEnter
WIN.magistral_AbandomentLowerDIV.onmousemove = Magistral.AbandomentDiv_OnMouseMove
WIN.magistral_AbandomentLowerDIV.onmouseleave = Magistral.AbandomentDiv_OnMouseLeave

//==================================================================================================
