Heavens man, that is some terrifying code

You should never need to nest tables like that. Use them sparingly, and certainly not for layout.

For me, it seems to work OK, but I'm not sure what you're trying to do, so can you explain the purpose of it a little more?