window.ApplicationPath = '/'; function LOADLAZYCONTROL( ctrlID, context, idx, headerInfo, noCache ) { var obj = new AjaxMethod( 'LOADLAZYCONTROL' ); obj.Data = new Dictionary(); obj.Data.Add('ctrlID', ctrlID); obj.Data.Add('context', context); obj.CallBackFunction = EndLOADLAZYCONTROL; obj.AllowCache = !noCache; obj.RequiresPost = true; obj.ReturnType = 1; obj.HeaderData = headerInfo; obj.Index = idx; obj.ErrorCallBack = function(ex){ alert( 'Erro:'+ex ); }; obj.Execute(); } /*NOSTUB*/function EndLOADLAZYCONTROL(html, asyncObj) { document.getElementById( 'lazyControl'+asyncObj.Index ).innerHTML = html } function AjaxMethod(id, data, callBackFunction, allowCache, requiresPost, returnType, headerData, errorCallBack, jsReturnType) { if (window.XMLHttpRequest) this.XmlHttp = new XMLHttpRequest(); else if (window.ActiveXObject) this.XmlHttp = new ActiveXObject('Microsoft.XMLHTTP'); this.Id = id; this.Data = data; this.RequiresPost = requiresPost; this.ReturnType = !returnType?0:returnType; this.HeaderData = headerData; this.AllowCache = allowCache; this.CallBackFunction = callBackFunction; this.ErrorCallBack = errorCallBack; this.SupportBackButton = false; this.jsReturnType = jsReturnType; this.GetURL = function() { var rt = 'http://'+window.location.host+'//AjaxMethod/'+id+'.ashx?ajax=1'; if( !this.RequiresPost ) rt += this.GetData(); if( this.AllowCache ) rt += '&NOCACHE'+new String (Math.random()).substring (2, 11)+'='+ new String (Math.random()).substring (2, 11); return rt; } this.GetData = function() { var parameters = ((!arguments.length||!arguments[0])?'&':''); for(var i=0; i