function submitSearch(){ var erro = false; erro = EmBranco(document.forms.frmSearch.search.value); if (erro) { document.forms.frmSearch.search.value = ""; document.forms.frmSearch.search.focus(); erro = true; } else { document.forms.frmSearch.submit(); } return !erro; } function EmBranco(str) { var string = new String(str); var retorno = true; for (var i=0;i= 0) { tipoOperacao = 'm'; } $.ajax({ url: "selecionaitem", data: ({id:id,tipoOperacao:tipoOperacao}), sucess: trocaImagem(id,tipoOperacao), cache: false }); } function trocaImagem(id,tipoOperacao) { if (tipoOperacao == "m") { $("#img" + id).attr("src","web/img/marcado.png"); } else { $("#img" + id).attr("src","web/img/desmarcado.png"); } } function mostraEscondeDetalhes(detalhes) { var x = document.getElementById(detalhes); if (x.style.display == "") { x.style.display = "block"; } else if (x.style.display == "none") { x.style.display = "block"; } else { x.style.display = "none"; } } function textoSpan(textoAtual, textoExpandir, textoComprimir) { var retorno = textoAtual; if (textoAtual == textoExpandir) { retorno = textoComprimir; } else { retorno = textoExpandir; } return retorno; }