1Type.registerNamespace("Telerik.Web.UI"); 2Type.registerNamespace("Telerik.Web.UI.Captcha"); 3(function(){Telerik.Web.UI.RadCaptcha=function(e){Telerik.Web.UI.RadCaptcha.initializeBase(this,[e]); 4this._audioElement=null; 5this._objectElement=null; 6this._audioUrl=null; 7this._enableAudio=false; 8this._persistCode=false; 9this._enableMissingPluginNotification=false; 10this._enableDownloadAudio=false; 11this._focusCssClass="rcFocusTxt"; 12}; 13$telerik.toCaptcha=function(e){return e; 14}; 15$telerik.findCaptcha=$find; 16Telerik.Web.UI.RadCaptcha.prototype={initialize:function(){Telerik.Web.UI.RadCaptcha.callBaseMethod(this,"initialize"); 17var e=this.get_textBox(); 18if(e){e.setAttribute("autoComplete","off"); 19this._focusTxtDelegate=Function.createDelegate(this,this._focusTxtHandler); 20$addHandler(e,"focus",this._focusTxtDelegate); 21this._blurTxtDelegate=Function.createDelegate(this,this._blurTxtHandler); 22$addHandler(e,"blur",this._blurTxtDelegate); 23}if(this.get_enableAudio()){this._initCaptchaAudio(); 24this._managePluginNotificationVisibility(!this._captchaAudio.canPlay&&this._enableMissingPluginNotification); 25this._manageDownloadLinkVisibility(this._enableDownloadAudio); 26this._manageAudioLinkVisibility(!(!this._captchaAudio.canPlay&&this._enableDownloadAudio)); 27this._setupAudioLink(); 28this._setAudioUrlDelegate=Function.createDelegate(this,this._setAudioUrl); 29Sys.WebForms.PageRequestManager.getInstance().add_endRequest(this._setAudioUrlDelegate); 30}this.raiseEvent("load",Sys.EventArgs.Empty); 31},dispose:function(){if(this.get_audioLink()){$clearHandlers(this.get_audioLink()); 32}if(this._setAudioUrlDelegate){Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(this._setAudioUrlDelegate); 33}if(this._captchaAudio){this._captchaAudio.dispose(); 34delete this._captchaAudio; 35}var e=this.get_textBox(); 36if(e){$removeHandler(e,"focus",this._focusTxtDelegate); 37$removeHandler(e,"blur",this._blurTxtDelegate); 38delete this._focusTxtDelegate; 39delete this._blurTxtDelegate; 40}Telerik.Web.UI.RadCaptcha.callBaseMethod(this,"dispose"); 41},get_textBox:function(){if(!this._txt){this._txt=this._getChildElement("CaptchaTextBox"); 42}return this._txt; 43},get_textBoxLabel:function(){if(!this._label){this._label=this._getChildElement("CaptchaTextBoxLabel"); 44}return this._label; 45},_focusTxtHandler:function(f){Sys.UI.DomElement.addCssClass(this._txt,this._focusCssClass); 46},_blurTxtHandler:function(f){Sys.UI.DomElement.removeCssClass(this._txt,this._focusCssClass); 47},setFocusTxtCssClass:function(e){this._focusCssClass=e; 48},get_audioUrl:function(){return this._audioUrl; 49},set_audioUrl:function(e){this._audioUrl=e; 50},get_enableAudio:function(){return this._enableAudio; 51},set_enableAudio:function(e){this._enableAudio=e; 52},get_audioLink:function(){var e=this._getChildElement("CaptchaAudioCode"); 53if(!e){e=this._getChildElement("CaptchaAudioCodeUP"); 54}return e; 55},onAudioPlay:function(f){this._captchaAudio.play(); 56return $telerik.cancelRawEvent(f); 57},_initCaptchaAudio:function(){if(this._captchaAudio&&this._captchaAudio.dispose){this._captchaAudio.dispose(); 58delete this._captchaAudio; 59}var e=$telerik.isChrome||this._persistCode; 60this._captchaAudio=new Telerik.Web.UI.Captcha.CaptchaAudio(this.get_element(),this.get_audioUrl(),e); 61},_setupAudioLink:function(){var e=this.get_audioLink(); 62if(e){e.setAttribute("href","#"); 63this._audioPlayDelegate=Function.createDelegate(this,this.onAudioPlay); 64$telerik.addHandler(e,"click",this._audioPlayDelegate,false); 65}},_managePluginNotificationVisibility:function(e){this._manageItemVisiblity("PluginNotificationPanel",e); 66},_manageDownloadLinkVisibility:function(e){this._manageItemVisiblity("CaptchaDownloadAudioCode",e); 67this._manageItemVisiblity("CaptchaDownloadAudioCodeUP",e); 68},_manageAudioLinkVisibility:function(e){this._manageItemVisiblity("CaptchaAudioCode",e); 69this._manageItemVisiblity("CaptchaAudioCodeUP",e); 70},_manageItemVisiblity:function(g,e){var f=this._getChildElement(g); 71if(f){f.style.display=e?"block":"none"; 72}},_setAudioUrl:function(h,e){var f=this.get_audioLink(); 73if(f){var g=f.getAttribute("href",2); 74if(g&&g!="#"){this.set_audioUrl(g); 75this._setupAudioLink(); 76this._initCaptchaAudio(); 77}}},add_load:function(e){this.get_events().addHandler("load",e); 78},remove_load:function(e){this.get_events().removeHandler("load",e); 79}}; 80Telerik.Web.UI.RadCaptcha.registerClass("Telerik.Web.UI.RadCaptcha",Telerik.Web.UI.RadWebControl); 81Telerik.Web.UI.Captcha.CaptchaAudio=function(f,e,g){this.domElement=null; 82this.canPlay=false; 83this._url=e; 84this._parentElement=f; 85this._reload=g; 86this.initialize(); 87}; 88Telerik.Web.UI.Captcha.CaptchaAudio.prototype={initialize:function(){var e=this; 89if(e._canPlayHtmlAudio()||e._canPlayWithPlugin()){e.canPlay=true; 90e._createDomElement(); 91if(e._parentElement){e._parentElement.appendChild(e.domElement); 92}}},dispose:function(){if(this.domElement&&this._parentElement){this.domElement.parentNode.removeChild(this.domElement); 93delete this.domElement; 94}},play:function(){try{if(this._reload&&this.domElement.load){this.domElement.load(); 95}this.domElement.play(); 96}catch(f){return false;
97}return true; 98},pause:function(){},stop:function(){},_createDomElement:function(){if(this._canPlayHtmlAudio()){this.domElement=this._createAudioElement(this._url); 99}else{this.domElement=this._createEmbedElement(this._url); 100}},_createAudioElement:function(f){var e=document.createElement("audio"); 101e.setAttribute("src",f); 102e.setAttribute("preload","none"); 103e.style.position="absolute"; 104e.style.top=0; 105e.style.left=0; 106return e; 107},_createEmbedElement:function(f){var e=document.createElement("embed"); 108e.setAttribute("src",f); 109e.setAttribute("autostart","false"); 110e.setAttribute("pluginspage",Telerik.Web.BrowserPlugins.QuickTimePlayer?"http://www.apple.com/quicktime/download/":"http://www.microsoft.com/Windows/MediaPlayer"); 111e.setAttribute("enablejavascript","true"); 112e.setAttribute("type","audio/wav"); 113e.setAttribute("tabIndex","-1"); 114e.style.width="0px"; 115e.style.hegiht="0px"; 116e.style.position="absolute"; 117e.style.top=0; 118e.style.left=0; 119return e; 120},_canPlayHtmlAudio:function(){return Telerik.Web.BrowserFeatures.nativeAudio.wave; 121},_canPlayWithPlugin:function(){return Telerik.Web.BrowserPlugins.QuickTimePlayer||Telerik.Web.BrowserPlugins.WindowsMediaPlayer; 122}}; 123Telerik.Web.UI.Captcha.CaptchaAudio.registerClass("Telerik.Web.UI.Captcha.CaptchaAudio",null); 124var a=document.createElement("audio"); 125function c(h){var g=false; 126try{g=!!(a.canPlayType&&a.canPlayType(h).replace(/no/gi,"")); 127}catch(f){}return g; 128}Telerik.Web.BrowserFeatures.addSuite("nativeAudio",{wave:c("audio/wav"),mp3:c("audio/mpeg"),ogg:c("audio/ogg")}); 129function d(f){var h=navigator.plugins; 130for(var e=0; 131e<h.length; 132e++){var g=h[e].name; 133if(g.indexOf(f)!==-1){return true; 134}}return false; 135}function b(h){try{var f=new ActiveXObject(h); 136return !!f; 137}catch(g){return false; 138}}Telerik.Web.BrowserPlugins.addTest("AdobeAcrobat",function(){if(window.ActiveXObject){return b("AcroPDF.PDF")||b("PDF.PdfCtrl"); 139}else{return d("Adobe Acrobat")||d("Adobe PDF"); 140}}); 141Telerik.Web.BrowserPlugins.addTest("FlashPlayer",function(){if(window.ActiveXObject){return b("ShockwaveFlash.ShockwaveFlash"); 142}else{return d("Shockwave Flash"); 143}}); 144Telerik.Web.BrowserPlugins.addTest("QuickTimePlayer",function(){if(window.ActiveXObject){return b("QuickTime.QuickTime")||b("QuickTimeCheckObject.QuickTimeCheck"); 145}else{return d("QuickTime Plug-in"); 146}}); 147Telerik.Web.BrowserPlugins.addTest("WindowsMediaPlayer",function(){if(window.ActiveXObject){return b("WMPlayer.OCX"); 148}else{return d("Windows Media"); 149}}); 150Telerik.Web.BrowserPlugins.addTest("Silverlight",function(){if(window.ActiveXObject){return b("AgControl.AgControl"); 151}else{return d("Silverlight Plug-In"); 152}}); 153})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.