')[1];
// now look for players, assuming the grid style
var stopTryingGridStyle = false;
vasplit = playersplit.split('\/game\/player\.pl\?player\_id\='+playerId+'"')[1];
vasplit = vasplit.split('
')[2];
if (vasplit != null) {
vasplit = vasplit.substring(0, vasplit.indexOf('
'));
vaxp = vasplit.substring(0,vasplit.indexOf('/'));
} else {
// the homepage must be using the list style, try parsing like that
// split off anything before the player's row in the list
vasplit = playersplit.split('\/game\/player\.pl\?player\_id\='+playerId+'"')[1];
vasplit = vasplit.split('\
')[1];
vasplit = vasplit.substring(0, vasplit.indexOf(' | '));
if (vasplit != null) {
vaxp = vasplit;
} else {
alert('failed to retrieve VA XP from the agent\'s homepage');
}
}
setVAXP(parseInt(vaxp));
txt = txt.slice(txt.indexOf(', Day ')+5);
var d = txt.substring(0,txt.indexOf('
'));
setDay(parseInt(d));
getInetPage("/game/bonus_tokens.pl?player_id="+playerId, loadTrainingUpgrades);
}
function loadTrainingUpgrades(address, page) {
resetTrainingUpgrades();
var txt = page.responseText;
var enhanceRegex = /