function redirAuto(url){
	top.location = url;
}

function go(){
	box = document.forms[0].navi;
	destination = box.options[box.selectedIndex].value;
	if (destination) location.href = destination + "_frm_list.php";
}


function formEnvia() {
	vMsg = "";
	
	for (i=0;i<aFields.length;i++){
		var field = aFields[i].split("|");
		//alert(field[0]);
		document.getElementById(field[0]).style.border="1px solid #ccc";
		if(document.getElementById(field[0]).value.length<1){
			vMsg+="· "+field[1]+"\n";
			document.getElementById(field[0]).style.border="1px dashed red";
		}
	}
						
	if(vMsg.length>0) {
		alert("Preencha corretamente:\n\n"+vMsg);
		return false;
	}
	return true;
}

//inicio de funções de navegação	
function lng(lng){
	top.document.navForm.lng.value  = lng;
	top.document.navForm.submit();
}

function nav(sec,ac,id, lng){
	if(sec) top.document.navForm.sec.value = sec ;
	if(ac)  top.document.navForm.ac.value  = ac;
	if(id)  top.document.navForm.id.value  = id;
	top.document.navForm.submit();
}


function link(sec) 	 { nav(sec)  ; }
function php(sec) 	 { nav(sec,7); }
function sel(sec) 	 { nav(sec,6); }
function ins(sec) 	 { nav(sec,1); }
function del(sec, id){ nav(sec,5); }
function upd(sec, id){ nav(sec,3,id); }
// fim de funções de navegação