function getState2(url)
{ 
	//if(xmlHttp1 != null) 
	xmlHttp1=GetxmlHttpObject();
	document.getElementById("divCity2").innerHTML='';
	document.getElementById("divState2").innerHTML='<font color=red>Please wait...</font>';
	
	/*if(url == 'getstate_freecomp2.php?country=INDIA')
	{
		document.getElementById("divState2").innerHTML = indiaStates;
	}
	else
	{*/
		xmlHttp1.onreadystatechange=stateChanged_3;
		xmlHttp1.open("GET",url,true);
		xmlHttp1.send(null);
	//}
} 
function getCity2(url)
{ 
	xmlHttp1=GetxmlHttpObject();
	xmlHttp1.onreadystatechange=stateChanged_4;
	xmlHttp1.open("GET",url,true);
	xmlHttp1.send(null);
	
} 


function stateChanged_3() 
{ 
if (xmlHttp1.readyState==4)
	{ 
			document.getElementById("divCity2").innerHTML='';
			document.getElementById("divState2").innerHTML=xmlHttp1.responseText;
	}
}

function stateChanged_4() 
{ 
if (xmlHttp1.readyState==4)
	{ 
		document.getElementById("divCity2").innerHTML=xmlHttp1.responseText;
	}
}


function setCity2(val){
	if(val == 'Not in List'){
		document.f.found2.value = 'R';
		document.f.birthplace_city2.value = '';
	}
	else{
		document.f.found2.value = 'H';
		document.f.birthplace_city2.value = val;
	}
	
}
function setCountry2(val){
	document.f.birthplace_country2.value = document.f.country2.value;
	document.f.birthplace_city2.value = '';
	cIndex = val.indexOf('- U.S.A.');
	if(cIndex > 0)
		document.f.birthplace_state2.value = val.substring(0,cIndex - 1)
	else
		document.f.birthplace_state2.value = '';
}

