function ajax(url, concatenacao)
{

	if(window.XMLHttpRequest){
		xmlhttp2=new XMLHttpRequest();
		if(xmlhttp2.overrideMimeType){
			xmlhttp2.overrideMimeType('text/xml');
		}
	} else if(window.ActiveXObject){
		try{
			xmlhttp2=new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {
			try{
				xmlhttp2=new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e){
			}
		}
	}

	if(!xmlhttp2) {
		alert('Giving up :( Cannot create an XMLHTTP instance');
		return false;
	}
	
	data = new Date(); 
	sec = (data.getHours() * 24 * 60 * 1000) + (data.getMinutes() * 60 * 1000) + (data.getSeconds() * 1000) + data.getMilliseconds();

	xmlhttp2.open('GET',url+concatenacao+'sec='+sec,false);
	xmlhttp2.send(null);
	
	if(xmlhttp2.readyState == 4) 
	{
		return xmlhttp2.responseText;
	}
}

function check()
{
	var nome = document.contato.nome.value;
	var mail = document.contato.mail.value;
	var assunto = document.contato.assunto.value;
	var msg = document.contato.msg.value;
	if (nome != '' && mail != '' & assunto != '' & msg != '')
	{
		document.contato.submit();
	}
	else alert('É preciso preencher todos os campos!');
}

function ck_cad()
{
	var tel = document.cadastro.tel.value.length;
	var cel = document.cadastro.cel.value.length;
	if (tel > 8) document.cadastro.tel.value = document.cadastro.tel.value.substring(0, tel - 1);
	if (cel > 8) document.cadastro.cel.value = document.cadastro.cel.value.substring(0, cel - 1);
}