/*function OtherIndustry(from,to) 
{
  fromList = eval('document.forms[0].' + from);
  toList = eval('document.forms[0].' + to);
  if (toList.options.length > 0 && toList.options[0].value == 'temp')
  {
    toList.options.length = 0;
  }
  var idx = fromList.selectedIndex;
	if(idx==-1)
	alert ('You have not chosen any industry!');
	//return;
	var current = fromList.options[idx];
    if (current.selected)
    {
      txt = current.text;
      val = current.value;
      toList.options[toList.length] = new Option(txt,val);
      fromList.options[idx] = null;
    }
}
function allSelect() 
{
  List = document.forms[0].chosen;
  if (List.length && List.options[0].value == 'temp') return;
  for (i=0;i<List.length;i++)
  {
     List.options[i].selected = true;
  }
}*/

function copyToList(from,to,form)
{

  //alert(document.invite.members.id);
  fromList = eval('document.'+ form + '.' + from);
  //alert("fromList="+fromList+"  from="+from);
  toList = eval('document.'+ form + '.'+ to);
  //alert("toList="+toList+"  to="+to);

  if (toList.options.length > 0 && toList.options[0].value == 'temp')
  {
    toList.options.length = 0;
  }
  var sel = false;
  for (i=0;i<fromList.options.length;i++)
  {
    var current = fromList.options[i];
    if (current.selected)
    {
      sel = true;
      txt = current.text;
      val = current.value;
      toList.options[toList.length] = new Option(txt,val);
      fromList.options[i] = null;
      i--;
    }
  }
  if (!sel) alert ('You have not chosen any!');
}
function allSelect(to,form) //
{
  //List = document.forms[0].chosen;
  //alert(document.invite.chosenMembers.id);
  List = eval('document.'+ form + '.'+ to);
  //alert("List="+List);
  //alert("List="+List+"  to="+to);
  if (List.length && List.options[0].value == 'temp') return;
  for (i=0;i<List.length;i++)
  {
     List.options[i].selected = true;
     //alert("List.options["+i+"]="+List.options[i].text);
     //alert("List.options["+i+"]="+List.options[i].value);
  }
}

function removeFromList(from,form)
{

  fromList = eval('document.'+ form + '.' + from);

  for (i=0; i<fromList.options.length;i++)
  {
    var current = fromList.options[i];
    if (current.selected)
    {
      fromList.options[i] = null;
    }
  }
}

