function loadMostraMsg() {
	var noticia = "/Ofm_Imprensa/ServletNoticia?";
	noticia += "titulo="+ document.form1.titulo.value;
	noticia += "&texto="+ document.form1.texto.value;	
		
	getXMLHttpRequest("post",noticia,true,"mostraMsg");
}

function mostraMsg() {
	if (req.readyState == 4) {
		if (req.status == 200) {
			var retorno = req.responseText;
			if (retorno == "true") {
				erro_ok("Cadastro efetuado com sucesso");
				window.setTimeout(function() {window.location = "press_release.jsp";}, 5000);
			}
		}
	}
}

function loadMostraMsgEmail() {
	var email = "/Ofm_Imprensa/ServletEmail?";
	email += "nome="+ document.form1.nome.value;
	email += "&email="+ document.form1.email.value;	
		
	getXMLHttpRequest("post",email,true,"mostraMsgEmail");
}

function mostraMsgEmail() {
	if (req.readyState == 4) {
		if (req.status == 200) {
			var retorno = req.responseText;
			if (retorno == "true") {
				erro_ok("Cadastro efetuado com sucesso");
				window.setTimeout(function() {window.location = "email.jsp";}, 5000);
			}
		}
	}
}

function loadMostraMsgEmail() {
	var email = "/Ofm_Imprensa/ServletEmail?";
	email += "nome="+ document.form1.nome.value;
	email += "&email="+ document.form1.email.value;	
		
	getXMLHttpRequest("post",email,true,"mostraMsgEmail");
}

function mostraMsgEmail() {
	if (req.readyState == 4) {
		if (req.status == 200) {
			var retorno = req.responseText;
			if (retorno == "true") {
				erro_ok("Cadastro efetuado com sucesso");
				window.setTimeout(function() {window.location = "email.jsp";}, 5000);
			}
		}
	}
}

