

function createRequestObject(){
	var request_;
	var browser = navigator.appName;
	if(browser == "Microsoft Internet Explorer"){
		 request_ = new ActiveXObject("Microsoft.XMLHTTP");
	}else{
		 request_ = new XMLHttpRequest();
	}
	return request_;
}


var http = createRequestObject();


function getInfo(){
	http.open('get', 'test.php?id='+ document.form_select.select_select.selectedIndex);

	http.onreadystatechange = handleInfo;

	http.send(null);
}

var flag=0;





function busca3() {
	if (flag==1){
		window.setTimeOut('busca3()', 20);
		return;
	}
//alert('xxxxxxxx');
	http.open('get','busca_cidade.php?cidade_x=' + document.Add_Content.form_estado.value);
	http.onreadystatechange = handleInfo3;
        http.send(null);

}

function handleInfo3(){
		if(http.readyState == 1){
		//document.Add_Content.seleciona_cidade.value = 'Verificando...';
		//document.getElementById('seleciona_cidade').innerHTML = 'Verificando...';
	}

	if(http.readyState == 4){
		
		var response3 = http.responseText;
		//window.alert(response3);
		//var proximo = response3;
		//proximo++;
		//window.alert(proximo);
		//document.new_product.resultado_matricula.value=response3;
		document.getElementById('seleciona_cidade').innerHTML = response3;
	}
}









function busca4() {
	if (flag==1){
		window.setTimeOut('busca4()', 20);
		return;
	}

	http.open('get','busca_cidade.php?cidade_id=' + document.Edit_Content.form_estado.value);
	http.onreadystatechange = handleInfo4;
        http.send(null);

}

function handleInfo4(){
		if(http.readyState == 1){
		//document.Add_Content.seleciona_cidade.value = 'Verificando...';
		//document.getElementById('seleciona_cidade').innerHTML = 'Verificando...';
	}

	if(http.readyState == 4){
		
		var response4 = http.responseText;
		//window.alert(response3);
		//var proximo = response3;
		//proximo++;
		//window.alert(proximo);
		//document.new_product.resultado_matricula.value=response3;
		document.getElementById('edit_seleciona_cidade').innerHTML = response4;
	}
}







function busca5() {
	if (flag==1){
		window.setTimeOut('busca5()', 20);
		return;
	}

	http.open('get','busca_cidade.php?cidade_id=' + document.filtra.form_estado.value);
	http.onreadystatechange = handleInfo5;
        http.send(null);

}

function handleInfo5(){
		if(http.readyState == 1){
		//document.Add_Content.seleciona_cidade.value = 'Verificando...';
		//document.getElementById('seleciona_cidade').innerHTML = 'Verificando...';
	}

	if(http.readyState == 4){
		
		var response5 = http.responseText;
		//window.alert(response3);
		//var proximo = response3;
		//proximo++;
		//window.alert(proximo);
		//document.new_product.resultado_matricula.value=response3;
		document.getElementById('edit_seleciona_cidade').innerHTML = response5;
	}
}









function busca6() {
	if (flag==1){
		window.setTimeOut('busca6()', 20);
		return;
	}
	
	http.open('get','busca_cidade.php?cidade_x=' + document.Edit_User.form_estado.value);
	http.onreadystatechange = handleInfo6;
    http.send(null);
	//window.alert('busca_cidade.php?cidade_x=' + document.Edit_User.form_estado.value);
}

function handleInfo6(){
		if(http.readyState == 1){
		//document.Add_Content.seleciona_cidade.value = 'Verificando...';
		//document.getElementById('seleciona_cidade').innerHTML = 'Verificando...';
	}

	if(http.readyState == 4){
		var response6 = http.responseText;
		//window.alert(response6);
		//var proximo = response3;
		//proximo++;
		//window.alert(proximo);
		//document.new_product.resultado_matricula.value=response3;
		document.getElementById('edit_seleciona_cidade').innerHTML = response6;
	}
}



function busca7() {
	if (flag==1){
		window.setTimeOut('busca7()', 20);
		return;
	}

	http.open('get','busca_cidade.php?estado_y=' + document.Edit_User.form_estado.value + '&cidade_y=' + document.Edit_User.form_cidade.value );
	http.onreadystatechange = handleInfo7;
        http.send(null);

}

function handleInfo7(){
		if(http.readyState == 1){ 
		//document.Add_Content.seleciona_cidade.value = 'Verificando...';
		//document.getElementById('seleciona_cidade').innerHTML = 'Verificando...';
	}

	if(http.readyState == 4){
		
		var response7 = http.responseText;
		//window.alert(response3);
		//var proximo = response3;
		//proximo++;
		//window.alert(proximo);
		//document.new_product.resultado_matricula.value=response3;
		document.getElementById('edit_seleciona_cidade').innerHTML = response7;
	}
}


function busca9() {
	if (flag==1){
		window.setTimeOut('busca9()', 20);
		return;
	}
   //alert('xxxxxx');
	http.open('get','busca_cidade.php?cidade_x=' + document.Add_Content.form_estado.value);
	http.onreadystatechange = handleInfo9;
        http.send(null);

}

function handleInfo9(){
		if(http.readyState == 1){
		//document.Add_Content.seleciona_cidade.value = 'Verificando...';
		//document.getElementById('seleciona_cidade').innerHTML = 'Verificando...';
	}

	if(http.readyState == 4){
		
		var response9 = http.responseText;
		//window.alert(response3);
		//var proximo = response3;
		//proximo++;
		//window.alert(proximo);
		//document.new_product.resultado_matricula.value=response3;
		document.getElementById('seleciona_cidade').innerHTML = response9;
	}
}


function busca10() {
	if (flag==1){
		window.setTimeOut('busca10()', 20);
		return;
	}
   //alert('xxxxxx');
	http.open('get','busca_cidade.php?cidade_x=' + document.Edit_Content.form_estado.value);
	http.onreadystatechange = handleInfo10;
        http.send(null);

}

function handleInfo10(){
		if(http.readyState == 1){
		//document.Add_Content.seleciona_cidade.value = 'Verificando...';
		//document.getElementById('seleciona_cidade').innerHTML = 'Verificando...';
	}

	if(http.readyState == 4){
		
		var response10 = http.responseText;
		//window.alert(response3);
		//var proximo = response3;
		//proximo++;
		//window.alert(proximo);
		//document.new_product.resultado_matricula.value=response3;
		document.getElementById('seleciona_cidade').innerHTML = response10;
	}
}