function clearFieldFocus(o){	o.value=(o.value=='Nome' || o.value=='Senha')? '' : o.value;	}function getOffset(el, which) {	var amount = el["offset"+which] 	if (which=="Top") amount+=el.offsetHeight	el = el.offsetParent	while (el!=null) {		amount+=el["offset"+which]		el = el.offsetParent	} return amount/*ToDO: http://dev.jquery.com/browser/trunk/jquery/src/offset.js	alert('getOffSet2'+elem+'\n getBoundingClientRect()'+elem.getBoundingClientRect()+'\n elem.getDocument():'+'(typeof elem.getDocument())'+'\n '+document.clientTop)      var bound = elem.getBoundingClientRect(), html = this.getDocument().documentElement;                        while (elem = elem.offsetParent) {                bound.top += elem.scrollTop - elem.clientTop;                bound.left += elem.scrollLeft - elem.clientLeft;            }                    return {                x: bound.left + html.scrollLeft - html.clientLeft,                y: bound.top + html.scrollTop - html.clientTop      };*/}  function Pop(theURL,winName,features) { //v3.0	if (window.winPop && !winPop.closed) winPop.focus();	winPop = window.open(theURL,winName,features);	if (!window.winPop)  {		alert('N\u00E3o foi poss\u00EDvel abrir uma nova janela!\n\nSe voc\u00EA possui algum dispositivo "Anti-PopUp", \ncertifique-se de permitir as PopUps deste site');		winPop.focus();	}}//-- -------------------------------------------------//	$$JShead_Utils_Forms// ------------------------------------------------- var form;function setForm(i){ 	form=document.forms[i];}function Get(id){	return document.getElementById(id)}function Set(id, v, a){	if (a == null) a = 'innerHTML';		document.getElementById(id)[a] = v}function SetField(y,v){	form[y].value = v}function GetField(y){	return form[y].value}function SetFieldList(a, v){	for (var i=0;i<form.length;i++)		if (form[i].name == a) Element.remove(form[i]);	for (var i=0;i<v.length;i++)		form.appendChild(Builder.node('input', {'type': 'hidden', 'name' : [a], 'value' : [ v[i] ] }));	if ( v.length ==0 ) {		form.appendChild(Builder.node('input', {'type': 'hidden', 'name' : [a], 'value' : [ v ] }));		}	}function GetFieldList(a){	var tmp=new Array(); var c = 0;	for (var i=0;i<form.length;i++)		if (form[i].name == a){ 			tmp[tmp.length]=form[i].value; c++; 			}	return (c == 0) ? '' : tmp;	}function GetCombo(y,value) {	if (value == null) {		return form[ y ].options[form[ y ].selectedIndex].text;	}else{		return form[ y ].options[form[ y ].selectedIndex].value;	}}function SetCombo(y,v) {for (var i = 0; i < form[y].options.length; i++) 		if (form[y].options[i].text == v || form[y].options[i].value == v) 			form[ y ].selectedIndex = i;}function GetCheck(x){	var total = ''		for (var i = 0; i < form[x].length; i++) {		if (form[x][i].checked == true) {			var total = (form[x][i].value == '') ? total : total +';'+ form[x][i].value;			}		}	return total;}function SetCheck(x,v){	var total = ''; v = toArray(v);	for (var i = 0; i < form[x].length; i++) 		form[x][i].checked = false;	for (var j = 0; j < v.length; j++) 		for (var i = 0; i < form[x].length; i++) 			if (form[x][i].value == v[j])				form[x][i].checked = true;	return total;}function GetRadio( n ){	if ('undefined' == typeof(form[n])) return '';	var total = '';		for (var i = 0; i < form[n].length ; i++) 			if (form[n][i].checked == true) 				var total = form[n][i].value;return total;}function HasField(a){	for (i=0;i<form.length;i++)		if (form[i].name == a)	return true	return false;}//-- -------------------------------------------------//	$$JShead_Utils_Strings// ------------------------------------------------- function left(a,key){	if (typeof(a) == 'string') return leftStr(a,key);	for (var i=0;i<a.length;i++)		a[i]=leftStr(a[i],key);	return a;}function leftStr(a,key){	return (a.indexOf(key) == -1) ? '' : a.substring(0,a.indexOf(key));}function right(a,key){	if (typeof(a) == 'string') return rightStr(a,key);	for (var i=0;i<a.length;i++)		a[i]=rightStr(a[i],key);		return a;}function rightStr(a,key){	return (a.indexOf(key) == -1) ? '' : a.substring(a.indexOf(key)+key.length,a.length);}function trim(a){if (typeof(a) == 'string') return a.replace(/(^ +| +$)/, '').replace(/  +/g,' ');	var tmp=new Array();	for(var j=0;j<a.length;j++)		if(a[j]!='')			tmp[tmp.length]=a[j];	a.length=tmp.length;	for(j=0;j<tmp.length;j++)		a[j]=tmp[j].replace(/^ +| +$/g,'').replace(/  +/g,' ');	return a;}function contains(a, e) {	for(var j=0;j<a.length;j++)if(a[j]==e)return true;	return false;}function containsStr(a,b){	a=toArray(a); b=toArray(b);	for (var i=0;i<a.length;i++)		for (var j=0;j<b.length;j++)			if ( a[i].indexOf(b[j])>-1) return true;return false;}function toArray(y){var _y=new Array(1);if (typeof(y) == 'string' || typeof(y) == 'number'){ _y[0]=y; return _y };return y;}function unique(a) {	tmp = new Array(0);	for(var i=0;i<a.length;i++){		if(!contains(tmp, a[i])){			tmp.length+=1;			tmp[tmp.length-1]=a[i];		}	}	return tmp;}function replace(a,b,c){var j=0; a=toArray(a); b=toArray(b); c=toArray(c);	for (var z = 0; z < b.length; z++) {		for (var i = 0; i < a.length; i++) {			j=(i < c.length)? i : j;			if(isNaN(parseInt(a[i])) || isNaN(parseInt(b[z]))){				if (a[i].toUpperCase()==b[z].toUpperCase()) a.splice(i,1,c[j])				}else{					if (a[i]==b[z]) a.splice(i,1,c[j])					}					}	} return a}function append(a,v){	v=toArray(v);	for(var i=0;i<v.length;i++){		a[a.length+i] = v[i];	}	return a;}