var setStates = function(countryid,state_container,fieldname,stateid) {
	var callback = {
		success: function(o) {
			var result = JSON.parse(o);
			$(state_container).html(result);
			if (stateid) {
				$(state_container).find('option[value="' + stateid + '"]').attr('selected',true);
			}
		},

		failure: function() {}
	}

	ds_remote_api_jq(
		"update_states",
		{ 
			"countryid":		countryid, 
			"sd_first_option":	'Select State/Province' ,
			"sd_formname":		fieldname,
			"sd_width":		'250'	
		},
		callback
	);
}
