function replaceList (listId, selectId, selectText) {
	var select = document.createElement('select');
	select.setAttribute('name', selectId);
	select.onchange = function(){
		location.href = this.value;
	};
	var option = document.createElement('option');
	option.setAttribute('value', '');
	option.appendChild(document.createTextNode(selectText));
	select.appendChild(option);
	
	var list = document.getElementById(listId);
	for (var i = 0; i < list.childNodes.length; i++){
		if(typeof(list.childNodes[i].innerHTML) != "undefined"){
			option = document.createElement('option');
			option.setAttribute('value', list.childNodes[i].childNodes[0].getAttribute('href'));
			option.appendChild(document.createTextNode(list.childNodes[i].childNodes[0].innerHTML));
			select.appendChild(option);
		}
	};
	list.parentNode.parentNode.appendChild(select);
}