function addArrayToSelect(textArray, valueArray, field, firstOption, firstText, firstValue, selectedValue, formName)
	{
		
		/*this function changes the bank select list when updating in a new window
			textArray - The array of text for each option (wat the user see's)
			valueArray - The array of values for each option (wat the user does NOT see)
			field - the form field to change
			firstOption - boolean.  If true then a first option that is to be displayed and selected
			firstText - the text of the first option
			firstValue - the value of the first option
		*/
		
		var newoption = new Option();
		var i = 0;
		var originalLength = 0;
		var iSelect = 0;
		
		//get the form field
		var list = document.getElementById(formName).elements[field];
		
		if(typeof list != "undefined"){
			originalLength = list.length;
			//clear current values
			for (i = 0 ; i <= originalLength ; i++ ){			
				list.options[0] = null;			
			
			}//for
			
			
			
			//insert first option if there is one...
			if (firstOption){
				//if the selected value is not specified then make this the selected value
				if (selectedValue.length == 0){				
					list.options[list.options.length] = new Option(firstText, firstValue, true);
				}else{
					list.options[list.options.length] = new Option(firstText, firstValue, false);
				}//if
				
			}//if
			
					
			//iterate thru array and add options
			
			for (i = 0 ; i < textArray.length ; i++ ){
			
				if(selectedValue == textArray[i]){
					//make this value the selected value
					list.options[list.options.length] = new Option(textArray[i], valueArray[i], true);
					iSelect = i + 1;
					
				}else{		
					list.options[list.options.length] = new Option(textArray[i], valueArray[i], false);
				}//if
				
			
			}//for
			
			list.selectedIndex = iSelect;
		}//if
		
		
		
		//alert (textArray[textArray.length-1]);
		

	}//addArrayToSelect()
