﻿// Routines to show a modal div.
// The template webpage has:
// 1. a hidden asp panel where modal controls are loaded <asp:Panel ID="ModalContainer" style="display:none;" runat="server"/>
// 2. the main container <div id="Container">

function showDivModalPopup(mDivId, shw /*true=show or false=hide*/)
{
    var divM = document.getElementById(mDivId); 
    if(divM!=null)
    {
        try {
            /* Hide everything when the popup is visible */
            document.getElementById('Container').className='Container'+(shw?'Hide':'Show');
        }
        catch(er){}
        divM.style.display=shw?'':'none';
    }
}
