Thanks alot Ralph
Your solution above seems to work fine with one small exception.
In the large code replacement above you have to change the line
while ($products_options = tep_db_fetch_array($products_options_query))
with
while ($products_options = tep_db_fetch_array($products_options))
I'm still not finished with all files in admin, I'll write back here if there are any problems.