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._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 c=this._clientEvents[a]; if(c.indexOf("(")!=-1){this[a]=c; }else{this[a]=eval(c); }}else{this[a]=null; }}var b=Sys.WebForms.PageRequestManager.getInstance(); this._initializeRequestHandler=Function.createDelegate(this,this._initializeRequest); b.add_initializeRequest(this._initializeRequestHandler); },_getResponseHeader:function(c,b){try{return c.getResponseHeader(b); }catch(a){return null; }},_handleAsyncRedirect:function(b){var c=this._getResponseHeader(b,"Location"); if(c&&c!=""){var a=document.createElement("a"); a.style.display="none"; a.href=/c; document.body.appendChild(a); if(a.click){try{a.click(); }catch(d){}}else{window.location.href=/c; }document.body.removeChild(a); return true; }return false; },_onFormSubmitCompleted:function(b,h){if(b._xmlHttpRequest!=null){if(this._handleAsyncRedirect(b._xmlHttpRequest)){try{b._aborted=true; }catch(d){}return; }}if(b._xmlHttpRequest!=null&&!b.get_timedOut()){var p=this.getResponseItems(b.get_responseData(),"scriptBlock"); for(var q=0,c=p.length; q=0; o--){f[o].dispose(); }}$telerik.disposeElement(a); s.removeChild(a); Telerik.Web.UI.RadAjaxControl.InsertAtLocation(r,s,m); Telerik.Web.UI.RadAjaxControl.panelsToClear[Telerik.Web.UI.RadAjaxControl.panelsToClear.length]=k; }}}b.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; 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_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(b,a){while(b!=null){if(b==a){return true; }b=b.parentNode; }return false; },_initializeRequest:function(g,e){var a=Sys.WebForms.PageRequestManager.getInstance(); if(a.get_isInAsyncPostBack()&&this._requestQueueSize>0){this._queueRequest(g,e); return false; }if(this.Type=="Telerik.Web.UI.RadAjaxManager"){if(e.get_postBackElement()!=this.get_element()){var h=this._updatePanels.split(","); if(Array.contains(h,e.get_postBackElement().id)){this._isRequestInProgress=true; this._attachRequestHandlers(g,e,false); return false; }else{var i=e.get_postBackElement().parentNode; var f=false; while(i!=null){if(i.id&&Array.contains(h,i.id)){f=true; break; }i=i.parentNode; }if(f){this._isRequestInProgress=true; this._attachRequestHandlers(g,e,false); return false; }}if(!this._initiators[e.get_postBackElement().id]){var i=e.get_postBackElement().parentNode; var f=false; while(i!=null){if(i.id&&this._initiators[i.id]){f=true; break; }i=i.parentNode; }if(!f){this._isRequestInProgress=true; this._attachRequestHandlers(g,e,false); return false; }}}}if(this.Type=="Telerik.Web.UI.RadAjaxPanel"){var c=this._getParentAjaxPanel(e.get_postBackElement()); if(c&&c.get_id()!=this.get_id()){return false; }if(!this.isChildOf(e.get_postBackElement(),this.get_element())){return false; }}if(this._enableHistory){if(Telerik.Web.UI.RadAjaxControl.History[""]==null){Telerik.Web.UI.RadAjaxControl.HandleHistory(g._uniqueIDToClientID(this._uniqueID),""); }Telerik.Web.UI.RadAjaxControl.HandleHistory(g._uniqueIDToClientID(this._uniqueID),e.get_request().get_body()); }if(g._form.__EVENTTARGET&&g._form.__EVENTTARGET.value){this.__EVENTTARGET=g._form.__EVENTTARGET.value; }else{this.__EVENTTARGET=e.get_postBackElement().id; }if(e.get_postBackElement().name){this.__EVENTTARGET=e.get_postBackElement().name; }this.__EVENTARGUMENT=g._form.__EVENTARGUMENT.value; var d=new Telerik.Web.UI.RadAjaxRequestEventArgs(this.__EVENTTARGET,g._form.__EVENTARGUMENT.value,this._enableAJAX); var b=this.fireEvent(this,"OnRequestStart",[d]); if(d.get_cancel()||(typeof(b)!="undefined"&&!b)){e.set_cancel(true); return; }if(!d._enableAjax||!d.EnableAjax){e.set_cancel(true); g._form.__EVENTTARGET.value=this.__EVENTTARGET; g._form.__EVENTARGUMENT.value=this.__EVENTARGUMENT; g._form.submit(); return; }this._isRequestInProgress=true; this._attachRequestHandlers(g,e,true); },_endRequest:function(k,h){var a=this.context; k.remove_endRequest(a._endRequestHandler); for(var j=0,e=Telerik.Web.UI.RadAjaxControl.panelsToClear.length; j0){a.__id=this.id; a._executePendingRequest(); }},_queueRequest:function(a,c){c.set_cancel(true); if(this._requestQueue.length>=this._requestQueueSize){return; }var e=c.get_postBackElement(); var d=e.id; if(e.name){d=e.name; }if(a._form.__EVENTTARGET&&a._form.__EVENTTARGET.value){d=a._form.__EVENTTARGET.value; }var b=a._form.__EVENTARGUMENT.value; Array.enqueue(this._requestQueue,[d,b]); },_executePendingRequest:function(){var b=Array.dequeue(this._requestQueue); var e=b[0]; var c=b[1]; if(this._requestQueue.length>0&&this.__id!=""){var a=$find(this.__id); if(a){Array.addRange(a._requestQueue,this._requestQueue); }}var d=Sys.WebForms.PageRequestManager.getInstance(); d._doPostBack(e,c); },_attachRequestHandlers:function(a,e,f){this._endRequestHandler=Function.createDelegate({context:this,id:this.get_id()},this._endRequest); a.add_endRequest(this._endRequestHandler); this._onFormSubmitCompletedHandler=Function.createDelegate(this,this._onFormSubmitCompleted); e.get_request().add_completed(this._onFormSubmitCompletedHandler); if(typeof(e.get_request()._get_eventHandlerList)=="function"){e.get_request()._get_eventHandlerList()._list.completed.reverse(); }else{if(Sys.Observer){var c=Sys.Observer._getContext(e.get_request()); if(c&&c.events){c.events._list.completed.reverse(); }}}if(f){var b=e.get_request().get_body(); var d=(b.lastIndexOf("&")!=b.length-1)?"&":""; b+=d+"RadAJAXControlID="+a._uniqueIDToClientID(this._uniqueID); e.get_request().set_body(b); }},_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,n,c){var a=Sys.WebForms.PageRequestManager.getInstance(); var j=m; var h,k,f,e,i; var l=0; var d=null; var b="|"; var g=[]; while(l=j.length){d=a._findText(j,j.length); break; }if(typeof(a._decodeString)!="undefined"){i=a._decodeString(j.substr(l,k)); }else{i=j.substr(l,k); }l+=k; if(j.charAt(l)!==b){d=a._findText(j,l); break; }l++; if(n!=undefined&&n!=f){continue; }if(c!=undefined&&c!=e){continue; }Array.add(g,{type:f,id:e,content:i}); }return g; },pageLoading:function(a,b){},pageLoaded:function(a,b){},hideLoadingPanels:function(){for(var b=0; b0){return a[0]; }var b=document.createElement("head"); document.documentElement.appendChild(b); return b; },ajaxRequest:function(a){__doPostBack(this._uniqueID,a); },ajaxRequestWithTarget:function(b,a){__doPostBack(b,a); },__doPostBack:function(a,b){var c=Sys.WebForms.PageRequestManager.getInstance()._form; if(c!=null){if(c.__EVENTTARGET!=null){c.__EVENTTARGET.value=a; }if(c.__EVENTARGUMENT!=null){c.__EVENTARGUMENT.value=b; }c.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,d){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="/javascript:''"; c.style.visibility="hidden"; var b=function(j){if(!Telerik.Web.UI.RadAjaxControl.ShouldLoadHistory){Telerik.Web.UI.RadAjaxControl.ShouldLoadHistory=true; return; }var n=""; var k=""; var h=c.contentWindow.document.getElementById("__DATA"); if(!h){return; }var o=h.value.split("&"); for(var l=0,f=o.length; l"); a.contentWindow.document.close(); if(window.netscape){a.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 c=0,b=a.options.length; c1){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(c,b){var f=[]; var d=c; while(1){var a=Telerik.Web.UI.RadAjaxControl.GetTag(d,b); if(a.index==-1){break; }f[f.length]=a; var e=a.index+a.outer.length; d=d.substring(e,d.length); }return f; }; Telerik.Web.UI.RadAjaxControl.GetTag=function(c,b,d){if(typeof(d)=="undefined"){d=""; }var a=new RegExp("<"+b+"[^>]*>((.|\n|\r)*?)","i"); var e=c.match(a); if(e!=null&&e.length>=2){return{outer:e[0],inner:e[1],index:e.index}; }else{return{outer:d,inner:d,index:-1}; }}; Telerik.Web.UI.RadAjaxControl.GetLinkHrefs=function(a){var c=a; var e=[]; while(1){var b=c.match(/]*href=('|")?([^'"]*)('|")?([^>]*)>.*?(<\/link>)?/i); if(b==null||b.length<3){break; }var d=b[2]; e[e.length]=d; var f=b.index+d.length; c=c.substring(f,c.length); }return e; }; Telerik.Web.UI.RadAjaxControl.GetScriptsSrc=function(a){var c=a; var e=[]; while(1){var b=c.match(/]*src=('|")?([^'"]*)('|")?([^>]*)>.*?(<\/script>)?/i); if(b==null||b.length<3){break; }var d=b[2]; e[e.length]=d; var f=b.index+d.length; c=c.substring(f,c.length); }return e; }; 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(b){var a=["showing","hiding"]; this._initializeClientEvents(a); Telerik.Web.UI.RadAjaxLoadingPanel.initializeBase(this,[b]); 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.UniqueID=this._uniqueID; this.MinDisplayTime=this._minDisplayTime; this.InitialDelayTime=this._initialDelayTime; this.IsSticky=this._isSticky; this.Transparency=this._transparency; this.ZIndex=this._zIndex; }; Telerik.Web.UI.RadAjaxLoadingPanel.prototype={initialize:function(){Telerik.Web.UI.RadAjaxLoadingPanel.callBaseMethod(this,"initialize"); },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_animationDuration:function(){return this._animationDuration; },set_animationDuration:function(a){this._animationDuration=a; },show:function(c){var e=$get(c+"_wrapper"); if((typeof(e)=="undefined")||(!e)){e=$get(c); }var d=this.get_element(); if(!(e&&d)){return false; }var f=this._initialDelayTime; var b=this; var a=(!this._isSticky)?this.cloneLoadingPanel(d,c):d; if(f){window.setTimeout(function(){try{if(b._manager!=null&&b._manager._isRequestInProgress){b.displayLoadingElement(a,e); }}catch(g){}},f); }else{this.displayLoadingElement(a,e); }return true; },hide:function(e){var f=$get(e); var j=String.format("{0}_wrapper",e); var a=$get(j); if(a){f=a; }if(this.get_element()==null){var b=$get(Sys.WebForms.PageRequestManager.getInstance()._uniqueIDToClientID(this._uniqueID)); if(b==null){return; }this._element=b; }var c=(!this._isSticky)?$get(this.get_element().id+e):this.get_element(); var k=new Date(); if(c==null){return; }var d=k-c._startDisplayTime; var g=this._minDisplayTime; var h=new Telerik.Web.UI.AjaxLoadingPanelEventArgs(c,f); this.raise_hiding(h); if(!h.get_cancelNativeDisplay()){var i=this.get_animationDuration(); if(this._isSticky){if(g>d){window.setTimeout(function(){if(i>0){$telerik.$(c).fadeOut(i,function(){c.style.display="none"; }); }else{c.style.display="none"; }},g-d); }else{if(i>0){$telerik.$(c).fadeOut(i,function(){c.style.display="none"; }); }else{c.style.display="none"; }}}else{if(g>d){window.setTimeout(function(){if(i>0){$telerik.$(c).fadeOut(i,function(){c.parentNode.removeChild(c); }); }else{c.parentNode.removeChild(c); }},g-d); }else{if(i>0){$telerik.$(c).fadeOut(i,function(){c.parentNode.removeChild(c); }); }else{c.parentNode.removeChild(c); }}}}if(!this._isSticky&&typeof(f)!="undefined"&&(f!=null)){f.style.visibility="visible"; }},cloneLoadingPanel:function(c,b){var a=c.cloneNode(false); a.innerHTML=c.innerHTML; a.id=c.id+b; document.body.insertBefore(a,document.body.firstChild); return a; },displayLoadingElement:function(a,d){if(!this._isSticky){if($telerik.isIE6){this._setDropDownsVisibitily(d,false); }var e=this.getElementRectangle(d); a.style.position="absolute"; a.style.width=e.width+"px"; a.style.height=e.height+"px"; a.style.left=e.left+"px"; a.style.top=e.top+"px"; a.style.textAlign="center"; a.style.zIndex=this._zIndex; }var b=100-parseInt(this._transparency); if(b<100){$telerik.$(a).css("opacity",b/100); }var f=this; hideUpdatedElement=function(){if(b==100&&!f._isSticky){var g=true; if(f.skin!=""){if(typeof a.style.opacity=="undefined"){if($telerik.$(a).css("filter").indexOf("opacity")!=-1||$telerik.$(a.firstChild.nextSibling).css("filter").indexOf("opacity")!=-1){g=false; }}else{if($telerik.$(a).css("opacity")>0||$telerik.$(a.getElementsByClassName("raDiv")[0]).css("opacity")>0){g=false; }}}if(g){d.style.visibility="hidden"; }}}; var c=new Telerik.Web.UI.AjaxLoadingPanelEventArgs(a,d); this.raise_showing(c); if(!c.get_cancelNativeDisplay()){if(this.get_animationDuration()>0){$telerik.$(a).css("opacity",0); a.style.display=""; $telerik.$(a).animate({opacity:b/100},this.get_animationDuration(),hideUpdatedElement); }else{a.style.display=""; hideUpdatedElement(); }}a._startDisplayTime=new Date(); },_setDropDownsVisibitily:function(b,a){if(!b){b=this; }b.className+=" RadAjaxUpdatedElement"; },getElementRectangle:function(b){if(!b){b=this; }var d=$telerik.getLocation(b); var a=d.x; var e=d.y; var c=b.offsetWidth; var f=b.offsetHeight; return{left:a,top:e,width:c,height:f}; },_initializeClientEvents:function(e){if(e){var a=this; for(var c=0,d=e.length; c