PageSourceSearch

https://wineclub.mormoraia.it/bundles/WebFormsJs?v=x-b5yI8eNxEanyl5H6xD7SFtCC5AOXqeBqkytWfKxqU1

js mormoraia.it collected 2026-10-05 22:01:28 UTC 22,411 bytes, 567 lines download raw bytes

1//CdnPath=http://ajax.aspnetcdn.com/ajax/4.5.1/1/WebForms.js
2function WebForm_PostBackOptions(eventTarget, eventArgument, validation, validationGroup, actionUrl, trackFocus, clientSubmit) {
3    this.eventTarget = eventTarget;
4    this.eventArgument = eventArgument;
5    this.validation = validation;
6    this.validationGroup = validationGroup;
7    this.actionUrl = actionUrl;
8    this.trackFocus = trackFocus;
9    this.clientSubmit = clientSubmit;
10}
11function WebForm_DoPostBackWithOptions(options) {
12    var validationResult = true;
13    if (options.validation) {
14        if (typeof(Page_ClientValidate) == 'function') {
15            validationResult = Page_ClientValidate(options.validationGroup);
16        }
17    }
18    if (validationResult) {
19        if ((typeof(options.actionUrl) != "undefined") && (options.actionUrl != null) && (options.actionUrl.length > 0)) {
20            theForm.action = options.actionUrl;
21        }
22        if (options.trackFocus) {
23            var lastFocus = theForm.elements["__LASTFOCUS"];
24            if ((typeof(lastFocus) != "undefined") && (lastFocus != null)) {
25                if (typeof(document.activeElement) == "undefined") {
26                    lastFocus.value = options.eventTarget;
27                }
28                else {
29                    var active = document.activeElement;
30                    if ((typeof(active) != "undefined") && (active != null)) {
31                        if ((typeof(active.id) != "undefined") && (active.id != null) && (active.id.length > 0)) {
32                            lastFocus.value = active.id;
33                        }
34                        else if (typeof(active.name) != "undefined") {
35                            lastFocus.value = active.name;
36                        }
37                    }
38                }
39            }
40        }
41    }
42    if (options.clientSubmit) {
43        __doPostBack(options.eventTarget, options.eventArgument);
44    }
45}
46var __pendingCallbacks = new Array();
47var __synchronousCallBackIndex = -1;
48function WebForm_DoCallback(eventTarget, eventArgument, eventCallback, context, errorCallback, useAsync) {
49    var postData = __theFormPostData +
50                "__CALLBACKID=" + WebForm_EncodeCallback(eventTarget) +
51                "&__CALLBACKPARAM=" + WebForm_EncodeCallback(eventArgument);
52    if (theForm["__EVENTVALIDATION"]) {
53        postData += "&__EVENTVALIDATION=" + WebForm_EncodeCallback(theForm["__EVENTVALIDATION"].value);
54    }
55    var xmlRequest,e;
56    try {
57        xmlRequest = new XMLHttpRequest();
58    }
59    catch(e) {
60        try {
61            xmlRequest = new ActiveXObject("Microsoft.XMLHTTP");
62        }
63        catch(e) {
64        }
65    }
66    var setRequestHeaderMethodExists = true;
67    try {
68        setRequestHeaderMethodExists = (xmlRequest && xmlRequest.setRequestHeader);
69    }
70    catch(e) {}
71    var callback = new Object();
72    callback.eventCallback = eventCallback;
73    callback.context = context;
74    callback.errorCallback = errorCallback;
75    callback.async = useAsync;
76    var callbackIndex = WebForm_FillFirstAvailableSlot(__pendingCallbacks, callback);
77    if (!useAsync) {
78        if (__synchronousCallBackIndex != -1) {
79            __pendingCallbacks[__synchronousCallBackIndex] = null;
80        }
81        __synchronousCallBackIndex = callbackIndex;
82    }
83    if (setRequestHeaderMethodExists) {
84        xmlRequest.onreadystatechange = WebForm_CallbackComplete;
85        callback.xmlRequest = xmlRequest;
86        // e.g. http:
87        var action = theForm.action || document.location.pathname, fragmentIndex = action.indexOf('#');
88        if (fragmentIndex !== -1) {
89            action = action.substr(0, fragmentIndex);
90        }
91        if (!__nonMSDOMBrowser) {
92            var queryIndex = action.indexOf('?');
93            if (queryIndex !== -1) {
94                var path = action.substr(0, queryIndex);
95                if (path.indexOf("%") === -1) {
96                    action = encodeURI(path) + action.substr(queryIndex);
97                }
98            }
99            else if (action.indexOf("%") === -1) {
100                action = encodeURI(action);
101            }
102        }
103        xmlRequest.open("POST", action, true);
104        xmlRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");
105        xmlRequest.send(postData);
106        return;
107    }
108    callback.xmlRequest = new Object();
109    var callbackFrameID = "__CALLBACKFRAME" + callbackIndex;
110    var xmlRequestFrame = document.frames[callbackFrameID];
111    if (!xmlRequestFrame) {
112        xmlRequestFrame = document.createElement("IFRAME");
113        xmlRequestFrame.width = "1";
114        xmlRequestFrame.height = "1";
115        xmlRequestFrame.frameBorder = "0";
116        xmlRequestFrame.id = callbackFrameID;
117        xmlRequestFrame.name = callbackFrameID;
118        xmlRequestFrame.style.position = "absolute";
119        xmlRequestFrame.style.top = "-100px"
120        xmlRequestFrame.style.left = "-100px";
121        try {
122            if (callBackFrameUrl) {
123                xmlRequestFrame.src = callBackFrameUrl;
124            }
125        }
126        catch(e) {}
127        document.body.appendChild(xmlRequestFrame);
128    }
129    var interval = window.setInterval(function() {
130        xmlRequestFrame = document.frames[callbackFrameID];
131        if (xmlRequestFrame && xmlRequestFrame.document) {
132            window.clearInterval(interval);
133            xmlRequestFrame.document.write("");
134            xmlRequestFrame.document.close();
135            xmlRequestFrame.document.write('<html><body><form method="post"><input type="hidden" name="__CALLBACKLOADSCRIPT" value="t"></form></body></html>');
136            xmlRequestFrame.document.close();
137            xmlRequestFrame.document.forms[0].action = theForm.action;
138            var count = __theFormPostCollection.length;
139            var element;
140            for (var i = 0; i < count; i++) {
141                element = __theFormPostCollection[i];
142                if (element) {
143                    var fieldElement = xmlRequestFrame.document.createElement("INPUT");
144                    fieldElement.type = "hidden";
145                    fieldElement.name = element.name;
146                    fieldElement.value = element.value;
147                    xmlRequestFrame.document.forms[0].appendChild(fieldElement);
148                }
149            }
150            var callbackIdFieldElement = xmlRequestFrame.document.createElement("INPUT");
151            callbackIdFieldElement.type = "hidden";
152            callbackIdFieldElement.name = "__CALLBACKID";
153            callbackIdFieldElement.value = eventTarget;
154            xmlRequestFrame.document.forms[0].appendChild(callbackIdFieldElement);
155            var callbackParamFieldElement = xmlRequestFrame.document.createElement("INPUT");
156            callbackParamFieldElement.type = "hidden";
157            callbackParamFieldElement.name = "__CALLBACKPARAM";
158            callbackParamFieldElement.value = eventArgument;
159            xmlRequestFrame.document.forms[0].appendChild(callbackParamFieldElement);
160            if (theForm["__EVENTVALIDATION"]) {
161                var callbackValidationFieldElement = xmlRequestFrame.document.createElement("INPUT");
162                callbackValidationFieldElement.type = "hidden";
163                callbackValidationFieldElement.name = "__EVENTVALIDATION";
164                callbackValidationFieldElement.value = theForm["__EVENTVALIDATION"].value;
165                xmlRequestFrame.document.forms[0].appendChild(callbackValidationFieldElement);
166            }
167            var callbackIndexFieldElement = xmlRequestFrame.document.createElement("INPUT");
168            callbackIndexFieldElement.type = "hidden";
169            callbackIndexFieldElement.name = "__CALLBACKINDEX";
170            callbackIndexFieldElement.value = callbackIndex;
171            xmlRequestFrame.document.forms[0].appendChild(callbackIndexFieldElement);
172            xmlRequestFrame.document.forms[0].submit();
173        }
174    }, 10);
175}
176function WebForm_CallbackComplete() {
177    for (var i = 0; i < __pendingCallbacks.length; i++) {
178        callbackObject = __pendingCallbacks[i];
179        if (callbackObject && callbackObject.xmlRequest && (callbackObject.xmlRequest.readyState == 4)) {
180            if (!__pendingCallbacks[i].async) {
181                __synchronousCallBackIndex = -1;
182            }
183            __pendingCallbacks[i] = null;
184            var callbackFrameID = "__CALLBACKFRAME" + i;
185            var xmlRequestFrame = document.getElementById(callbackFrameID);
186            if (xmlRequestFrame) {
187                xmlRequestFrame.parentNode.removeChild(xmlRequestFrame);
188            }
189            WebForm_ExecuteCallback(callbackObject);
190        }
191    }
192}
193function WebForm_ExecuteCallback(callbackObject) {
194    var response = callbackObject.xmlRequest.responseText;
195    if (response.charAt(0) == "s") {
196        if ((typeof(callbackObject.eventCallback) != "undefined") && (callbackObject.eventCallback != null)) {
197            callbackObject.eventCallback(response.substring(1), callbackObject.context);
198        }
199    }
200    else if (response.charAt(0) == "e") {
201        if ((typeof(callbackObject.errorCallback) != "undefined") && (callbackObject.errorCallback != null)) {
202            callbackObject.errorCallback(response.substring(1), callbackObject.context);
203        }
204    }
205    else {
206        var separatorIndex = response.indexOf("|");
207        if (separatorIndex != -1) {
208            var validationFieldLength = parseInt(response.substring(0, separatorIndex));
209            if (!isNaN(validationFieldLength)) {
210                var validationField = response.substring(separatorIndex + 1, separatorIndex + validationFieldLength + 1);
211                if (validationField != "") {
212                    var validationFieldElement = theForm["__EVENTVALIDATION"];
213                    if (!validationFieldElement) {
214                        validationFieldElement = document.createElement("INPUT");
215                        validationFieldElement.type = "hidden";
216                        validationFieldElement.name = "__EVENTVALIDATION";
217                        theForm.appendChild(validationFieldElement);
218                    }
219                    validationFieldElement.value = validationField;
220                }
221                if ((typeof(callbackObject.eventCallback) != "undefined") && (callbackObject.eventCallback != null)) {
222                    callbackObject.eventCallback(response.substring(separatorIndex + validationFieldLength + 1), callbackObject.context);
223                }
224            }
225        }
226    }
227}
228function WebForm_FillFirstAvailableSlot(array, element) {
229    var i;
230    for (i = 0; i < array.length; i++) {
231        if (!array[i]) break;
232    }
233    array[i] = element;
234    return i;
235}
236var __nonMSDOMBrowser = (window.navigator.appName.toLowerCase().indexOf('explorer') == -1);
237var __theFormPostData = "";
238var __theFormPostCollection = new Array();
239var __callbackTextTypes = /^(text|password|hidden|search|tel|url|email|number|range|c
239olor|datetime|date|month|week|time|datetime-local)$/i;
240function WebForm_InitCallback() {
241    var formElements = theForm.elements,
242        count = formElements.length,
243        element;
244    for (var i = 0; i < count; i++) {
245        element = formElements[i];
246        var tagName = element.tagName.toLowerCase();
247        if (tagName == "input") {
248            var type = element.type;
249            if ((__callbackTextTypes.test(type) || ((type == "checkbox" || type == "radio") && element.checked))
250                && (element.id != "__EVENTVALIDATION")) {
251                WebForm_InitCallbackAddField(element.name, element.value);
252            }
253        }
254        else if (tagName == "select") {
255            var selectCount = element.options.length;
256            for (var j = 0; j < selectCount; j++) {
257                var selectChild = element.options[j];
258                if (selectChild.selected == true) {
259                    WebForm_InitCallbackAddField(element.name, element.value);
260                }
261            }
262        }
263        else if (tagName == "textarea") {
264            WebForm_InitCallbackAddField(element.name, element.value);
265        }
266    }
267}
268function WebForm_InitCallbackAddField(name, value) {
269    var nameValue = new Object();
270    nameValue.name = name;
271    nameValue.value = value;
272    __theFormPostCollection[__theFormPostCollection.length] = nameValue;
273    __theFormPostData += WebForm_EncodeCallback(name) + "=" + WebForm_EncodeCallback(value) + "&";
274}
275function WebForm_EncodeCallback(parameter) {
276    if (encodeURIComponent) {
277        return encodeURIComponent(parameter);
278    }
279    else {
280        return escape(parameter);
281    }
282}
283var __disabledControlArray = new Array();
284function WebForm_ReEnableControls() {
285    if (typeof(__enabledControlArray) == 'undefined') {
286        return false;
287    }
288    var disabledIndex = 0;
289    for (var i = 0; i < __enabledControlArray.length; i++) {
290        var c;
291        if (__nonMSDOMBrowser) {
292            c = document.getElementById(__enabledControlArray[i]);
293        }
294        else {
295            c = document.all[__enabledControlArray[i]];
296        }
297        if ((typeof(c) != "undefined") && (c != null) && (c.disabled == true)) {
298            c.disabled = false;
299            __disabledControlArray[disabledIndex++] = c;
300        }
301    }
302    setTimeout("WebForm_ReDisableControls()", 0);
303    return true;
304}
305function WebForm_ReDisableControls() {
306    for (var i = 0; i < __disabledControlArray.length; i++) {
307        __disabledControlArray[i].disabled = true;
308    }
309}
310function WebForm_SimulateClick(element, event) {
311    var clickEvent;
312    if (element) {
313        if (element.click) {
314            element.click();
315        } else { 
316            clickEvent = document.createEvent("MouseEvents");
317            clickEvent.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
318            if (!element.dispatchEvent(clickEvent)) {
319                return true;
320            }
321        }
322        event.cancelBubble = true;
323        if (event.stopPropagation) {
324            event.stopPropagation();
325        }
326        return false;
327    }
328    return true;
329}
330function WebForm_FireDefaultButton(event, target) {
331    if (event.keyCode == 13) {
332        var src = event.srcElement || event.target;
333        if (src &&
334            ((src.tagName.toLowerCase() == "input") &&
335             (src.type.toLowerCase() == "submit" || src.type.toLowerCase() == "button")) ||
336            ((src.tagName.toLowerCase() == "a") &&
337             (src.href != null) && (src.href != "")) ||
338            (src.tagName.toLowerCase() == "textarea")) {
339            return true;
340        }
341        var defaultButton;
342        if (__nonMSDOMBrowser) {
343            defaultButton = document.getElementById(target);
344        }
345        else {
346            defaultButton = document.all[target];
347        }
348        if (defaultButton) {
349            return WebForm_SimulateClick(defaultButton, event);
350        } 
351    }
352    return true;
353}
354function WebForm_GetScrollX() {
355    if (__nonMSDOMBrowser) {
356        return window.pageXOffset;
357    }
358    else {
359        if (document.documentElement && document.documentElement.scrollLeft) {
360            return document.documentElement.scrollLeft;
361        }
362        else if (document.body) {
363            return document.body.scrollLeft;
364        }
365    }
366    return 0;
367}
368function WebForm_GetScrollY() {
369    if (__nonMSDOMBrowser) {
370        return window.pageYOffset;
371    }
372    else {
373        if (document.documentElement && document.documentElement.scrollTop) {
374            return document.documentElement.scrollTop;
375        }
376        else if (document.body) {
377            return document.body.scrollTop;
378        }
379    }
380    return 0;
381}
382function WebForm_SaveScrollPositionSubmit() {
383    if (__nonMSDOMBrowser) {
384        theForm.elements['__SCROLLPOSITIONY'].value = window.pageYOffset;
385        theForm.elements['__SCROLLPOSITIONX'].value = window.pageXOffset;
386    }
387    else {
388        theForm.__SCROLLPOSITIONX.value = WebForm_GetScrollX();
389        theForm.__SCROLLPOSITIONY.value = WebForm_GetScrollY();
390    }
391    if ((typeof(this.oldSubmit) != "undefined") && (this.oldSubmit != null)) {
392        return this.oldSubmit();
393    }
394    return true;
395}
396function WebForm_SaveScrollPositionOnSubmit() {
397    theForm.__SCROLLPOSITIONX.value = WebForm_GetScrollX();
398    theForm.__SCROLLPOSITIONY.value = WebForm_GetScrollY();
399    if ((typeof(this.oldOnSubmit) != "undefined") && (this.oldOnSubmit != null)) {
400        return this.oldOnSubmit();
401    }
402    return true;
403}
404function WebForm_RestoreScrollPosition() {
405    if (__nonMSDOMBrowser) {
406        window.scrollTo(theForm.elements['__SCROLLPOSITIONX'].value, theForm.elements['__SCROLLPOSITIONY'].value);
407    }
408    else {
409        window.scrollTo(theForm.__SCROLLPOSITIONX.value, theForm.__SCROLLPOSITIONY.value);
410    }
411    if ((typeof(theForm.oldOnLoad) != "undefined") && (theForm.oldOnLoad != null)) {
412        return theForm.oldOnLoad();
413    }
414    return true;
415}
416function WebForm_TextBoxKeyHandler(event) {
417    if (event.keyCode == 13) {
418        var target;
419        if (__nonMSDOMBrowser) {
420            target = event.target;
421        }
422        else {
423            target = event.srcElement;
424        }
425        if ((typeof(target) != "undefined") && (target != null)) {
426            if (typeof(target.onchange) != "undefined") {
427                target.onchange();
428                event.cancelBubble = true;
429                if (event.stopPropagation) event.stopPropagation();
430                return false;
431            }
432        }
433    }
434    return true;
435}
436function WebForm_TrimString(value) {
437    return value.replace(/^\s+|\s+$/g, '')
438}
439function WebForm_AppendToClassName(element, className) {
440    var currentClassName = ' ' + WebForm_TrimString(element.className) + ' ';
441    className = WebForm_TrimString(className);
442    var index = currentClassName.indexOf(' ' + className + ' ');
443    if (index === -1) {
444        element.className = (element.className === '') ? className : element.className + ' ' + className;
445    }
446}
447function WebForm_RemoveClassName(element, className) {
448    var currentClassName = ' ' + WebForm_TrimString(element.className) + ' ';
449    className = WebForm_TrimString(className);
450    var index = currentClassName.indexOf(' ' + className + ' ');
451    if (index >= 0) {
452        element.className = WebForm_TrimString(currentClassName.substring(0, index) + ' ' +
453            currentClassName.substring(index + className.length + 1, currentClassName.length));
454    }
455}
456function WebForm_GetElementById(elementId) {
457    if (document.getElementById) {
458        return document.getElementById(elementId);
459    }
460    else if (document.all) {
461        return document.all[elementId];
462    }
463    else return null;
464}
465function WebForm_GetElementByTagName(element, tagName) {
466    var elements = WebForm_GetElementsByTagName(element, tagName);
467    if (elements && elements.length > 0) {
468        return elements[0];
469    }
470    else return null;
471}
472function WebForm_GetElementsByTagName(element, tagName) {
473    if (element && tagName) {
474        if (element.getElementsByTagName) {
475            return element.getElementsByTagName(tagName);
476        }
477        if (element.all && element.all.tags) {
478            return element.all.tags(tagName);
479        }
480    }
481    return null;
482}
483function WebForm_GetElementDir(element) {
484    if (element) {
485        if (element.dir) {
486            return element.dir;
487        }
488        return WebForm_GetElementDir(element.parentNode);
489    }
490    return "ltr";
491}
492function WebForm_GetElementPosition(element) {
493    var result = new Object();
494    result.x = 0;
495    result.y = 0;
496    result.width = 0;
497    result.height = 0;
498    if (element.offsetParent) {
499        result.x = element.offsetLeft;
500        result.y = element.offsetTop;
501        var parent = element.offsetParent;
502        while (parent) {
503            result.x += parent.offsetLeft;
504            result.y += parent.offsetTop;
505            var parentTagName = parent.tagName.toLowerCase();
506            if (parentTagName != "table" &&
507                parentTagName != "body" && 
508                parentTagName != "html" && 
509                parentTagName != "div" && 
510                parent.clientTop && 
511                parent.clientLeft) {
512                result.x += parent.clientLeft;
513                result.y += parent.clientTop;
514            }
515            parent = parent.offsetParent;
516        }
517    }
518    else if (element.left && element.top) {
519        result.x = element.left;
520        result.y = element.top;
521    }
522    else {
523        if (element.x) {
524            result.x = element.x;
525        }
526        if (element.y) {
527            result.y = element.y;
528        }
529    }
530    if (element.offsetWidth && element.offsetHeight) {
531        result.width = element.offsetWidth;
532        result.height = element.offsetHeight;
533    }
534    else if (element.style && element.style.pixelWidth && element.style.pixelHeight) {
535        result.width = element.style.pixelWidth;
536        result.height = element.style.pixelHeight;
537    }
538    return result;
539}
540function WebForm_GetParentByTagName(element, tagName) {
541    var parent = element.parentNode;
542    var upperTagName = tagName.toUpperCase();
543    while (parent && (parent.tagName.toUpperCase() != upperTagName)) {
544        parent = parent.parentNode ? parent.parentNode : parent.parentElement;
545    }
546    return parent;
547}
548function WebForm_SetElementHeight(element, height) {
549    if (element && element.style) {
550        element.style.height = height + "px";
551    }
552}
553function WebForm_SetElementWidth(element, width) {
554    if (element && element.style) {
555        element.style.width = width + "px";
556    }
557}
558function WebForm_SetElementX(element, x) {
559    if (element && element.style) {
560        element.style.left = x + "px";
561    }
562}
563function WebForm_SetElementY(element, y) {
564    if (element && element.style) {
565        element.style.top = y + "px";
566    }
567};

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.