PageSourceSearch

https://www.ergosum.com.br/admin/js/?f=jquery.md5,jquery.blockUI-2.38,ErgoSum-1.2

js ergosum.com.br collected 2026-10-05 03:13:52 UTC 40,908 bytes, 1,052 lines download raw bytes

1/* 
2
3© 2008-2026. Todos os direitos reservados. 
4
5por Aristides da Silva Neto
6[email protected]
7
8PROIBIDA REPRODUÇÃO TOTAL OU PARCIAL DESTE ARQUIVO
9
10*/
11
12/* --- jquery.md5.js ---*/
13/*
14	jQuery MD5 hash algorithm function
15*/
16
17(function($){var rotateLeft=function(lValue,iShiftBits){return(lValue<<iShiftBits)|(lValue>>>(32-iShiftBits));}
18var addUnsigned=function(lX,lY){var lX4,lY4,lX8,lY8,lResult;lX8=(lX&0x80000000);lY8=(lY&0x80000000);lX4=(lX&0x40000000);lY4=(lY&0x40000000);lResult=(lX&0x3FFFFFFF)+(lY&0x3FFFFFFF);if(lX4&lY4)return(lResult^0x80000000^lX8^lY8);if(lX4|lY4){if(lResult&0x40000000)return(lResult^0xC0000000^lX8^lY8);else return(lResult^0x40000000^lX8^lY8);}else{return(lResult^lX8^lY8);}}
19var F=function(x,y,z){return(x&y)|((~x)&z);}
20var G=function(x,y,z){return(x&z)|(y&(~z));}
21var H=function(x,y,z){return(x^y^z);}
22var I=function(x,y,z){return(y^(x|(~z)));}
23var FF=function(a,b,c,d,x,s,ac){a=addUnsigned(a,addUnsigned(addUnsigned(F(b,c,d),x),ac));return addUnsigned(rotateLeft(a,s),b);};var GG=function(a,b,c,d,x,s,ac){a=addUnsigned(a,addUnsigned(addUnsigned(G(b,c,d),x),ac));return addUnsigned(rotateLeft(a,s),b);};var HH=function(a,b,c,d,x,s,ac){a=addUnsigned(a,addUnsigned(addUnsigned(H(b,c,d),x),ac));return addUnsigned(rotateLeft(a,s),b);};var II=function(a,b,c,d,x,s,ac){a=addUnsigned(a,addUnsigned(addUnsigned(I(b,c,d),x),ac));return addUnsigned(rotateLeft(a,s),b);};var convertToWordArray=function(string){var lWordCount;var lMessageLength=string.length;var lNumberOfWordsTempOne=lMessageLength+8;var lNumberOfWordsTempTwo=(lNumberOfWordsTempOne-(lNumberOfWordsTempOne%64))/64;var lNumberOfWords=(lNumberOfWordsTempTwo+1)*16;var lWordArray=Array(lNumberOfWords-1);var lBytePosition=0;var lByteCount=0;while(lByteCount<lMessageLength){lWordCount=(lByteCount-(lByteCount%4))/4;lBytePosition=(lByteCount%4)*8;lWordArray[lWordCount]=(lWordArray[lWordCount]|(string.charCodeAt(lByteCount)<<lBytePosition));lByteCount++;}
24lWordCount=(lByteCount-(lByteCount%4))/4;lBytePosition=(lByteCount%4)*8;lWordArray[lWordCount]=lWordArray[lWordCount]|(0x80<<lBytePosition);lWordArray[lNumberOfWords-2]=lMessageLength<<3;lWordArray[lNumberOfWords-1]=lMessageLength>>>29;return lWordArray;};var wordToHex=function(lValue){var WordToHexValue="",WordToHexValueTemp="",lByte,lCount;for(lCount=0;lCount<=3;lCount++){lByte=(lValue>>>(lCount*8))&255;WordToHexValueTemp="0"+lByte.toString(16);WordToHexValue=WordToHexValue+WordToHexValueTemp.substr(WordToHexValueTemp.length-2,2);}
25return WordToHexValue;};var uTF8Encode=function(string){string=string.replace(/\x0d\x0a/g,"\x0a");var output="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){output+=String.fromCharCode(c);}else if((c>127)&&(c<2048)){output+=String.fromCharCode((c>>6)|192);output+=String.fromCharCode((c&63)|128);}else{output+=String.fromCharCode((c>>12)|224);output+=String.fromCharCode(((c>>6)&63)|128);output+=String.fromCharCode((c&63)|128);}}
26return output;};$.extend({md5:function(string){var x=Array();var k,AA,BB,CC,DD,a,b,c,d;var S11=7,S12=12,S13=17,S14=22;var S21=5,S22=9,S23=14,S24=20;var S31=4,S32=11,S33=16,S34=23;var S41=6,S42=10,S43=15,S44=21;string=uTF8Encode(string);x=convertToWordArray(string);a=0x67452301;b=0xEFCDAB89;c=0x98BADCFE;d=0x10325476;for(k=0;k<x.length;k+=16){AA=a;BB=b;CC=c;DD=d;a=FF(a,b,c,d,x[k+0],S11,0xD76AA478);d=FF(d,a,b,c,x[k+1],S12,0xE8C7B756);c=FF(c,d,a,b,x[k+2],S13,0x242070DB);b=FF(b,c,d,a,x[k+3],S14,0xC1BDCEEE);a=FF(a,b,c,d,x[k+4],S11,0xF57C0FAF);d=FF(d,a,b,c,x[k+5],S12,0x4787C62A);c=FF(c,d,a,b,x[k+6],S13,0xA8304613);b=FF(b,c,d,a,x[k+7],S14,0xFD469501);a=FF(a,b,c,d,x[k+8],S11,0x698098D8);d=FF(d,a,b,c,x[k+9],S12,0x8B44F7AF);c=FF(c,d,a,b,x[k+10],S13,0xFFFF5BB1);b=FF(b,c,d,a,x[k+11],S14,0x895CD7BE);a=FF(a,b,c,d,x[k+12],S11,0x6B901122);d=FF(d,a,b,c,x[k+13],S12,0xFD987193);c=FF(c,d,a,b,x[k+14],S13,0xA679438E);b=FF(b,c,d,a,x[k+15],S14,0x49B40821);a=GG(a,b,c,d,x[k+1],S21,0xF61E2562);d=GG(d,a,b,c,x[k+6],S22,0xC040B340);c=GG(c,d,a,b,x[k+11],S23,0x265E5A51);b=GG(b,c,d,a,x[k+0],S24,0xE9B6C7AA);a=GG(a,b,c,d,x[k+5],S21,0xD62F105D);d=GG(d,a,b,c,x[k+10],S22,0x2441453);c=GG(c,d,a,b,x[k+15],S23,0xD8A1E681);b=GG(b,c,d,a,x[k+4],S24,0xE7D3FBC8);a=GG(a,b,c,d,x[k+9],S21,0x21E1CDE6);d=GG(d,a,b,c,x[k+14],S22,0xC33707D6);c=GG(c,d,a,b,x[k+3],S23,0xF4D50D87);b=GG(b,c,d,a,x[k+8],S24,0x455A14ED);a=GG(a,b,c,d,x[k+13],S21,0xA9E3E905);d=GG(d,a,b,c,x[k+2],S22,0xFCEFA3F8);c=GG(c,d,a,b,x[k+7],S23,0x676F02D9);b=GG(b,c,d,a,x[k+12],S24,0x8D2A4C8A);a=HH(a,b,c,d,x[k+5],S31,0xFFFA3942);d=HH(d,a,b,c,x[k+8],S32,0x8771F681);c=HH(c,d,a,b,x[k+11],S33,0x6D9D6122);b=HH(b,c,d,a,x[k+14],S34,0xFDE5380C);a=HH(a,b,c,d,x[k+1],S31,0xA4BEEA44);d=HH(d,a,b,c,x[k+4],S32,0x4BDECFA9);c=HH(c,d,a,b,x[k+7],S33,0xF6BB4B60);b=HH(b,c,d,a,x[k+10],S34,0xBEBFBC70);a=HH(a,b,c,d,x[k+13],S31,0x289B7EC6);d=HH(d,a,b,c,x[k+0],S32,0xEAA127FA);c=HH(c,d,a,b,x[k+3],S33,0xD4EF3085);b=HH(b,c,d,a,x[k+6],S34,0x4881D05);a=HH(a,b,c,d,x[k+9],S31,0xD9D4D039);d=HH(d,a,b,c,x[k+12],S32,0xE6DB99E5);c=HH(c,d,a,b,x[k+15],S33,0x1FA27CF8);b=HH(b,c,d,a,x[k+2],S34,0xC4AC5665);a=II(a,b,c,d,x[k+0],S41,0xF4292244);d=II(d,a,b,c,x[k+7],S42,0x432AFF97);c=II(c,d,a,b,x[k+14],S43,0xAB9423A7);b=II(b,c,d,a,x[k+5],S44,0xFC93A039);a=II(a,b,c,d,x[k+12],S41,0x655B59C3);d=II(d,a,b,c,x[k+3],S42,0x8F0CCC92);c=II(c,d,a,b,x[k+10],S43,0xFFEFF47D);b=II(b,c,d,a,x[k+1],S44,0x85845DD1);a=II(a,b,c,d,x[k+8],S41,0x6FA87E4F);d=II(d,a,b,c,x[k+15],S42,0xFE2CE6E0);c=II(c,d,a,b,x[k+6],S43,0xA3014314);b=II(b,c,d,a,x[k+13],S44,0x4E0811A1);a=II(a,b,c,d,x[k+4],S41,0xF7537E82);d=II(d,a,b,c,x[k+11],S42,0xBD3AF235);c=II(c,d,a,b,x[k+2],S43,0x2AD7D2BB);b=II(b,c,d,a,x[k+9],S44,0xEB86D391);a=addUnsigned(a,AA);b=addUnsigned(b,BB);c=addUnsigned(c,CC);d=addUnsigned(d,DD);}
27var tempValue=wordToHex(a)+wordToHex(b)+wordToHex(c)+wordToHex(d);return tempValue.toLowerCase();}});})(jQuery);
28
29/* --- jquery.blockUI-2.38.js ---*/
30/*!
31 * jQuery blockUI plugin
32 * Version 2.38 (29-MAR-2011)
33 * @requires jQuery v1.2.3 or later
34 *
35 * Examples at: http://malsup.com/jquery/block/
36 * Copyright (c) 2007-2010 M. Alsup
37 * Dual licensed under the MIT and GPL licenses:
38 * http://www.opensource.org/licenses/mit-license.php
39 * http://www.gnu.org/licenses/gpl.html
40 *
41 * Thanks to Amir-Hossein Sobhi for some excellent contributions!
42 */
43
44;(function($) {
45
46if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) {
47	alert('blockUI requires jQuery v1.2.3 or later!  You are using v' + $.fn.jquery);
48	return;
49}
50
51$.fn._fadeIn = $.fn.fadeIn;
52
53var noOp = function() {};
54
55// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
56// retarded userAgent strings on Vista)
57var mode = document.documentMode || 0;
58var setExpr = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8);
59var ie6 = $.browser.msie && /MSIE 6.0/.test(navigator.userAgent) && !mode;
60
61// global $ methods for blocking/unblocking the entire page
62$.blockUI   = function(opts) { install(window, opts); };
63$.unblockUI = function(opts) { remove(window, opts); };
64
65// convenience method for quick growl-like notifications  (http://www.google.com/search?q=growl)
66$.growlUI = function(title, message, timeout, onClose) {
67	var $m = $('<div class="growlUI"></div>');
68	if (title) $m.append('<h1>'+title+'</h1>');
69	if (message) $m.append('<h2>'+message+'</h2>');
70	if (timeout == undefined) timeout = 3000;
71	$.blockUI({
72		message: $m, fadeIn: 700, fadeOut: 1000, centerY: false,
73		timeout: timeout, showOverlay: false,
74		onUnblock: onClose, 
75		css: $.blockUI.defaults.growlCSS
76	});
77};
78
79// plugin method for blocking element content
80$.fn.block = function(opts) {
81	return this.unblock({ fadeOut: 0 }).each(function() {
82		if ($.css(this,'position') == 'static')
83			this.style.position = 'relative';
84		if ($.browser.msie)
85			this.style.zoom = 1; // force 'hasLayout'
86		install(this, opts);
87	});
88};
89
90// plugin method for unblocking element content
91$.fn.unblock = function(opts) {
92	return this.each(function() {
93		remove(this, opts);
94	});
95};
96
97$.blockUI.version = 2.38; // 2nd generation blocking at no extra cost!
98
99// override these in your code to change the default behavior and style
100$.blockUI.defaults = {
101	// message displayed when blocking (use null for no message)
102	message:  '<h1>Please wait...</h1>',
103
104	title: null,	  // title string; only used when theme == true
105	draggable: true,  // only used when theme == true (requires jquery-ui.js to be loaded)
106	
107	theme: false, // set to true to use with jQuery UI themes
108	
109	// styles for the message when blocking; if you wish to disable
110	// these and use an external stylesheet then do this in your code:
111	// $.blockUI.defaults.css = {};
112	css: {
113		padding:	0,
114		margin:		0,
115		width:		'30%',
116		top:		'40%',
117		left:		'35%',
118		textAlign:	'center',
119		color:		'#000',
120		border:		'3px solid #aaa',
121		backgroundColor:'#fff',
122		cursor:		'default'
123	},
124	
125	// minimal style set used when themes are used
126	themedCSS: {
127		width:	'30%',
128		top:	'40%',
129		left:	'35%'
130	},
131
132	// styles for the overlay
133	overlayCSS:  {
134		backgroundColor: '#000',
135		opacity:	  	 0.6,
136		cursor:		  	 'default'
137	},
138
139	// styles applied when using $.growlUI
140	growlCSS: {
141		width:  	'350px',
142		top:		'10px',
143		left:   	'',
144		right:  	'10px',
145		border: 	'none',
146		padding:	'5px',
147		opacity:	0.6,
148		cursor: 	'default',
149		color:		'#fff',
150		backgroundColor: '#000',
151		'-webkit-border-radius': '10px',
152		'-moz-border-radius':	 '10px',
153		'border-radius': 		 '10px'
154	},
155	
156	// IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
157	// (hat tip to Jorge H. N. de Vasconcelos)
158	iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',
159
160	// force usage of iframe in non-IE browsers (handy for blocking applets)
161	forceIframe: false,
162
163	// z-index for the blocking overlay
164	baseZ: 1000,
165
166	// set these to true to have the message automatically centered
167	centerX: true, // <-- only effects element blocking (page block controlled via css above)
168	centerY: true,
169
170	// allow body element to be stetched in ie6; this makes blocking look better
171	// on "short" pages.  disable if you wish to prevent changes to the body height
172	allowBodyStretch: true,
173
174	// enable if you want key and mouse events to be disabled for content that is blocked
175	bindEvents: false,
176
177	// be default blockUI will supress tab navigation from leaving blocking content
178	// (if bindEvents is true)
179	constrainTabKey: true,
180
181	// fadeIn time in millis; set to 0 to disable fadeIn on block
182	fadeIn:  0,
183
184	// fadeOut time in millis; set to 0 to disable fadeOut on unblock
185	fadeOut:  0,
186
187	// time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
188	timeout: 0,
189
190	// disable if you don't want to show the overlay
191	showOverlay: true,
192
193	// if true, focus will be placed in the first available input field when
194	// page blocking
195	focusInput: false,
196
197	// suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
198	applyPlatformOpacityRules: true,
199	
200	// callback method invoked when fadeIn has completed and blocking message is visible
201	onBlock: null,
202
203	// callback method invoked when unblocking has completed; the callback is
204	// passed the element that has been unblocked (which is the window object for page
205	// blocks) and the options that were passed to the unblock call:
206	//	 onUnblock(element, options)
207	onUnblock: null,
208
209	// don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
210	quirksmodeOffsetHack: 4,
211
212	// class name of the message block
213	blockMsgClass: 'blockMsg'
214};
215
216// private data and functions follow...
217
218var pageBlock = null;
219var pageBlockEls = [];
220
221function install(el, opts) {
222	var full = (el == window);
223	var msg = opts && opts.message !== undefined ? opts.message : undefined;
224	opts = $.extend({}, $.blockUI.defaults, opts || {});
225	opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
226	var css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
227	var themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
228	msg = msg === undefined ? opts.message : msg;
229
230	// remove the current block (if there is one)
231	if (full && pageBlock)
232		remove(window, {fadeOut:0});
233
234	// if an existing element is being used as the blocking content then we capture
235	// its current place in the DOM (and current display style) so we can restore
236	// it when we unblock
237	if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
238		var node = msg.jquery ? msg[0] : msg;
239		var data = {};
240		$(el).data('blockUI.history', data);
241		data.el = node;
242		data.parent = node.parentNode;
243		data.display = node.style.display;
244		data.position = node.style.position;
245		if (data.parent)
246			data.parent.removeChild(node);
247	}
248
249	var z = opts.baseZ;
250
251	// blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
252	// layer1 is the iframe layer which is used to supress bleed through of underlying content
253	// layer2 is the overlay layer which has opacity and a wait cursor (by default)
254	// layer3 is the message content that is displayed while blocking
255
256	var lyr1 = ($.browser.msie || opts.forceIframe) 
257		? $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>')
258		: $('<div class="blockUI" style="display:none"></div>');
259	
260	var lyr2 = opts.theme 
261	 	? $('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+ (z++) +';display:none"></div>')
262	 	: $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
263
264	var lyr3, s;
265	if (opts.theme && full) {
266		s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+z+';display:none;position:fixed">' +
267				'<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || '&nbsp;')+'</div>' +
268				'<div class="ui-widget-content ui-dialog-content"></div>' +
269			'</div>';
270	}
271	else if (opts.theme) {
272		s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+z+';display:none;position:absolute">' +
273				'<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || '&nbsp;')+'</div>' +
274				'<div class="ui-widget-content ui-dialog-content"></div>' +
275			'</div>';
276	}
277	else if (full) {
278		s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage" style="z-index:'+z+';display:none;position:fixed"></div>';
279	}			
280	else {
281		s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement" style="z-index:'+z+';display:none;position:absolute"></div>';
282	}
283	lyr3 = $(s);
284
285	// if we have a message, style it
286	if (msg) {
287		if (opts.theme) {
288			lyr3.css(themedCSS);
289			lyr3.addClass('ui-widget-content');
290		}
291		else 
292			lyr3.css(css);
293	}
294
295	// style the overlay
296	if (!opts.theme && (!opts.applyPlatformOpacityRules || !($.browser.mozilla && /Linux/.test(navigator.platform))))
297		lyr2.css(opts.overlayCSS);
298	lyr2.css('position', full ? 'fixed' : 'absolute');
299
300	// make iframe layer transparent in IE
301	if ($.browser.msie || opts.forceIframe)
302		lyr1.css('opacity',0.0);
303
304	//$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
305	var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);
306	$.each(layers, function() {
307		this.appendTo($par);
308	});
309	
310	if (opts.theme && opts.draggable && $.fn.draggable) {
311		lyr3.draggable({
312			handle: '.ui-dialog-titlebar',
313			cancel: 'li'
314		});
315	}
316
317	// ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
318	var expr = setExpr && (!$.boxModel || $('object,embed', full ? null : el).length > 0);
319	if (ie6 || expr) {
320		// give body 100% height
321		if (full && opts.allowBodyStretch && $.boxModel)
322			$('html,body').css('height','100%');
323
324		// fix ie6 issue when blocked element has a border width
325		if ((ie6 || !$.boxModel) && !full) {
326			var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
327			var fixT = t ? '(0 - '+t+')' : 0;
328			var fixL = l ? '(0 - '+l+')' : 0;
329		}
330
331		// simulate fixed position
332		$.each([lyr1,lyr2,lyr3], function(i,o) {
333			var s = o[0].style;
334			s.position = 'absolute';
335			if (i < 2) {
336				full ? s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"')
337					 : s.setExpression('height','this.parentNode.offsetHeight + "px"');
338				full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"')
339					 : s.setExpression('width','this.parentNode.offsetWidth + "px"');
340				if (fixL) s.setExpression('left', fixL);
341				if (fixT) s.setExpression('top', fixT);
342			}
343			else if (opts.centerY) {
344				if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
345				s.marginTop = 0;
346			}
347			else if (!opts.centerY && full) {
348				var top = (opts.css && opts.css.top) ? parseInt(opts.css.top) : 0;
349				var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
350				s.setExpression('top',expression);
351			}
352		});
353	}
354
355	// show the message
356	if (msg) {
357		if (opts.theme)
358			lyr3.find('.ui-widget-content').append(msg);
359		else
360			lyr3.append(msg);
361		if (msg.jquery || msg.nodeType)
362			$(msg).show();
363	}
364
365	if (($.browser.msie || opts.forceIframe) && opts.showOverlay)
366		lyr1.show(); // opacity is zero
367	if (opts.fadeIn) {
368		var cb = opts.onBlock ? opts.onBlock : noOp;
369		var cb1 = (opts.showOverlay && !msg) ? cb : noOp;
370		var cb2 = msg ? cb : noOp;
371		if (opts.showOverlay)
372			lyr2._fadeIn(opts.fadeIn, cb1);
373		if (msg)
374			lyr3._fadeIn(opts.fadeIn, cb2);
375	}
376	else {
377		if (opts.showOverlay)
378			lyr2.show();
379		if (msg)
380			lyr3.show();
381		if (opts.onBlock)
382			opts.onBlock();
383	}
384
385	// bind key and mouse events
386	bind(1, el, opts);
387
388	if (full) {
389		pageBlock = lyr3[0];
390		pageBlockEls = $(':input:enabled:visible',pageBlock);
391		if (opts.focusInput)
392			setTimeout(focus, 20);
393	}
394	else
395		center(lyr3[0], opts.centerX, opts.centerY);
396
397	if (opts.timeout) {
398		// auto-unblock
399		var to = setTimeout(function() {
400			full ? $.unblockUI(opts) : $(el).unblock(opts);
401		}, opts.timeout);
402		$(el).data('blockUI.timeout', to);
403	}
404};
405
406// remove the block
407function remove(el, opts) {
408	var full = (el == window);
409	var $el = $(el);
410	var data = $el.data('blockUI.history');
411	var to = $el.data('blockUI.timeout');
412	if (to) {
413		clearTimeout(to);
414		$el.removeData('blockUI.timeout');
415	}
416	opts = $.extend({}, $.blockUI.defaults, opts || {});
417	bind(0, el, opts); // unbind events
418	
419	var els;
420	if (full) // crazy selector to handle odd field errors in ie6/7
421		els = $('body').children().filter('.blockUI').add('body > .blockUI');
422	else
423		els = $('.blockUI', el);
424
425	if (full)
426		pageBlock = pageBlockEls = null;
427
428	if (opts.fadeOut) {
429		els.fadeOut(opts.fadeOut);
430		setTimeout(function() { reset(els,data,opts,el); }, opts.fadeOut);
431	}
432	else
433		reset(els, data, opts, el);
434};
435
436// move blocking element back into the DOM where it started
437function reset(els,data,opts,el) {
438	els.each(function(i,o) {
439		// remove via DOM calls so we don't lose event handlers
440		if (this.parentNode)
441			this.parentNode.removeChild(this);
442	});
443
444	if (data && data.el) {
445		data.el.style.display = data.display;
446		data.el.style.position = data.position;
447		if (data.parent)
448			data.parent.appendChild(data.el);
449		$(el).removeData('blockUI.history');
450	}
451
452	if (typeof opts.onUnblock == 'function')
453		opts.onUnblock(el,opts);
454};
455
456// bind/unbind the handler
457function bind(b, el, opts) {
458	var full = el == window, $el = $(el);
459
460	// don't bother unbinding if there is nothing to unbind
461	if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked')))
462		return;
463	if (!full)
464		$el.data('blockUI.isBlocked', b);
465
466	// don't bind events when overlay is not in use or if bindEvents is false
467	if (!opts.bindEvents || (b && !opts.showOverlay)) 
468		return;
469
470	// bind anchors and inputs for mouse and key events
471	var events = 'mousedown mouseup keydown keypress';
472	b ? $(document).bind(events, opts, handler) : $(document).unbind(events, handler);
473
474// former impl...
475//	   var $e = $('a,:input');
476//	   b ? $e.bind(events, opts, handler) : $e.unbind(events, handler);
477};
478
479// event handler to suppress keyboard/mouse events when blocking
480function handler(e) {
481	// allow tab navigation (conditionally)
482	if (e.keyCode && e.keyCode == 9) {
483		if (pageBlock && e.data.constrainTabKey) {
484			var els = pageBlockEls;
485			var fwd = !e.shiftKey && e.target === els[els.length-1];
486			var back = e.shiftKey && e.target === els[0];
487			if (fwd || back) {
488				setTimeout(function(){focus(back)},10);
489				return false;
490			}
491		}
492	}
493	var opts = e.data;
494	// allow events within the message content
495	if ($(e.target).parents('div.' + opts.blockMsgClass).length > 0)
496		return true;
497
498	// allow events for content that is not being blocked
499	return $(e.target).parents().children().filter('div.blockUI').length == 0;
500};
501
502function focus(back) {
503	if (!pageBlockEls)
504		return;
505	var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0];
506	if (e)
507		e.focus();
508};
509
510function center(el, x, y) {
511	var p = el.parentNode, s = el.style;
512	var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth');
513	var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth');
514	if (x) s.left = l > 0 ? (l+'px') : '0';
515	if (y) s.top  = t > 0 ? (t+'px') : '0';
516};
517
518function sz(el, p) {
519	return parseInt($.css(el,p))||0;
520};
521
522})(jQuery);
523
524/* --- ErgoSum-1.2.js ---*/
525$.fn.center = function () {
526    this.css("position", "absolute");
527    this.css("top", ($(window).height() - this.height()) / 2 + $(window).scrollTop() + "px");
528    this.css("left", ($(window).width() - this.width()) / 2 + $(window).scrollLeft() + "px");
529    return this;
530}
531
532function globalNotifica(t, m) {
533    $gn = $('#globalNotifica');
534    if (t == undefined || t == '1') {
535        $gn.find('.centralizador').html(m);
536        $gn.slideDown(function () {
537            setTimeout(function () {
538                $gn.addClass('enfaze');
539            }, 500);
540            setTimeout(function () {
541                $gn.removeClass('enfaze');
542            }, 1000);
543            setTimeout(function () {
544                $gn.addClass('enfaze');
545            }, 1500);
546            setTimeout(function () {
547                $gn.removeClass('enfaze');
548            }, 2000);
549        });
550        $('body').animate({paddingTop: '32px'});
551    } else {
552        $gn.slideUp();
553        $('body').animate({paddingTop: 0});
554    }
555}
556
557function abas() {
558    $('div.abas').each(function () {
559        lis = '';
560        aba = $(this);
561        $('ul.cnt > li', this).each(function () {
562            item = $(this);
563            lis = lis + '<li><a href="#' + item.index() + '" onclick="javascript: abasAtivar(' + item.index() + ', ' + aba.index() + ');">' + this.title + '</a></li>';
564        });
565        aba.prepend('<ul class="nav">' + lis + '</ul>');
566        aba.find('ul.nav a:first').click();
567    });
568}
569
570function abasAtivar(idx, ab) {
571    local = $('div.abas:eq(' + ab + ')');
572    local.find('ul.nav li, ul.cnt > li').removeClass('ativo');
573    local.find('ul.nav li:eq(' + idx + '), ul.cnt > li:eq(' + idx + ')').addClass('ativo');
574}
575
576function titulo(v) {
577    document.title = v;
578}
579
580function ir(h) {
581    document.location.href = h;
582}
583
584function load(id, overlay, path, dados) {
585    if (id == undefined || id == '') id = '#corpo';
586    if (dados != undefined) dados = '&' + dados; else dados = '';
587    fecha = "_gaq.push(['_trackPageview', '" + path + "']);";
588    if (overlay != '' && overlay != undefined) { /*janela(1, '<div class="dark loadMedio"></div>');*/
589        globalLoad(1);
590        fecha = fecha + ' globalLoad(2); janela(2);'
591    }
592    ajax(path, dados, 'html', '', '$("' + id + '").html(HTML); ' + fecha);
593}
594
595function ajax(path, dados, tipo, Executar, Executar2, cache, siteURL, retornarAmigavel, tentativa) {
596    if (tentativa == undefined) {
597        tentativa = 1;
598    }
599    if (siteURL == undefined) {
600        siteURL = unescape(g.baseURL);
601    }
602    if (Executar != '') {
603        eval(Executar);
604    }
605    if (cache == undefined) {
606        cache = false;
607    }
608    $.ajax({
609        type: "POST", url: siteURL + "ajax/" + path, data: dados, cache: cache, dataType: tipo,
610        error: function (Requerimento, Erro, Config) {
611            logErgo('Erro ajax, retrying ' + (tentativa + 1) + '...');
612            if ((tentativa + 1) <= 4) {
613                ajax(path, dados, tipo, Executar, Executar2, cache, siteURL, retornarAmigavel, (tentativa + 1));
614            } else {
615                logErgo('Errou muitas veses, finalizado.');
616            }
617        },
618        //async: false,
619        success: function (HTML) {
620            if (Executar2 != '') {
621                eval(Executar2);
622            }
623        }
624    });
625}
626
627/*function pageLoad(mod, place, id, dados)
628	{
629	if(id == undefined || id == '') id = '#Conteiner';
630	if(dados != undefined) dados = '&'+dados; else dados = '';
631	//$('#globalMensagem').click();
632	blockComponente(id, '<div class="blocoInfo loadPequeno"></div>', '1');
633	ErgoSum_executaAjax('', mod, 'HTML', 'fct='+place+'&'+dados, 'html', "", "$('"+id+"').html(HTML); blockComponente('"+id+"', '', '2');")
634	}
635function menuLoad(mod, place, id, dados)
636	{
637	if(id == undefined || id == '') id = '#Lateral-menu-conteiner';
638	if(dados != undefined) dados = '&'+dados; else dados = '';
639	blockComponente(id, '<div class="blocoInfo loadPequeno"></div>', '1');
640	ErgoSum_executaAjax('', mod, 'MENU', 'fct='+place+'&'+dados, 'html', "", "$('"+id+"').html(HTML); blockComponente('"+id+"', '', '2');")
641	}
642function partLoad(mod, place, id, dados)
643	{
644	if(id == undefined || id == '') id = '#Conteiner';
645	if(dados != undefined) dados = '&'+dados; else dados = '';
646	blockComponente(id, '<div class="blocoInfo loadPequeno"></div>', '1');
647	ErgoSum_executaAjax('', mod, 'PART', 'fct='+place+'&'+dados, 'html', "", "$('"+id+"').html(HTML); blockComponente('"+id+"', '', '2');")
648	}*/
649function global(m, c, t) {
650    gm = $('#globalMensagem');
651    if (t == '' || t == undefined)
652        t = 30000;
653    tfo = 300;
654    gm.attr({title: 'Clique para fechar'});
655    if (c != '' && c != undefined)
656        gm.removeClass().addClass(c).attr({title: 'Clique para fechar'});
657
658    gm.find('.txt').html(m);
659    Altura = gm.outerHeight(true) - 30;
660    Altura = Math.round(((Altura - 64) / 2));
661    gm.find('.img').css({marginTop: Altura + 'px'})
662
663    gm.stop().css({'top': '-150px', display: 'block'}).animate({'top': '30px'}, 400);
664
665    gm.click(function () {
666        //$(this).fadeOut(tfo);
667        gm.stop().animate({'top': '-150px'}, 400);
668    });
669    setTimeout('gm.fadeOut("' + tfo + '");', t);
670}
671
672function globalLoad(q) {
673    if (q == 1 || q == undefined) {
674        janela(1, '<div class="loadMedio dark"></div>');
675        //$('#globalLoad').stop().animate({ top: 0 }, 300);
676    } else {
677        janela(2);
678        //$('#globalLoad').stop().animate({ top: -40 }, 300);
679    }
680}
681
682function janela(t, m, bg) {
683    if (m != undefined) {
684        j = m.replace(/\n/gi, '');
685        j = j.replace(/\r/gi, '');
686        j = j.replace(/<script>.*<\/script>/gi, '');
687    }
688    if (t == 1) {
689        $('#TemporarioHTML').html(j);
690        setTimeout(function () {
691            allAlt = $('#TemporarioHTML').outerHeight(true);
692            allLar = $('#TemporarioHTML').outerWidth(true) + 20;
693            // Defini a altura maxima para 95% da tela
694            if (allAlt > $(window).height()) {
695                allAlt = Math.round($(window).height() * 0.95);
696            }
697            // Defini a largura maxima para 95% da tela
698            if (allLar > $(window).width()) {
699                allLar = Math.round($(window).width() * 0.95);
700            }
701            $('#TemporarioHTML').html('');
702
703            if (bg == undefined) bg = {background: '#353740', opacity: 0.9}; /*url('+unescape(g.TmaURL)+'img/topo.absolutes.fundo.semitransp.png?) 50%*/
704            $.blockUI({
705                message: m,
706                overlayCSS: bg,
707                allowBodyStretch: true,
708                css: {
709                    //top:  '50%',
710                    //left: '50%',
711                    overflow: 'auto',
712                    top: (($(window).height() - allAlt) / 2 + "px"),
713                    left: (($(window).width() - allLar) / 2 + "px"),
714                    border: '0',
715                    padding: '0',
716                    //margin: '-'+(Altura)+'px 0 0 -'+Largura+'px',
717                    width: allLar + 'px',
718                    height: allAlt + 'px',
719                    background: 'transparent'
720                }
721            });
722        }, 100);
723        //setTimeout(function(){ $('.blockUI.blockMsg').center() }, 200);
724    } else {
725        setTimeout(function () {
726            $.unblockUI();
727        }, 100);
728    }
729}
730
731function ejanela(t, e, m, bg) {
732    if (m != undefined) {
733        j = m.replace(/\n/gi, '');
734        j = j.replace(/\r/gi, '');
735        j = j.replace(/<script>.*<\/script>/gi, '');
736    }
737    if (t == 1) {
738        $('#TemporarioHTML').html(j);
739        setTimeout(function () {
740            allAlt = $('#TemporarioHTML').outerHeight(true);
741            allLar = $('#TemporarioHTML').outerWidth(true) + 20;
742            // Defini a altura maxima para 95% da tela
743            if (allAlt > $(window).height()) {
744                allAlt = Math.round($(window).height() * 0.999);
745            }
746            // Defini a largura maxima para 95% da tela
747            if (allLar > $(window).width()) {
748                allLar = Math.round($(window).width() * 0.999);
749            }
750            $('#TemporarioHTML').html('');
751
752            if (bg == undefined) bg = {background: '#353740', opacity: 0.9}; /*url('+unescape(g.TmaURL)+'img/topo.absolutes.fundo.semitransp.png?) 50%*/
753            $(e).block({
754                message: m,
755                overlayCSS: bg,
756                allowBodyStretch: true,
757                css: {
758                    //top:  '50%',
759                    //left: '50%',
760                    overflow: 'auto',
761                    top: (($(window).height() - allAlt) / 2 + "px"),
762                    left: (($(window).width() - allLar) / 2 + "px"),
763                    border: '0',
764                    padding: '0',
765                    //margin: '-'+(Altura)+'px 0 0 -'+Largura+'px',
766                    width: allLar + 'px',
767                    height: allAlt + 'px',
768                    background: 'transparent'
769                }
770            });
771        }, 100);
772        //setTimeout(function(){ $('.blockUI.blockMsg').center() }, 200);
773    } else {
774        setTimeout(function () {
775            $(e).unblock();
776        }, 100);
777    }
778}
779
780function ErgoSum_executaAjax(divID, Pagina, Acao, Dados, Tipo, Executar, Executar2, siteURL, retornarAmigavel) {
781    if (siteURL == undefined) {
782        siteURL = './';//g.baseURL;
783    }
784    if (Executar != '') {
785        eval(Executar);
786    }
787    if (Acao != null && Acao != undefined) Acao = '&Acao=' + Acao; else Acao = '';
788    $.ajax({
789        type: "POST",
790        url: siteURL + "ajax.php",
791        data: 'ct=' + Pagina + Acao + '&' + Dados + '&retornarAmigavel=' + retornarAmigavel + '&',
792        cache: false,
793        dataType: Tipo,
794        error: function (Requerimento, Erro, Config) {
795            $('#TemporarioHTML').fadeIn();
796            $('#TemporarioHTML').addClass('Mensagem mErro');
797            $('#TemporarioHTML').html("Oops!, erro com Ajax: <br />" + Erro);
798        },
799        success: function (HTML) {
800            //alert(HTML);
801            if (Executar2 != '') {
802                eval(Executar2);
803            }
804        }
805    });
806}
807
808function blockUI(T, L, A, Mensagem) {
809    janela(T, Mensagem);
810}
811
812function notificar(T, Mensagem) {
813    janela(T, Mensagem);
814}
815
816function notificarBloco(Elemento, T, Mensagem) {
817    ejanela(T, Elemento, Mensagem);
818}
819
820function resize(Elemento, T) { /* Desnecessária depois da criação de "janela" e "ejanela" */
821}
822
823function blockComponente(Elemento, Mensagem, Tipo) {
824    ejanela(Tipo, Elemento, Mensagem);
825}
826
827function rand(n) {
828    return (Math.floor(Math.random() * n + 1));
829}
830
831function valor(n) {
832    return 'R$ ' + number_format(n, 2, ',', '.');
833}
834
835function getValor(n) {
836    return parseFloat(n.replace(/[.|R|$]/gi, '').replace(/,/gi, '.'));
837}
838
839function number_format(number, decimals, dec_point, thousands_sep) {
840
841    var n = number, prec = decimals;
842    n = !isFinite(+n) ? 0 : +n;
843    prec = !isFinite(+prec) ? 0 : Math.abs(prec);
844    var sep = (typeof thousands_sep == "undefined") ? ',' : thousands_sep;
845    var dec = (typeof dec_point == "undefined") ? '.' : dec_point;
846
847    var s = (prec > 0) ? n.toFixed(prec) : Math.round(n).toFixed(prec); //fix for IE parseFloat(0.55).toFixed(0) = 0;
848
849    var abs = Math.abs(n).toFixed(prec);
850    var _, i;
851
852    if (abs >= 1000) {
853        _ = abs.split(/\D/);
854        i = _[0].length % 3 || 3;
855
856        _[0] = s.slice(0, i + (n < 0)) +
857            _[0].slice(i).replace(/(\d{3})/g, sep + '$1');
858
859        s = _.join(dec);
860    } else {
861        s = s.replace('.', dec);
862    }
863
864    return s;
865}
866
867function urlencode(str) {
868    str = (str + '').toString();
869    return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+');
870}
871
872function extensao(filename) {
873    return (/[.]/.exec(filename)) ? /[^.]+$/.exec(filename) : undefined;
874}
875
876////////////////////////////////////////////////////////////////////////////////
877////////////////////////////////////////////////////////////////////////////////
878function utf8_encode(argString) {
879    if (argString === null || typeof argString === "undefined") {
880        return "";
881    }
882
883    var string = (argString + ''); // .replace(/\r\n/g, "\n").replace(/\r/g, "\n");
884    var utftext = "",
885        start, end, stringl = 0;
886
887    start = end = 0;
888    stringl = string.length;
889    for (var n = 0; n < stringl; n++) {
890        var c1 = string.charCodeAt(n);
891        var enc = null;
892
893        if (c1 < 128) {
894            end++;
895        } else if (c1 > 127 && c1 < 2048) {
896            enc = String.fromCharCode((c1 >> 6) | 192) + String.fromCharCode((c1 & 63) | 128);
897        } else {
898            enc = String.fromCharCode((c1 >> 12) | 224) + String.fromCharCode(((c1 >> 6) & 63) | 128) + String.fromCharCode((c1 & 63) | 128);
899        }
900        if (enc !== null) {
901            if (end > start) {
902                utftext += string.slice(start, end);
903            }
904            utftext += enc;
905            start = end = n + 1;
906        }
907    }
908
909    if (end > start) {
910        utftext += string.slice(start, stringl);
911    }
912
913    return utftext;
914}
915
916function base64_encode(data) {
917    var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
918    var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,
919        ac = 0,
920        enc = "",
921        tmp_arr = [];
922
923    if (!data) {
924        return data;
925    }
926
927    data = this.utf8_encode(data + '');
928
929    do { // pack three octets into four hexets
930        o1 = data.charCodeAt(i++);
931        o2 = data.charCodeAt(i++);
932        o3 = data.charCodeAt(i++);
933
934        bits = o1 << 16 | o2 << 8 | o3;
935
936        h1 = bits >> 18 & 0x3f;
937        h2 = bits >> 12 & 0x3f;
938        h3 = bits >> 6 & 0x3f;
939        h4 = bits & 0x3f;
940
941        // use hexets to index into b64, and append result to encoded string
942        tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);
943    } while (i < data.length);
944
945    enc = tmp_arr.join('');
946
947    switch (data.length % 3) {
948        case 1:
949            enc = enc.slice(0, -2) + '==';
950            break;
951        case 2:
952            enc = enc.slice(0, -1) + '=';
953            break;
954    }
955
956    return enc;
957}
958
959function logErgo(m) {
960    if (window.console && window.console.log) {
961        window.console.log(m);
962    }
963}
964
965////////////////////////////////////////////////////////////////////////////////
966////////////////////////////////////////////////////////////////////////////////
967(function ($) {
968    $.toJSON = function (o) {
969        if (typeof (JSON) == 'object' && JSON.stringify)
970            return JSON.stringify(o);
971        var type = typeof (o);
972        if (o === null)
973            return "null";
974        if (type == "undefined")
975            return undefined;
976        if (type == "number" || type == "boolean")
977            return o + "";
978        if (type == "string")
979            return $.quoteString(o);
980        if (type == 'object') {
981            if (typeof o.toJSON == "function")
982                return $.toJSON(o.toJSON());
983            if (o.constructor === Date) {
984                var month = o.getUTCMonth() + 1;
985                if (month < 10) month = '0' + month;
986                var day = o.getUTCDate();
987                if (day < 10) day = '0' + day;
988                var year = o.getUTCFullYear();
989                var hours = o.getUTCHours();
990                if (hours < 10) hours = '0' + hours;
991                var minutes = o.getUTCMinutes();
992                if (minutes < 10) minutes = '0' + minutes;
993                var seconds = o.getUTCSeconds();
994                if (seconds < 10) seconds = '0' + seconds;
995                var milli = o.getUTCMilliseconds();
996                if (milli < 100) milli = '0' + milli;
997                if (milli < 10) milli = '0' + milli;
998                return '"' + year + '-' + month + '-' + day + 'T' +
999                    hours + ':' + minutes + ':' + seconds + '.' + milli + 'Z"';
1000            }
1001            if (o.constructor === Array) {
1002                var ret = [];
1003                for (var i = 0; i < o.length; i++)
1004                    ret.push($.toJSON(o[i]) || "null");
1005                return "[" + ret.join(",") + "]";
1006            }
1007            var pairs = [];
1008            for (var k in o) {
1009                var name;
1010                var type = typeof k;
1011                if (type == "number")
1012                    name = '"' + k + '"'; else if (type == "string")
1013                    name = $.quoteString(k); else
1014                    continue;
1015                if (typeof o[k] == "function")
1016                    continue;
1017                var val = $.toJSON(o[k]);
1018                pairs.push(name + ":" + val);
1019            }
1020            return "{" + pairs.join(", ") + "}";
1021        }
1022    };
1023    $.evalJSON = function (src) {
1024        if (typeof (JSON) == 'object' && JSON.parse)
1025            return JSON.parse(src);
1026        return eval("(" + src + ")");
1027    };
1028    $.secureEvalJSON = function (src) {
1029        if (typeof (JSON) == 'object' && JSON.parse)
1030            return JSON.parse(src);
1031        var filtered = src;
1032        filtered = filtered.replace(/\\["\\\/bfnrtu]/g, '@');
1033        filtered = filtered.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']');
1034        filtered = filtered.replace(/(?:^|:|,)(?:\s*\[)+/g, '');
1035        if (/^[\],:{}\s]*$/.test(filtered))
1036            return eval("(" + src + ")"); else
1037            throw new SyntaxError("Error parsing JSON, source is not valid.");
1038    };
1039    $.quoteString = function (string) {
1040        if (string.match(_escapeable)) {
1041            return '"' + string.replace(_escapeable, function (a) {
1042                var c = _meta[a];
1043                if (typeof c === 'string') return c;
1044                c = a.charCodeAt();
1045                return '\\u00' + Math.floor(c / 16).toString(16) + (c % 16).toString(16);
1046            }) + '"';
1047        }
1048        return '"' + string + '"';
1049    };
1050    var _escapeable = /["\\\x00-\x1f\x7f-\x9f]/g;
1051    var _meta = {'\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"': '\\"', '\\': '\\\\'};
1052})(jQuery);

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.