function AddToLevel()
{
    //alert("step 1");
    var O,i,lo,uoItem,found;
			
    o=window.document.getElementById("lvAvailable");
    //alert("step 3" + o);
    
    lo=window.document.getElementById("lvSelected");
    //alert("step 4" + lo);
	
    if (o.selectedIndex>=0)
    {
        //alert("step 5");	        
        found=0;
        for(i=0;i<lo.length;i++)						
        {
	        loItem=lo.item(i).value;
	        if(loItem==o.value) found=1;							
        } 

        if(found==0)
        {
	        var oOption = document.createElement("OPTION");
	        lo.options.add(oOption);
	        //oOption.innerText = o.item(o.selectedIndex).text;
	        
	        oOption.text = o.item(o.selectedIndex).text;
	        oOption.value = o.value;
	        if (o.selectedIndex>=0) o.remove(o.selectedIndex);
        } 
    }			
}	

function RemoveFromLevel()
{		
    var O,i,lo,uoItem,found;
		
    o=window.document.getElementById("lvSelected");
    lo=window.document.getElementById("lvAvailable");
	
    if (o.selectedIndex>=0)
    {
        found=0;
        for(i=0;i<lo.length;i++)						
        {
	        loItem=lo.item(i).value;
	        if(loItem==o.value) found=1;							
        } 

        if(found==0)
        {
	        var oOption = document.createElement("OPTION");
	        lo.options.add(oOption);
	        //oOption.innerText = o.item(o.selectedIndex).text;
	        oOption.text = o.item(o.selectedIndex).text;
	        oOption.value = o.value;
	        if (o.selectedIndex>=0) o.remove(o.selectedIndex);
        } 
    }
}

/*function AddToLevel()
{
	var O,i,lo,uoItem,found;
		
	o=window.document.body.all("lvAvailable");
	lo=window.document.body.all("lvSelected");
	
	if (o.selectedIndex>=0)
		{
			found=0;
			for(i=0;i<lo.length;i++)						
				{
					loItem=lo.item(i).value;
					if(loItem==o.value) found=1;							
				} 

			if(found==0)
				{
					var oOption = document.createElement("OPTION");
					lo.options.add(oOption);
					oOption.innerText = o.item(o.selectedIndex).text;
					oOption.value = o.value;
					if (o.selectedIndex>=0) o.remove(o.selectedIndex);
				} 
		}			
}	

function RemoveFromLevel()
{		
	var O,i,lo,uoItem,found;
		
	o=window.document.body.all("lvSelected");
	lo=window.document.body.all("lvAvailable");
	
	if (o.selectedIndex>=0)
		{
			found=0;
			for(i=0;i<lo.length;i++)						
				{
					loItem=lo.item(i).value;
					if(loItem==o.value) found=1;							
				} 

			if(found==0)
				{
					var oOption = document.createElement("OPTION");
					lo.options.add(oOption);
					oOption.innerText = o.item(o.selectedIndex).text;
					oOption.value = o.value;
					if (o.selectedIndex>=0) o.remove(o.selectedIndex);
				} 
		}
}*/
				
