function fill_textbox_from_combo(from, to)
{
  var fromcombo=document.getElementById(from);
  var totextbox=document.getElementById(to);
  totextbox.value="";
  var len = fromcombo.length-1;
  for(i=0;i<=len;i++)
  {
	totextbox.value+=fromcombo.options[i].text+",";  
  }
}

function removeOption()
	  {
	  var x=document.getElementById("idselectedareas")
	  x.remove(x.selectedIndex)
	  fill_textbox_from_combo('idselectedareas', 'idtxtareaofoperation')
	  }
	  
function insertOption(fromcombo,tocombo)
	  { 
	   var y=document.createElement('option');
	   var from=document.getElementById(fromcombo);
	   var val=from.options[from.selectedIndex].text;
	   y.text=val;
	   var x=document.getElementById(tocombo);
	   //call the function above to do the things.. 
	   try
		{
		  x.add(y,null); // standards compliant
		  fill_textbox_from_combo('idselectedareas', 'idtxtareaofoperation');
		}
	  catch(ex)
		{
		 x.add(y); // IE only
		 fill_textbox_from_combo('idselectedareas', 'idtxtareaofoperation');
		}
		
	  }
	  
function removeOption_required()
	  {
	  var x=document.getElementById("idselectedareas_required")
	  x.remove(x.selectedIndex)
	  fill_textbox_from_combo('idselectedareas_required', 'idtxtareaofoperation_required')
	  }
	
	
	
function insertOption_required(fromcombo,tocombo)
	  { 
	   var y=document.createElement('option');
	   var from=document.getElementById(fromcombo);
	   var val=from.options[from.selectedIndex].text;
	   y.text=val;
	   var x=document.getElementById(tocombo);
	   //call the function above to do the things.. 
	   try
		{
		  x.add(y,null); // standards compliant
		  fill_textbox_from_combo('idselectedareas_required', 'idtxtareaofoperation_required');
		}
	  catch(ex)
		{
		 x.add(y); // IE only
		 fill_textbox_from_combo('idselectedareas_required', 'idtxtareaofoperation_required');
		}
		
	  }

