﻿var timeoutVal = null;
var hideCount = 0;
function clear247Timeout()

{

    if(typeof timeoutVal !== 'undefined' && timeoutVal !== null)

    {

        clearTimeout(timeoutVal);

    }

}
function hideProgress()
{
    try
    {
        if(typeof Progress !== 'undefined' && Progress !== null  && typeof dhtmlHistory !== 'undefined' && dhtmlHistory !== 'undefined'  && dhtmlHistory !== null)
        {
            var loc = dhtmlHistory.getCurrentLocation();
            var res = document.getElementById('divResults');
            if(typeof loc !== 'undefined' && loc !== null && typeof res !== 'undefined' && res !== null)
            {
                if(loc.indexOf("results")> -1  && (res.innerHTML.indexOf("divResultsSection")> -1 || res.innerHTML.indexOf("divCominglingSelection")> -1))
                {
                    if(loc.indexOf("neg") > -1)
                    {
                    Progress.fn.hide();
                    }
                    else
                    {
                    Progress.fn.hide();
                    hideCount += 1;
                    if(hideCount == 3){
                    clearTimeout(timeoutVal); 
                    return;
                    }
                    }
                }
            }
            timeoutVal=setTimeout("hideProgress()",500);
         }
      }
      catch(err){}
  return;
}
