
function mount_XMLHttp()
{
	try{
		xmlhttp = new XMLHttpRequest();
	}catch(ee){
		try{
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){
			try{
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			}catch(E){
				xmlhttp = false;
			}
		}
	}
return xmlhttp;
}



function news_seta_cadastro()
{

	var nome = document.form_cad_news.news_nome.value;
	var email = document.form_cad_news.news_email.value;

	var xmlhttp	= mount_XMLHttp();
	var url	= "../shared/ajax/news.cadastro.php?a=1&nome="+nome+'&email='+email;
	xmlhttp.open("GET", url,true);

	xmlhttp.onreadystatechange=function() {
		if(xmlhttp.readyState==4){
			retorno	=	xmlhttp.responseText;
			document.getElementById('form_cad_news').style.display	= 'none';
			document.getElementById('cadastro_msg').style.display	= 'block';
			document.getElementById('cadastro_msg').innerHTML		= retorno;
			self.setTimeout('news_show_cad()', 4000) ;
		}
	}
	xmlhttp.send(null);
}


function news_show_cad()
{
	window.clearTimeout();
	document.getElementById('form_cad_news').style.display	= 'block';
	document.getElementById('cadastro_msg').style.display	= 'none';
	document.form_cad_news.reset();
}