  function makeKeyLinks(inputRef, catalogName)
  {
    var keyBlock = "";
    
    keyList = getLastInput(inputRef);
 

    // Break the list into keywords
    aKey = keyList.split(", ");

    for(i in aKey) 
    {
        keyBlock += '<A HREF = "/scripts/PortWeb.dll?quickfind='+aKey[i]+'&catalog='+catalogName+'&template=CLWadd">'+aKey[i]+'</A>';
		if(i != aKey.length-1)
		{
			keyBlock +=  ', ';
		}
	}

     setLastInput(inputRef,"");
               
     return keyBlock;
  }

  function setLastInput(inputRef, nuValue)
  {
    if (inputRef.length == null)
    { inputRef.value = nuValue; }
    else
    { 
      var curIdx = inputRef.length - 1;
      inputRef[curIdx].value = nuValue;
    }
}

  function getLastInput(inputRef)
  {
    if (inputRef.length == null)
    { return inputRef.value; }
    else
    { 
      var curIdx = inputRef.length - 1;
      return inputRef[curIdx].value;
    }
  }

