Type.registerNamespace("Telerik.Web.UI"); Telerik.Web.UI.RadAjaxControl=function(a){Telerik.Web.UI.RadAjaxControl.initializeBase(this,[a]); this._clientEvents={}; this._uniqueID=""; this._enableHistory=false; this._enableAJAX=true; this._requestQueueSize=0; this._requestQueue=[]; this._loadingPanelsToHide=[]; this._initializeRequestHandler=null; this._endRequestHandler=null; this._isRequestInProgress=false; this._links=[]; this._styles=[]; this.Type="Telerik.Web.UI.RadAjaxControl"; this.UniqueID=this._uniqueID; this.EnableHistory=this._enableHistory; this.EnableAJAX=this._enableAJAX; this.Links=this._links; this.Styles=this._styles; this._enableAriaSupport=false; this._updatePanels=""; }; Telerik.Web.UI.RadAjaxControl.prototype={initialize:function(){Telerik.Web.UI.RadAjaxControl.callBaseMethod(this,"initialize"); for(var a in this._clientEvents){if(typeof(this._clientEvents[a])!="string"){continue; }if(this._clientEvents[a]!=""){var b=this._clientEvents[a]; if(b.indexOf("(")!=-1){this[a]=b; }else{this[a]=eval(b); }}else{this[a]=null; }}var c=Sys.WebForms.PageRequestManager.getInstance(); if(this.get_enableAriaSupport()){this._initializeAriaSupport(); }this._initializeRequestHandler=Function.createDelegate(this,this._initializeRequest); c.add_initializeRequest(this._initializeRequestHandler); },_getResponseHeader:function(c,b){try{return c.getResponseHeader(b); }catch(a){return null; }},_handleAsyncRedirect:function(d){var b=this._getResponseHeader(d,"Location"); if(b&&b!=""){var c=document.createElement("a"); c.style.display="none"; c.href=b; document.body.appendChild(c); if(c.click){try{c.click(); }catch(a){}}else{window.location.href=b; }document.body.removeChild(c); return true; }return false; },_initializeAriaSupport:function(){var b=document.getElementsByTagName("div"); for(var c=0; c-1){a.setAttribute("aria-live","assertive"); }}},_onFormSubmitCompleted:function(s,a){if(s._xmlHttpRequest!=null){if(this._handleAsyncRedirect(s._xmlHttpRequest)){try{s._aborted=true; }catch(d){}return; }}if(s._xmlHttpRequest!=null&&!s.get_timedOut()){var r=this.getResponseItems(s.get_responseData(),"scriptBlock"); for(var g=0,k=r.length; g=0; h--){b[h].dispose(); }}$telerik.disposeElement(f); q.removeChild(f); Telerik.Web.UI.RadAjaxControl.InsertAtLocation(m,q,n); Telerik.Web.UI.RadAjaxControl.panelsToClear[Telerik.Web.UI.RadAjaxControl.panelsToClear.length]=o; }}}s.get_webRequest().remove_completed(this._onFormSubmitCompletedHandler); },dispose:function(){this.hideLoadingPanels(); var a=Sys.WebForms.PageRequestManager.getInstance(); a.remove_initializeRequest(this._initializeRequestHandler); $clearHandlers(this.get_element()); this._element.control=null; window[Sys.WebForms.PageRequestManager.getInstance()._uniqueIDToClientID(this._uniqueID)]=null; Telerik.Web.UI.RadAjaxControl.callBaseMethod(this,"dispose"); },get_enableAJAX:function(){return this._enableAJAX; },set_enableAJAX:function(a){if(this._enableAJAX!=a){this._enableAJAX=a; }},get_enableAriaSupport:function(){return this._enableAriaSupport; },get_enableHistory:function(){return this._enableHistory; },set_enableHistory:function(a){if(this._enableHistory!=a){this._enableHistory=a; }},get_clientEvents:function(){return this._clientEvents; },set_clientEvents:function(a){if(this._clientEvents!=a){this._clientEvents=a; }},get_links:function(){return this._links; },set_links:function(a){if(this._links!=a){this._links=a; if(this._links.length>0){this.updateHeadLinks(); }}},get_styles:function(){return this._styles; },set_styles:function(a){if(this._styles!=a){this._styles=a; if(this._styles.length>0){this.updateHeadStyles(); }}},get_uniqueID:function(){return this._uniqueID; },set_uniqueID:function(a){if(this._uniqueID!=a){this._uniqueID=a; window[Sys.WebForms.PageRequestManager.getInstance()._uniqueIDToClientID(this._uniqueID)]=this; }},get_requestQueueSize:function(){return this._requestQueueSize; },set_requestQueueSize:function(a){if(a>0){this._requestQueueSize=a; this.raisePropertyChanged("requestQueueSize"); }},isChildOf:function(a,b){while(a!=null){if(a==b){return true; }a=a.parentNode; }return false; },_initializeRequest:function(i,a){var g=Sys.WebForms.PageRequestManager.getInstance(); if(g.get_isInAsyncPostBack()&&this._requestQueueSize>0){this._queueRequest(i,a); return false; }if(this.Type=="Telerik.Web.UI.RadAjaxManager"){if(a.get_postBackElement()!=this.get_element()){var f=this._updatePanels.split(","); if(Array.contains(f,a.get_postBackElement().id)){this._isRequestInProgress=true; this._attachRequestHandlers(i,a,false); return false; }else{var e=a.get_postBackElement().parentNode; var c=false; while(e!=null){if(e.id&&Array.contains(f,e.id)){c=true; break; }e=e.parentNode; }if(c){this._isRequestInProgress=true; this._attachRequestHandlers(i,a,false); return false; }}if(!this._initiators[a.get_postBackElement().id]){var e=a.get_postBackElement().parentNode; var c=false; while(e!=null){if(e.id&&this._initiators[e.id]){c=true; break; }e=e.parentNode; }if(!c){this._isRequestInProgress=true; this._attachRequestHandlers(i,a,false); return false; }}}}if(this.Type=="Telerik.Web.UI.RadAjaxPanel"){var d=this._getParentAjaxPanel(a.get_postBackElement()); if(d&&d.get_id()!=this.get_id()){return false; }if(!this.isChildOf(a.get_postBackElement(),this.get_element())){return false; }}if(this._enableHistory){if(Telerik.Web.UI.RadAjaxControl.History[""]==null){Telerik.Web.UI.RadAjaxControl.HandleHistory(i._uniqueIDToClientID(this._uniqueID),""); }Telerik.Web.UI.RadAjaxControl.HandleHistory(i._uniqueIDToClientID(this._uniqueID),a.get_request().get_body()); }if(i._form.__EVENTTARGET&&i._form.__EVENTTARGET.value){this.__EVENTTARGET=i._form.__EVENTTARGET.value; }else{this.__EVENTTARGET=a.get_postBackElement().id; }if(a.get_postBackElement().name){this.__EVENTTARGET=a.get_postBackElement().name; }this.__EVENTARGUMENT=i._form.__EVENTARGUMENT.value; var b=new Telerik.Web.UI.RadAjaxRequestEventArgs(this.__EVENTTARGET,i._form.__EVENTARGUMENT.value,this._enableAJAX); var h=this.fireEvent(this,"OnRequestStart",[b]); if(b.get_cancel()||(typeof(h)!="undefined"&&!h)){delete this.__EVENTTARGET; delete this.__EVENTARGUMENT; a.set_cancel(true); return; }if(!b._enableAjax||!b.EnableAjax){a.set_cancel(true); i._form.__EVENTTARGET.value=this.__EVENTTARGET; i._form.__EVENTARGUMENT.value=this.__EVENTARGUMENT; i._form.submit(); return; }this._isRequestInProgress=true; this._attachRequestHandlers(i,a,true); },_endRequest:function(k,a){var l=this.context; k.remove_endRequest(l._endRequestHandler); for(var d=0,e=Telerik.Web.UI.RadAjaxControl.panelsToClear.length; d0){l.__id=this.id; l._executePendingRequest(); }},_queueRequest:function(e,a){a.set_cancel(true); if(this._requestQueue.length>=this._requestQueueSize){return; }var d=a.get_postBackElement(); var c=d.id; if(d.name){c=d.name; }if(e._form.__EVENTTARGET&&e._form.__EVENTTARGET.value){c=e._form.__EVENTTARGET.value; }var b=e._form.__EVENTARGUMENT.value; Array.enqueue(this._requestQueue,[c,b]); },_executePendingRequest:function(){var d=Array.dequeue(this._requestQueue); var c=d[0]; var b=d[1]; if(this._requestQueue.length>0&&this.__id!=""){var a=$find(this.__id); if(a){Array.addRange(a._requestQueue,this._requestQueue); }}var e=Sys.WebForms.PageRequestManager.getInstance(); e._doPostBack(c,b); },_attachRequestHandlers:function(e,a,f){this._endRequestHandler=Function.createDelegate({context:this,id:this.get_id()},this._endRequest); e.add_endRequest(this._endRequestHandler); this._onFormSubmitCompletedHandler=Function.createDelegate(this,this._onFormSubmitCompleted); a.get_request().add_completed(this._onFormSubmitCompletedHandler); if(typeof(a.get_request()._get_eventHandlerList)=="function"){a.get_request()._get_eventHandlerList()._list.completed.reverse(); }else{if(Sys.Observer){var d=Sys.Observer._getContext(a.get_request()); if(d&&d.events){d.events._list.completed.reverse(); }}}if(f){var c=a.get_request().get_body(); var b=(c.lastIndexOf("&")!=c.length-1)?"&":""; c+=b+"RadAJAXControlID="+e._uniqueIDToClientID(this._uniqueID); a.get_request().set_body(c); }},_getParentAjaxPanel:function(b){var a=null; while(b!=null){if(typeof(b.id)!="undefined"&&$find(b.id)&&$find(b.id).Type=="Telerik.Web.UI.RadAjaxPanel"){a=$find(b.id); break; }b=b.parentNode; }return a; },getResponseItems:function(m,g,f){var l=Sys.WebForms.PageRequestManager.getInstance(); var j=m; var c,h,n,e,a; var k=0; var i=null; var b="|"; var d=[]; while(k=j.length){i=l._findText(j,j.length); break; }if(typeof(l._decodeString)!="undefined"){a=l._decodeString(j.substr(k,h)); }else{a=j.substr(k,h); }k+=h; if(j.charAt(k)!==b){i=l._findText(j,k); break; }k++; if(g!=undefined&&g!=n){continue; }if(f!=undefined&&f!=e){continue; }Array.add(d,{type:n,id:e,content:a}); }return d; },pageLoading:function(b,a){},pageLoaded:function(b,a){},hideLoadingPanels:function(){for(var b=0; b0){return b[0]; }var a=document.createElement("head"); document.documentElement.appendChild(a); return a; },ajaxRequest:function(a){__doPostBack(this._uniqueID,a); },ajaxRequestWithTarget:function(b,a){__doPostBack(b,a); },__doPostBack:function(c,a){var b=Sys.WebForms.PageRequestManager.getInstance()._form; if(b!=null){if(b.__EVENTTARGET!=null){b.__EVENTTARGET.value=c; }if(b.__EVENTARGUMENT!=null){b.__EVENTARGUMENT.value=a; }b.submit(); }}}; Telerik.Web.UI.RadAjaxControl.registerClass("Telerik.Web.UI.RadAjaxControl",Sys.UI.Control); Telerik.Web.UI.RadAjaxRequestEventArgs=function(c,b,a){Telerik.Web.UI.RadAjaxRequestEventArgs.initializeBase(this); this._enableAjax=a; this._eventTarget=c; this._eventArgument=b; this._postbackControlClientID=c.replace(/(\$|:)/g,"_"); this._eventTargetElement=$get(this._postbackControlClientID); this.EnableAjax=this._enableAjax; this.EventTarget=this._eventTarget; this.EventArgument=this._eventArgument; this.EventTargetElement=this._eventTargetElement; }; Telerik.Web.UI.RadAjaxRequestEventArgs.prototype={get_enableAjax:function(){return this._enableAjax; },set_enableAjax:function(a){if(this._enableAjax!=a){this._enableAjax=a; }},get_eventTarget:function(){return this._eventTarget; },get_eventArgument:function(){return this._eventArgument; },get_eventTargetElement:function(){return this._eventTargetElement; }}; Telerik.Web.UI.RadAjaxRequestEventArgs.registerClass("Telerik.Web.UI.RadAjaxRequestEventArgs",Sys.CancelEventArgs); Telerik.Web.UI.RadAjaxControl.History={}; Telerik.Web.UI.RadAjaxControl.HandleHistory=function(a,b){if(window.netscape){return; }var c=$get(a+"_History"); if(c==null){c=document.createElement("iframe"); c.id=a+"_History"; c.name=a+"_History"; c.style.width="0px"; c.style.height="0px"; c.src="about:blank"; c.style.visibility="hidden"; var d=function(j){if(!Telerik.Web.UI.RadAjaxControl.ShouldLoadHistory){Telerik.Web.UI.RadAjaxControl.ShouldLoadHistory=true; return; }var o=""; var f=""; var h=c.contentWindow.document.getElementById("__DATA"); if(!h){return; }var g=h.value.split("&"); for(var l=0,n=g.length; l"); b.contentWindow.document.close(); if(window.netscape){b.contentWindow.document.location.hash="#'"+new Date()+"'"; }}; Telerik.Web.UI.RadAjaxControl.DecodePostData=function(a){if(decodeURIComponent){return decodeURIComponent(a); }else{return unescape(a); }}; Telerik.Web.UI.RadAjaxControl.RestorePostData=function(a,d){if(a.tagName.toLowerCase()=="select"){for(var b=0,c=a.options.length; b1){return false; }return true; }; Telerik.Web.UI.RadAjaxControl.EvalScriptCode=function(b){if(Telerik.Web.UI.RadAjaxControl.IsSafari()){b=b.replace(/^\s*\s*$/mi,"$1"); }var a=document.createElement("script"); a.setAttribute("type","text/javascript"); if(Telerik.Web.UI.RadAjaxControl.IsSafari()){a.appendChild(document.createTextNode(b)); }else{a.text=b; }var c=document.getElementsByTagName("head")[0]; c.appendChild(a); if(Telerik.Web.UI.RadAjaxControl.IsSafari()){a.innerHTML=""; }else{a.parentNode.removeChild(a); }}; Telerik.Web.UI.RadAjaxControl.GetTags=function(b,f){var d=[]; var a=b; while(1){var e=Telerik.Web.UI.RadAjaxControl.GetTag(a,f); if(e.index==-1){break; }d[d.length]=e; var c=e.index+e.outer.length; a=a.substring(c,a.length); }return d; }; Telerik.Web.UI.RadAjaxControl.GetTag=function(b,e,a){if(typeof(a)=="undefined"){a=""; }var d=new RegExp("<"+e+"[^>]*>((.|\n|\r)*?)","i"); var c=b.match(d); if(c!=null&&c.length>=2){return{outer:c[0],inner:c[1],index:c.index}; }else{return{outer:a,inner:a,index:-1}; }}; Telerik.Web.UI.RadAjaxControl.GetLinkHrefs=function(c){var b=c; var a=[]; while(1){var e=b.match(/]*href=('|")?([^'"]*)('|")?([^>]*)>.*?(<\/link>)?/i); if(e==null||e.length<3){break; }var f=e[2]; a[a.length]=f; var d=e.index+f.length; b=b.substring(d,b.length); }return a; }; Telerik.Web.UI.RadAjaxControl.GetScriptsSrc=function(c){var b=c; var a=[]; while(1){var e=b.match(/]*src=('|")?([^'"]*)('|")?([^>]*)>.*?(<\/script>)?/i); if(e==null||e.length<3){break; }var f=e[2]; a[a.length]=f; var d=e.index+f.length; b=b.substring(d,b.length); }return a; }; Telerik.Web.UI.RadAjaxControl.IsSafari=function(){return(navigator.userAgent.match(/safari/i)!=null); }; Type.registerNamespace("Telerik.Web.UI"); $telerik.findAjaxLoadingPanel=$find; $telerik.toAjaxLoadingPanel=function(a){return a; }; Telerik.Web.UI.RadAjaxLoadingPanel=function(a){var b=["showing","hiding"]; this._initializeClientEvents(b); Telerik.Web.UI.RadAjaxLoadingPanel.initializeBase(this,[a]); this._uniqueID=""; this._minDisplayTime=0; this._initialDelayTime=0; this._isSticky=false; this._transparency=0; this._manager=null; this._zIndex=90000; this.skin=""; this._animationDuration=0; this._backgroundTransparency=0; this._enableAriaSupport=false; this.UniqueID=this._uniqueID; this.MinDisplayTime=this._minDisplayTime; this.InitialDelayTime=this._initialDelayTime; this.IsSticky=this._isSticky; this.Transparency=this._transparency; this.ZIndex=this._zIndex; this._overlay=false; this._overlayIFrame={}; }; Telerik.Web.UI.RadAjaxLoadingPanel.prototype={initialize:function(){Telerik.Web.UI.RadAjaxLoadingPanel.callBaseMethod(this,"initialize"); if(this.get_enableAriaSupport()){this.get_element().setAttribute("aria-busy","true"); }},dispose:function(){Telerik.Web.UI.RadAjaxLoadingPanel.callBaseMethod(this,"dispose"); },get_zIndex:function(){return this._zIndex; },set_zIndex:function(a){if(this._zIndex!=a){this._zIndex=a; }},get_uniqueID:function(){return this._uniqueID; },set_uniqueID:function(a){if(this._uniqueID!=a){this._uniqueID=a; window[Sys.WebForms.PageRequestManager.getInstance()._uniqueIDToClientID(this._uniqueID)]=this; }},get_initialDelayTime:function(){return this._initialDelayTime; },set_initialDelayTime:function(a){if(this._initialDelayTime!=a){this._initialDelayTime=a; }},get_isSticky:function(){return this._isSticky; },set_isSticky:function(a){if(this._isSticky!=a){this._isSticky=a; }},get_minDisplayTime:function(){return this._minDisplayTime; },set_minDisplayTime:function(a){if(this._minDisplayTime!=a){this._minDisplayTime=a; }},get_transparency:function(){return this._transparency; },set_transparency:function(a){if(this._transparency!=a){this._transparency=a; }},get_backgroundTransparency:function(){return this._backgroundTransparency; },set_backgroundTransparency:function(a){if(this._backgroundTransparency!=a){this._backgroundTransparency=a; }},get_animationDuration:function(){return this._animationDuration; },set_animationDuration:function(a){this._animationDuration=a; },get_enableAriaSupport:function(){return this._enableAriaSupport; },show:function(f){var e=$get(f+"_wrapper"); if((typeof(e)=="undefined")||(!e)){e=$get(f); }var d=this.get_element(); if(!(e&&d)){return false; }var b=this._initialDelayTime; var c=this; var a=(!this._isSticky)?this.cloneLoadingPanel(d,f):d; if(b){window.setTimeout(function(){try{if(c._manager!=null&&c._manager._isRequestInProgress){c.displayLoadingElement(a,e); }}catch(g){}},b); }else{this.displayLoadingElement(a,e); }return true; },hide:function(m){var e=$get(m); var i=String.format("{0}_wrapper",m); var h=$get(i); if(h){e=h; }if(this.get_element()==null){var d=$get(Sys.WebForms.PageRequestManager.getInstance()._uniqueIDToClientID(this._uniqueID)); if(d==null){return; }this._element=d; }var b=(!this._isSticky)?$get(this.get_element().id+m):this.get_element(); var j=new Date(); if(b==null){return; }var l=j-b._startDisplayTime; var g=this._minDisplayTime; var f=new Telerik.Web.UI.AjaxLoadingPanelEventArgs(b,e); this.raise_hiding(f); if(!f.get_cancelNativeDisplay()){if(this._overlayIFrame&&this._overlayIFrame[b.id]){var k=this._overlayIFrame; var c=b.id; window.setTimeout(function(){if(k&&k[c]){k[c].dispose(); k[c]=null; }k=null; },(g>l)?g-l:0); }var a=this.get_animationDuration(); if(this._isSticky){if(g>l){window.setTimeout(function(){if(!b.parentNode){return; }if(a>0){$telerik.$(b).fadeOut(a,function(){b.style.display="none"; }); }else{b.style.display="none"; }},g-l); }else{if(a>0){$telerik.$(b).fadeOut(a,function(){b.style.display="none"; }); }else{b.style.display="none"; }}}else{if(g>l){window.setTimeout(function(){if(!b.parentNode){return; }if(a>0){$telerik.$(b).fadeOut(a,function(){b.parentNode.removeChild(b); }); }else{b.parentNode.removeChild(b); }},g-l); }else{if(a>0){$telerik.$(b).fadeOut(a,function(){b.parentNode.removeChild(b); }); }else{b.parentNode.removeChild(b); }}}}if(!this._isSticky&&typeof(e)!="undefined"&&(e!=null)){e.style.visibility="visible"; }},cloneLoadingPanel:function(b,c){var a=b.cloneNode(false); a.innerHTML=b.innerHTML; a.id=b.id+c; document.body.insertBefore(a,document.body.firstChild); return a; },displayLoadingElement:function(b,g){if(!this._isSticky){if($telerik.isIE6){this._setDropDownsVisibitily(g,false); }var e=this.getElementRectangle(g); b.style.position="absolute"; b.style.width=e.width+"px"; b.style.height=e.height+"px"; b.style.left=e.left+"px"; b.style.top=e.top+"px"; b.style.textAlign="center"; b.style.zIndex=this._zIndex; }var d=100-parseInt(this._transparency); if(d<100){$telerik.$(b).css("opacity",d/100); }var a=100-parseInt(this._backgroundTransparency); if(a<100){$telerik.$(b).find(".raColor").css("opacity",a/100); }var f=this; hideUpdatedElement=function(){if(d==100&&!f._isSticky){var h=true; if(f.skin!=""){if(typeof b.style.opacity=="undefined"){if($telerik.$(b).css("filter").indexOf("opacity")!=-1||$telerik.$(b.firstChild.nextSibling).css("filter").indexOf("opacity")!=-1){h=false; }}else{if($telerik.$(b).css("opacity")>0||$telerik.$(b.getElementsByClassName("raDiv")[0]).css("opacity")>0){h=false; }}}if(h){g.style.visibility="hidden"; }}}; var c=new Telerik.Web.UI.AjaxLoadingPanelEventArgs(b,g); this.raise_showing(c); if(!c.get_cancelNativeDisplay()){if(this.get_animationDuration()>0){$telerik.$(b).css("opacity",0); b.style.display=""; $telerik.$(b).animate({opacity:d/100},this.get_animationDuration(),hideUpdatedElement); }else{b.style.display=""; hideUpdatedElement(); }if(this._overlay){this._overlayIFrame[b.id]=new Telerik.Web.UI.Overlay(b); this._overlayIFrame[b.id].initialize(); }}b._startDisplayTime=new Date(); },_setDropDownsVisibitily:function(b,a){if(!b){b=this; }b.className+=" RadAjaxUpdatedElement"; },getElementRectangle:function(a){if(!a){a=this; }var d=$telerik.getLocation(a); var c=d.x; var e=d.y; var f=a.offsetWidth; var b=a.offsetHeight; return{left:c,top:e,width:f,height:b}; },_initializeClientEvents:function(a){if(a){var e=this; for(var b=0,c=a.length; b