
Progress=$(document).ready(function()
{Sys.require([Sys.components.modalPopup],function()
{$('#showProgress').modalPopup({id:"modalProgress",PopupControlID:"popProgress",BackgroundCssClass:"progress_Shadow",Drag:false,shown:Progress.fn.modalShown,hidden:Progress.fn.modalHidden,repositionMode:"RepositionOnWindowResizeAndScroll"});});});Progress.fn=function()
{return{MessageText:'Please Wait.',DetailMessageText:'Loading...',_ContentTop:'<div class="progress_Padding"><div class="progress_image"><IMG height="32" class="progress_MsgImage" src="/NRTProducts/include/images/progress.gif" width="32" border="0" /></div><div class="progress_MsgBody"><div class="progress_MsgCell"><p class="progress_MsgMain">',_ContentMiddle:'</p></div><div style="clear:both;"></div><div class="progress_MsgDetailCell"><p class="progress_MsgDetail">',_ContentBottom:'</p></div></div></div>',_hasSetLeft:false,_setLeft:0,_left:0,_top:0,_width:250,_height:80,_isVisible:false,_hideAttempts:0,_hideTimeoutTimer:null,modalShown:function()
{Progress.fn._isVisible=true;},modalHidden:function()
{Progress.fn._isVisible=false;},getIsVisible:function()
{return Progress.fn._isVisible;},show:function(eType,bCustom,sCustomMsg)
{if(Progress.fn._isVisible==true)
return;var tmpCentered=this._bCentered;var defWidth=540;var height=this._height+"px";var width=this._width+"px";try
{if(arguments.length>0)
{this.DetailMessageText=this._getDetailMessageText(eType,bCustom,sCustomMsg);}
var progressLayout=this._ContentTop+this.MessageText+this._ContentMiddle+this.DetailMessageText+this._ContentBottom;Sys.require([Sys.components.modalPopup,Sys.Application],function()
{var modalProgress=$find('modalProgress');if(modalProgress)
{var popProgress=$get('popProgress');popProgress.style.width=width;popProgress.innerHTML=progressLayout;modalProgress.show();Progress.fn._isVisible=true;popProgress.style.left='276px';}
else{return;}});}
catch(err)
{_oErrorHandler.Error('Progress.fn.show',_oErrorHandler.ERRORTYPE_JS,err);}},hide:function()
{try
{var modalProgress=$find('modalProgress');if(modalProgress)
{if(Progress.fn._hideTimeOutTimer!=null)
{clearInterval(Progress.fn._hideTimeoutTimer);Progress.fn._hideTimeoutTimer=null;Progress.fn._hideAttempts=0;}
modalProgress.hide();Progress.fn._isVisible=false;}
else
{if(Progress.fn._hideTimeoutTimer==null)
Progress.fn._hideTimeoutTimer=setInterval(Progress.fn.hide,500);else
{Progress.fn._hideAttempts+=1;if(Progress.fn._hideAttempts>3)
{clearInterval(Progress.fn._hideTimeoutTimer);Progress.fn._hideAttempts=0;Progress.fn._isVisible=false;}}}
return;}
catch(err)
{clearInterval(Progress.fn._hideTimeoutTimer);Progress.fn._hideTimeoutTimer=null
Progress.fn._hideAttempts=0;Progress.fn._isVisible=false;_oErrorHandler.Error('Progress.fn.hide',_oErrorHandler.ERRORTYPE_JS,err);}},_getDetailMessageText:function(eType,bCustom,sCustomMsg)
{var sTmpMessage='';try
{if(bCustom)
{sTmpMessage=sCustomMsg;}else
{switch(eType)
{case'plotmap':sTmpMessage=' Loading properties in map';break;case'map':sTmpMessage=' Loading map results';break;case'list':sTmpMessage=' Loading list results';break;case'sort':sTmpMessage=' Re-sorting by<br>'+sCustomMsg;break;case'page':sTmpMessage=' Loading page '+sCustomMsg;break;case'resize':sTmpMessage=' Resizing to<br>'+sCustomMsg+' listings per page';break;case'group':sTmpMessage=' Loading group<br>'+sCustomMsg;break;case'search':sTmpMessage=' Searching';break;default:sTmpMessage=' Loading';}}
return sTmpMessage;}
catch(err)
{throw err;}}};}();