But it does sound like you're trying to make JS+DOM do something it isn't suitable for.

Wade.