	function SecListBox(ListBox,text,value){
		try{
			var option=document.createElement("OPTION");
			option.value=value;
			option.text=text;
			ListBox.options.add(option)
		}
		catch(er){
			alert(er)
		}
	}
	
	function FirstListBox(){
		try{
			var count=document.getElementById("lstBox").options.length;
			for(i=0;i<count;i++){
				if(document.getElementById("lstBox").options[i].selected){
					SecListBox(document.getElementById("ListBox1"),document.getElementById("lstBox").options[i].value,document.getElementById("lstBox").options[i].value);
					document.getElementById("lstBox").remove(i);
					break
				}
			}
		}
		catch(er){
			alert(er)
		}
	}
	
	function SortAllItems(){
		var arr=new Array();
		for(i=0;i<document.getElementById("lstBox").options.length;i++){arr[i]=document.getElementById("lstBox").options[i].value}arr.sort();
		RemoveAll();
		for(i=0;i<arr.length;i++){
			SecListBox(document.getElementById("lstBox"),arr[i],arr[i])
		}
	}
	
	function RemoveAll(){
		try{
			document.getElementById("lstBox").options.length=0
		}
		catch(er){
			alert(er)
			}
	}
	
	function SecondListBox(){
		try{
			var count=document.getElementById("ListBox1").options.length;
			for(i=0;i<count;i++){
				if(document.getElementById("ListBox1").options[i].selected){
					SecListBox(document.getElementById("lstBox"),document.getElementById("ListBox1").options[i].value,document.getElementById("ListBox1").options[i].value);
					document.getElementById("ListBox1").remove(i);
					break
				}
			}
			SortAllItems()
		}catch(er){
			alert(er)
		}
	}

