/**
* Conexão Ajax
*/
function getXmlHttp(){
	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 setCombo(id, target){
	url = "./?state_id="+id;
	xmlhttp = getXmlHttp();
	xmlhttp.open("GET", url, true);
	document.getElementById(target).innerHTML = '<br/>Carregando...';
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4){
			document.getElementById(target).innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);
}


jQuery(function($){
   $(".txt-zipcode").mask("99999-999");
});
