<!-- Abre o calendário //-->
function AbreCal(largura,altura,form,campo1,campo2,campo3,tmpx,loc) {
	vertical = (screen.height/2) - (altura/2);
	horizontal = (screen.width/2) - (largura/2);
	var jan = window.open(loc+'funct/lcal.php?form='+form+'&campo1='+campo1+'&campo2='+campo2+'&campo3='+campo3+'&tmpx='+tmpx,'','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=yes,resizable=0,copyhistory=0,screenX='+screen.width+',screenY='+screen.height+',top='+vertical+',left='+horizontal+',width='+largura+',height='+altura);
	jan.focus();
}

<!-- Efeito dos botoes //-->
document.write('<STYLE TYPE="text/css">.imgTrans{ filter:revealTrans(duration=0.4,transition=12); filter:alpha(opacity=80); -moz-opacity:0.8; }</STYLE>');

var baseopacity=80

function slowhigh(which2){
	imgobj=which2
	browserdetect=which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : ""
	instantset(baseopacity)
	highlighting=setInterval("gradualfade(imgobj)",50)
}

function slowlow(which2){
	cleartimer()
	instantset(baseopacity)
}

function instantset(degree){
	if (browserdetect=="mozilla")
		imgobj.style.MozOpacity=degree/100
	else if (browserdetect=="ie")
		imgobj.filters.alpha.opacity=degree
}

function cleartimer(){
	if (window.highlighting) clearInterval(highlighting)
}

function gradualfade(cur2){
	if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
		cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.1, 0.99)
	else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
		cur2.filters.alpha.opacity+=10
	else if (window.highlighting)
		clearInterval(highlighting)
}

<!-- Expandir/Ocultar Tabela //-->
function Expandir(stipo) {
	if (stipo.style.display=='none') {
		stipo.style.display='';
	} else {
		stipo.style.display='none';
	}
}

<!-- Abre url //-->
function goUrl(url,opc) {
	if (opc == 0) {
		parent.location=url;
	} else {
		window.open(url);
	}
}

<!-- Confirma alteração em um formulário //-->
function formQuest(msg){ 
	var wAcao = window.confirm(msg);
	if (wAcao) {
		return true;
	} else {
		return false;
	}
}

<!-- Ajax - Lee //-->
var http_request;
var browser = navigator.appName;

function LeeAjaxDoc(span,imgload,pdirect) {
	document.getElementById(span).innerHTML = "<IMG SRC='"+imgload+"' ALT=''>";
	if (window.XMLHttpRequest) {				// Mozilla, Safari, ...
		http_request = new XMLHttpRequest();
		if (http_request.overrideMimeType) {
			http_request.overrideMimeType('text/xml');
		}
	} else if (window.ActiveXObject) {			// Internet Explorer
		try {
			http_request = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				http_request = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {
				http_request = false;
			}
		}
	}
	http_request.onreadystatechange = function() {
		if (http_request.readyState == 4) {
			if (http_request.status == 200) {
		        	try {
					document.getElementById(span).innerHTML=http_request.responseText;
				} catch (e) {
					document.getElementById(span).value=http_request.responseText;
				}
			} else {
				alert("Houve um problema ao tentar obter os dados:\n" + http_request.statusText);
			}
		} else {
			// alert("Carregando...");
		}
	}
	http_request.open("GET", pdirect, true); 
	http_request.send(null);
}