/*--------------------------------------------------------------------
JAVASCRIPT para links em drop down listas

Version: 	1.0 - 2006/2007
author: 		Burocratik (alexandre gomes)
email: 		alex@burocratik.com
website: 	http://www.burocratik.com
-----------------------------------------------------------------------*/

/* =Limpar Formularios
-----------------------------------------------------------------------*/
function goLista(qualform) {
	if(!document.getElementById) return false
	var opcoes = document.getElementById("escolha");
	//tirar o valor do que esta seleccionado:	alert(opcoes.value) (e' vector mas so quero o selecionado)
	window.location.href=opcoes.value
}

//Buscar o(s) forms com a class que me interessa 
function iniciarFormLista() {
	if(!document.forms) return false
  	for (var i=0; i<document.forms.length; i++) {
   	var thisform = document.forms[i];
		if (thisform.className.indexOf("formLista") == -1) continue; //se nao tem a class sai do loop
	   	thisform.onsubmit = function(){
				goLista(this)
				return false;
			}
	}
}

/* =Preparar Eventos
-----------------------------------------------------------------------*/
addLoadEvent(iniciarFormLista);


