
<!--

//****************************************************************

  function selectOptionByValue(element,target)
  {
    for(i=0;i<element.options.length;i++)
    {
      if(element.options[i].value==target)
      {
        element.selectedIndex=i;
        return;
      }
    }
  }

//****************************************************************
function one2two(m1, m2) {
    m1len = m1.length ;
    for ( i=0; i<m1len ; i++){
        if (m1.options[i].selected == true ) {
            m2len = m2.length;
            m2.options[m2len]= new Option(m1.options[i].text, m1.options[i].value);
        }
    }

    for ( i = (m1len -1); i>=0; i--){
        if (m1.options[i].selected == true ) {
            m1.options[i] = null;
        }
    }
}
//****************************************************************

function two2one(m1, m2) {
    m2len = m2.length ;
        for ( i=0; i<m2len ; i++){
            if (m2.options[i].selected == true ) {
                m1len = m1.length;
                m1.options[m1len]= new Option(m2.options[i].text,m2.options[i].value);
            }
        }
        for ( i=(m2len-1); i>=0; i--) {
            if (m2.options[i].selected == true ) {
                m2.options[i] = null;
            }
        }
}
//****************************************************************
function makeAllSelected(m)
{

    for (i=0; i<m.length; i++) {
         m.options[i].selected = true;
    }
 }
//****************************************************************

 function trim(inputString) {
   if (typeof inputString != "string") { return inputString; }
   var retValue = inputString;
   var ch = retValue.substring(0, 1);
   while (ch == " ") { // Check for spaces at the beginning of the string
      retValue = retValue.substring(1, retValue.length);
      ch = retValue.substring(0, 1);
   }
   ch = retValue.substring(retValue.length-1, retValue.length);
   while (ch == " ") { // Check for spaces at the end of the string
      retValue = retValue.substring(0, retValue.length-1);
      ch = retValue.substring(retValue.length-1, retValue.length);
   }
   while (retValue.indexOf("  ") != -1) { // Note that there are two spaces in the string - look for multiple spaces within the string
      retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); // Again, there are two spaces in each of the strings
   }
   return retValue; // Return the trimmed string back to the user
} // Ends the "trim" function
//****************************************************************

 function isEmpty(p1, len )
 {
   if (p1.length < len)
     return true;
   else
     return false;
 }
 //****************************************************************

 function isTooLong(p1, len )
 {
   if (p1.length > len)
     return true;
   else
     return false;
 }
 //****************************************************************
//****************************************************************
//****************************************************************

//-->
