function move(way, foo) {
	j = -1;
	menuLen = foo.length;

	if (way == 'up') {
		lim = 0;
		m = -1;
	}
	else {
		lim = menuLen-1;
		m = 1;
	}
	
	for (i = 0; i < menuLen; i++) {
		if (foo.options[i].selected) {
			j = i;
			i = menuLen;
		}
	}

	if (j == -1) {
		alert('Select a topic to move by first clicking on it.'); // else if (j==lim) alert('You can\'t go '+way+' any further.')
	}
	else {
		k = j + m;
		tempt = foo.options[k].text;
		tempv = foo.options[k].value; 
		foo.options[k].text = foo.options[j].text;
		foo.options[k].value = foo.options[j].value;
		foo.options[j].text = tempt;
		foo.options[j].value = tempv;
		foo.options[j].selected = false;
		foo.options[k].selected = true;
	}
}

function createOrder(dfr) {
	options = "";
	comma = "";
	
	for (i = 0; i < dfr.length; i++) {
		options += comma + dfr.options[i].value;
		comma = ',';
	}
	
	document.forms[0].order.value = options;
}