OK, actually, I think I see the problem.
there are a few things going on.
1) the gup() function should be called inside the initialize function, not in the body onLoad.
2) Do not use a separate animate() function.
the code to set the maps center should be part of the initialize function.
the code flow of the initialize function should be:
1) Draw the map
2) cal the gup() funtion to return the trkstate query string variable
3) get the lat, long and zoom level from your xml page and reset the maps scenter point.