velocity question - nav images src

I’m trying to get nav images to display correctly in templates. Currently they are publishing correctly to:

root/open/images/mainNav

I have created bindings in the templates for each state (active, inactive and rollover) e.g. /open/images/mainNav/" + $sys.item.getProperty(“rx:sys_contentid”).String + “ia” + $rx.location.getFirstDefined
($sys.item,“rx:inactiveimg_filename,rx:sys_suffix”,".gif")

It generates this:

MM_preloadImages(’/open/images/mainNav/732_ia_.gif’);

and for the src it generates:

img alt=“The Institute” border=“0” src="/open/images/mainNav/732_ia_.gif" height=“20” width=“120” name=“img_a728”

I tried a coupld of variations based on how the name attribute is populated but no luck so far.

In the binding, how can I get $sys.item.getProperty(“rx:sys_contentid”).String to find the image content ID (728) rather than the navon content id (732)?