/*
* Desenvolvido por Luciano Dexheimer Morais
* E-mail: lucianodmorais@gmail.com
* Website: http://www.lucianomorais.com.br
*/

function edicaoAlterar(id) {
	AjaxRequest();
	if(!Ajax) {
		alert("Erro na chamada");
		return;
	}
	document.getElementById("jornalstatus").innerHTML='<b>Carregando...</b>';
	Ajax.onreadystatechange = edicaoAlterarProc;
	Ajax.open('GET', 'ajax/edicoes/edicoes.php?ajaxON=1&idedicoes='+id, true);
	Ajax.send(null);
}
function edicaoAlterarProc() {
	if(Ajax.readyState == 4) {
		if(Ajax.status == 200) {
			var respo = Ajax.responseText;
			respo=respo.split('%');
			document.getElementById("jornal1").src=respo[0];
			document.getElementById("jornal2").href=respo[1];
			document.getElementById("jornalstatus").innerHTML='';
		} else {
			alert("Erro: "+Ajax.statusText);
		}
	}
}
