﻿Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginReq);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endReq);
showWait = false;

function beginReq(sender, args) {
	if (!NeedToShowWait()) return;
	modProgresss = $find(ModalProgress);
	if (modProgresss) modProgresss.show();
}

function endReq(sender, args) {
	modProgresss = $find(ModalProgress);
	if (modProgresss) modProgresss.hide();
	showWait = false;
}

function NeedToShowWait()
{
    return showWait;
//    hdn = (document.all) ? document.all["hdnCurrentStep"] : document.getElementById("hdnCurrentStep");
//	if (hdn && hdn.value)
//	{
//	   //alert(hdn.value);
//	   return (hdn.value == "3");
//	}
//	return false;
} 


/*
function beginReq(sender, args) {
	// shows the Popup 
	//$find(ModalProgress).show();
}

function endReq(sender, args) {
	//  shows the Popup 
	//$find(ModalProgress).hide();
} 
 */
