## Script (Python) "getLevelFromResultsList"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=list
##title=
##
# $Id: getLevelFromResultsCosCode.py 1463 2007-02-21 21:02:25Z henrik $
lnr = 0
for e in list:
    if e.CosCode == "N/A":
        return 2
    try:
        cc = int(e.CosCode[3])
    except:
        continue
    if lnr <= cc:
        lnr = cc
return lnr
