Code:
function a($)

  $ = Split($, ',')
  $a = 0

  If $[0] <> $[1]
    $a = x,ai,op,ic,ap,co 
    $a = IIf(InStr($a[InStr(caoip, substr($[0],2,1))], substr($[1],2,1)),1,2)

endfunction
Wish I had more time for this one..

I'll be using these in my upcoming coding class - they're fun, interesting, and show how many ways to look at a coding challenge!

Glenn
_________________________
Actually I am a Rocket Scientist! \:D