﻿/*
erroralert.js handles the logic for the display of error messages
*/


function ErrorAlert(errorMsg, changeResultsGrid)
{
     this.MsgSpan = $("uxErrorMsg");
     
     this.Clear = function(){
        this.MsgSpan = "";
     }
     this.ShowErrorModal = function(){
            $("wrapper-error").style.display = 'inline';
     }
     //Constructor/Initializer
     this.MsgSpan.innerHTML = errorMsg; //Set message
     this.ShowErrorModal(); //Open window
        
     if (changeResultsGrid == true) {   // Stops the spinning wheel
        _searchResultsGrid.DisplaySearchResultsHeader("<table><tr><td>We're sorry an error occurred.  Please try again.</td></tr></table>");
     }
}

function CloseError() {
     $("wrapper-error").style.display = 'none';
}