var _timer=setInterval(function(){
if(/loaded|complete/.test(document.readyState)){
clearInterval(_timer)
init();
}}, 10);


function enableStatesDropdown(obj){
		
		var state = document.getElementById('chosenState');
		
		var country = obj;
		
		if (country.value === 'United States'){
		
			state.disabled = false;
		
		}
		else {
	
			
			state.value = '';
			state.disabled = true;
			
		}
		
}

function init() {
	console.log('init called');
	var state = document.getElementById('chosenState');

	if( state != null) {

		var country = document.getElementById('chosenCountry');
		console.log(country.value);
		if (country.value === 'United States'){
		
			state.disabled = false;
		
		}
		else
		{
			state.disabled = true;
		}
		
		
	}
}

