/////这里列出跟select相关的函数

  //选中一个
  function MoveToRight(oFrom, oTo) {
    //调用
    MoveSelectedOption(oFrom, oTo);
    //然后把左边的屏蔽
    if (oTo.length > 0) {
        oFrom.disabled = true;
    }

  }
  //选中一个
  function MoveToLeft(oFrom, oTo) {
    //调用
    MoveSelectedOption(oFrom, oTo);
    //当右边没有时，然后把左边的激活
    if (oFrom.length == 0) {  //如果没有判断就会有bug，2008-01-03
        oTo.disabled = false;
    }
  }

  //MoveSelectedOption(oFrom, oTo)
  //移动选中的option
  function MoveSelectedOption(oFrom, oTo) {
    var iLen = oFrom.length
    var i = 0;
    //将选中的oFrom的option加到to中
    for (i=0; i<iLen; i++) {
      if (oFrom.options[i].selected) {
        oTo.options[oTo.length] = new Option(oFrom.options[i].text,oFrom.options[i].value);
      }
    }
    //将选中的oFrom的option设置为null
    for (i=iLen-1; i>-1; i--) {
      if (oFrom.options[i].selected) {
        oFrom.options[i]=null;
      }
    }
    //选中一个后将按纽设置为disable
  }

  //MoveAllOption(oFrom, oTo)
  //移动选中的option
  function MoveAllOption(oFrom, oTo) {
    var iLen = oFrom.length
    var i = 0;

    //将oFrom的option加到to中
    for (i=0; i<iLen; i++) {
      oTo.options[oTo.length] = new Option(oFrom.options[i].text,oFrom.options[i].value);
    }
    //将oFrom的option设置为null
    for (i=iLen-1; i>-1; i--) {
      oFrom.options[i]=null;
    }
  }

  //把整个select的option都选上，这个在form.submit之前要调用，要不然request不到
  function SelectAllOption(oSelect) {
    var iLen = oSelect.length;
    for (var i=0; i<iLen; i++){
        oSelect.options[i].selected = true;
    }
  }

  function SearchOption(oFrom, oTo, vValue) {

    var iLen = oFrom.length
    var i = 0;

    //将oFrom的option设置为null
    for (i=iLen-1; i>-1; i--) {
      oFrom.options[i].selected = false;
      if (oFrom.options[i].text.indexOf(vValue) >=0) {
        //移动到选中的地方
	oFrom.options[i].selected = true;
      } 
    }
   
    //MoveSelectedOption(oFrom, oTo);
  }
