function Area(code, name) {
	this._code = code;
	this._name = name;
	this._option = null;
}
Area.prototype._code;
Area.prototype._name;
Area.prototype._option;
Area.prototype.isArea = function() {
	return true;
}
Area.prototype.option = function() {
	if (this._option == null) {
		this._option = $('<option></option>').text(this._name).val(this._code).attr('disabled', 'disabled');
	}
	return this._option;
}

function City(code, name, parent) {
	this._code = code;
	this._name = name;
	if (parent) {
		this._parent = parent;
	}
	this._arrivals = [];
	this._option = null;
}
City.prototype._code;
City.prototype._name;
City.prototype._parent;
City.prototype._arrivals;
City.prototype._option;
City.prototype.isArea = function() {
	return false;
}
City.prototype.to = function(arrival) {
	this._arrivals.push(arrival);
}
City.prototype.option = function() {
	if (this._option == null) {
		this._option = $('<option></option>').text(this._name).val(this._code);
		if (this._parent) {
			this._option.addClass('indented_option');
		}
	}
	return this._option;
}
