get_element = document.all ?
function (s_id) { return document.all[s_id] } :
function (s_id) { return document.getElementsByName(s_id) };
			
function popupForm(form,action,w,h){

	//popupForm(this,'endereço','width','height')

	var win=window.open('','myWin','height='+h+',width='+w+'')
	form.method="post";
	form.action=action;
	form.target="myWin";
	//myWin.focus();
	return true
}

function janela(pagina,largura,altura){
	var desktopname = window.open(pagina,'','width='+largura+',height='+altura+',toolbar=no,copyhistory=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no');
	desktopname.focus();
}

/* Função para exibir e ocultar div 

			Toda DIV deve se chamar "div" + a ordem dela. 1, 2, 3...
			"tipo" define se ao ocultar a desejada, as outras irão minimizar ou não.
			"exibe" é o campo que deverá ficar visivel.
*/

function exibeDiv(exibe) {
	var campo = get_element(exibe);
	if (campo.style.display == "none") { campo.style.display = "block"; } else { campo.style.display = "none"; }
}