﻿// Author: David Leghorn    Date:june 07

// script defines functions for displaying modal message boxes
// message boxes are typically utilised to display loading messages or request result messages for ajax
// data requests


    // shows or hides ok message box - ok message box is utilised to display messages where user must
    // acknowledge the message by pressing ok button to close/hide the message box
    
    function ShowHideOkMsgBox(vis,msgText)
    {
        ShowHideObj("ModalBg",vis);
        document.getElementById("ModalOkMsgText").innerHTML = msgText;
        ShowHideObj("ModalOkMsgBox",vis);
    }
    
    // OkMsgBox Ok button onclick handler
    
    function CloseModalOkMsgBox()
    {
        ShowHideObj("ModalBg","hidden");
        document.getElementById("ModalOkMsgText").innerHTML = "";
        ShowHideObj("ModalOkMsgBox","hidden");
        window.focus();
    }
    
    // SHOW OR HIDE MODAL ANIMATED MESSAGE BOX (typically used to display loading,saving etc messages)
    
    function ShowHideAnimatedMsgBox(vis,msg)
    {
        document.getElementById("AnimatedMsgboxText").innerHTML = msg;
        ShowHideObj("ModalBg",vis);
        ShowHideObj("AnimatedMsgBox",vis);
    }
    

