function RegionList() {
	this.actElement = document.createElement('li');
		this.actElement.appendChild(document.createElement('ul'));
}
RegionList.prototype.show = function(el) {
	var parent = el.parentNode;
	var prevP = this.actElement.getElementsByTagName('ul')[0];
	var actP = parent.getElementsByTagName('ul')[0];
	if (this.actElement == parent) {
		if (actP.style.display == 'none') actP.style.display = 'block';
		else actP.style.display = 'none';
	}
	else {
		prevP.style.display = 'none';
		actP.style.display = 'block';
	}
	this.actElement = parent;
}
RegionList.show = function(node,obj) {obj.show(node);}
RegionList.prototype.selectCountry = function(node,obj) {
	obj.select(node.id);
}

function SelectListElement(label,input) {
	this.label = label;
	this.input = input;
}
SelectListElement.prototype.select = function(text) {
	this.label.innerHTML = text;
	this.input.value = text;
}
SelectListElement.select = function(node,obj){obj.select(node.innerHTML);}

