menu last item and sub menu last item

Hello, I apologize if I'm double posting but I couldn't seem to find an answer on this one.

For our menu design we require adding a certain html element for every li item except the very last one. Is there a way to do with with the menu and submenu webvantascript? I tried a few things to no avail.