function hide(id){
	document.getElementById(id).style.display='none';	
}
function show(id){
	
}

function pop(url,nome,wd,hg){
	window.open(url,nome,"status = 1, height = "+hg+", width = "+wd+", resizable = 0" );
} 

function errorsOnSubmit (evt) {
	form=evt.currentTarget;
	var ret = Spry.Widget.Form.validate(form);		
	if (!ret){
		alert("Algum campo obrigatorio foi deixando em branco"); 
	}
	return ret; 	
}

function subForm() { 		
	 for (var i=0; i < document.forms.length; i++) { 
//		document.forms[i].addEventListener('submit',errorsOnSubmit,false);
//	 	document.forms[i].onsubmit = function(evt) {form=evt.currentTarget; var ret = Spry.Widget.Form.validate(form); if (!ret){ alert("Algum campo obrigató foi deixando em branco"); } return ret; };
	 }
}

/* function.js */

	function some(a){	
		document.getElementById(a).style.display='none';
	}
	function mostra(a){	
		document.getElementById(a).style.display="inline";
	}
	function get(a){
		return document.getElementById(a);
	}
	
	function getXmlHttpRequest() {
		if (window.XMLHttpRequest) {
			return new XMLHttpRequest();
		} else if (window.ActiveXObject) {
			return new ActiveXObject("Microsoft.XMLHTTP");
		}
	}

	function alteraURL(url,id){
		//document.getElementById('carregando').innerHTML=
		var xmlhttp = getXmlHttpRequest();
		xmlhttp.open("GET", url, true);
		xmlhttp.onreadystatechange = function(){
			if (xmlhttp.readyState==4){
				//setTimeout("document.getElementById('carregando').innerHTML='&nbsp;';",100);
				document.getElementById(id).innerHTML = (xmlhttp.responseText);		
			}
		}	
		xmlhttp.send(null);
	}
	
	function exclui(id,url){
		var a = confirm("Tem certeza que deseja deletar o item "+id);
		if(a){
			window.location=url;
		}		
	}
	
	function confirma(id,url,titulo){
		var a = confirm("Tem certeza que deseja "+titulo+" o item "+id);
		if(a){
			window.location=url;
		}
	}
