function processOperator(arrayOf2Texts, select, input) {
	if (select.selectedIndex == 6) {
		one = prompt(arrayOf2Texts[0], "");
	    if (one != null)
        	two = prompt(arrayOf2Texts[1], "");
	    if (one != null && two != null)
        	input.value = one + " and " +two;
		input.focus();
	} else if (select.selectedIndex == 7 || select.selectedIndex == 8) {
		all = "";
		one = prompt(arrayOf2Texts[0], "");
		repeat = arrayOf2Texts[1];
		if (one != null) {
			all += one;
			one = prompt(repeat, "");
		}
		while (one != null) {
			all += ',' + one;
			one = prompt(repeat, "");
		}
		if (all != "")
			input.value = all;
		input.focus();
	}
}

function handleOperator(select, input) {
	if (select.selectedIndex == 6) 
		processOperator(messages[0], select, input);
	else if (select.selectedIndex == 7 || select.selectedIndex == 8) 
		processOperator(messages[1], select, input);
}
