I am pretty sure there is a way in awk to figure out how many fields you have, then take the total # of fields -3 each time to get the third last one. Just heading out the door and off hand can't remember how it would be done.
i can do it in cheetah templating with
set myloc = $getVar("hostname","")split('.')[-3]
the -3 says the last 3rd field in the string - i need the same so maybe awk can do this