var NS4=(navigator.appName=="Netscape" && parseInt(navigator.appVersion)<5);
function MoveOption(objSourceElement, objTargetElement, doMove, objSourceTonF)
{
	var aryTempSourceOptions = new Array();
	var x = 0;
	var TonF = '';
	var TonFv = '-';

	if (objSourceTonF != 0) {
		//find selected option (TonF)
		for (var i = 0; i < objSourceTonF.length; i++) {
		    if (objSourceTonF.options[i].selected) {
	    	    TonF = objSourceTonF.options[i].text;
				TonFv = objSourceTonF.options[i].value;
		    }
		}
	}

	//looping through source element to find selected options
	for (var i = 0; i < objSourceElement.length; i++) {
	    if (objSourceElement.options[i].selected) {
			if (doMove) {
				if (TonFv!='-' && objSourceElement.options[i].value.charAt(0)!='-') {
			        //need to move this option to target element
			        var intTargetLen = objTargetElement.length++;
		    	    objTargetElement.options[intTargetLen].text = objSourceElement.options[i].text + ' (' + TonF + ')';
		        	objTargetElement.options[intTargetLen].value = objSourceElement.options[i].value + '' + -TonFv + '';
				}
			}
	    }
	    else {
	        //storing options that stay to recreate select element
	        var objTempValues = new Object();
	        objTempValues.text = objSourceElement.options[i].text;
	        objTempValues.value = objSourceElement.options[i].value;
	        aryTempSourceOptions[x] = objTempValues;
	        x++;
	    }
	}
	
	if (doMove==false) {
		//resetting length of source
		objSourceElement.length = aryTempSourceOptions.length;
		//looping through temp array to recreate source select element
		for (var i = 0; i < aryTempSourceOptions.length; i++) {
		    objSourceElement.options[i].text = aryTempSourceOptions[i].text;
		    objSourceElement.options[i].value = aryTempSourceOptions[i].value;
		    objSourceElement.options[i].selected = false;
		}
	}
	if (NS4) history.go(0);
}

function submitForm(f2,f3) {
	var list = f2;
	var theList = "";
	for (i = 0; i <= list.options.length-1; i++) { 
		theList += list.options[i].value + "";
		if (i != list.options.length-1) theList += "-";
	}
	f3.value = theList;
}