var standings_rs_alc = [{
	w: '73',
	elim: '-',
	rs: '659',
	div: 'alc',
	gameid: '2008_08_22_tbamlb_chamlb_1',
	status: 'P',
	pre: null,
	last10: '8-2',
	onerun: '17-13',
	xtr: '6-2',
	nextg: '8/22 v TB,  8:11P',
	vsW: '16-12',
	ra: '542',
	gb: '-',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_seamlb_chamlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3339013&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '45-19',
	code: 'cws',
	pct: '.579',
	league_sensitive_team_name: 'Chi White Sox',
	vsC: '36-21',
	vsE: '9-14',
	vsR: '47-38',
	vsL: '26-15',
	xwl: '74-52',
	strk: 'W5',
	l: '53',
	lastg: '8/20 v SEA, W 15-3',
	interleague: '12-6',
	team: 'Chicago',
	road: '28-34'
}, {
	w: '72',
	elim: '36',
	rs: '641',
	div: 'alc',
	gameid: '2008_08_21_minmlb_anamlb_1',
	status: 'P',
	pre: null,
	last10: '7-3',
	onerun: '22-20',
	xtr: '6-6',
	nextg: '8/21 @ LAA, 10:05P',
	vsW: '13-13',
	ra: '579',
	gb: '1.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_oakmlb_minmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3338585&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '46-23',
	code: 'min',
	pct: '.571',
	league_sensitive_team_name: 'Minnesota',
	vsC: '36-21',
	vsE: '9-16',
	vsR: '49-39',
	vsL: '23-15',
	xwl: '69-57',
	strk: 'W2',
	l: '54',
	lastg: '8/20 v OAK, W 3-1',
	interleague: '14-4',
	team: 'Minnesota',
	road: '26-31'
}, {
	w: '62',
	elim: '25',
	rs: '644',
	div: 'alc',
	gameid: '2008_08_22_detmlb_kcamlb_1',
	status: 'P',
	pre: null,
	last10: '4-6',
	onerun: '14-19',
	xtr: '3-7',
	nextg: '8/22 @ KC,  8:10P',
	vsW: '16-12',
	ra: '634',
	gb: '11.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_detmlb_texmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3341666&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '33-28',
	code: 'det',
	pct: '.488',
	league_sensitive_team_name: 'Detroit',
	vsC: '21-30',
	vsE: '12-18',
	vsR: '39-51',
	vsL: '23-14',
	xwl: '64-63',
	strk: 'L1',
	l: '65',
	lastg: '8/20 @ TEX, L 1-9',
	interleague: '13-5',
	team: 'Detroit',
	road: '29-37'
}, {
	w: '58',
	elim: '23',
	rs: '594',
	div: 'alc',
	gameid: '2008_08_21_kcamlb_clemlb_1',
	status: 'I',
	pre: null,
	last10: '7-3',
	onerun: '9-13',
	xtr: '3-8',
	nextg: '8/21 v KC, <a href="javascript:void(0)" onclick="launchGameday({gid:\'2008_08_21_kcamlb_clemlb_1\',mode:\'gameday\'})">LIVE</a>',
	vsW: '16-15',
	ra: '581',
	gb: '14.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_kcamlb_clemlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3340413&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '35-29',
	code: 'cle',
	pct: '.464',
	league_sensitive_team_name: 'Cleveland',
	vsC: '19-30',
	vsE: '17-10',
	vsR: '44-49',
	vsL: '14-18',
	xwl: '64-61',
	strk: 'W3',
	l: '67',
	lastg: '8/20 v KC, W 8-5',
	interleague: '6-12',
	team: 'Cleveland',
	road: '23-38'
}, {
	w: '55',
	elim: '19',
	rs: '519',
	div: 'alc',
	gameid: '2008_08_21_kcamlb_clemlb_1',
	status: 'I',
	pre: null,
	last10: '2-8',
	onerun: '18-15',
	xtr: '5-6',
	nextg: '8/21 @ CLE, <a href="javascript:void(0)" onclick="launchGameday({gid:\'2008_08_21_kcamlb_clemlb_1\',mode:\'gameday\'})">LIVE</a>',
	vsW: '10-12',
	ra: '636',
	gb: '18.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_kcamlb_clemlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3340413&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '28-34',
	code: 'kc',
	pct: '.437',
	league_sensitive_team_name: 'Kansas City',
	vsC: '18-28',
	vsE: '14-26',
	vsR: '32-53',
	vsL: '23-18',
	xwl: '51-75',
	strk: 'L4',
	l: '71',
	lastg: '8/20 @ CLE, L 5-8',
	interleague: '13-5',
	team: 'Kansas City',
	road: '27-37'
}]
var standings_rs_ale = [{
	w: '77',
	elim: '-',
	rs: '578',
	div: 'ale',
	gameid: '2008_08_22_tbamlb_chamlb_1',
	status: 'P',
	pre: null,
	last10: '7-3',
	onerun: '23-14',
	xtr: '8-4',
	nextg: '8/22 @ CWS,  8:11P',
	vsW: '22-12',
	ra: '502',
	gb: '-',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_anamlb_tbamlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3339683&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '47-18',
	code: 'tb',
	pct: '.611',
	league_sensitive_team_name: 'Tampa Bay',
	vsC: '15-12',
	vsE: '28-19',
	vsR: '57-31',
	vsL: '20-18',
	xwl: '71-55',
	strk: 'L1',
	l: '49',
	lastg: '8/20 v LAA, L 4-5',
	interleague: '12-6',
	team: 'Tampa Bay',
	road: '30-31'
}, {
	w: '73',
	elim: '32',
	rs: '656',
	div: 'ale',
	gameid: '2008_08_22_bosmlb_tormlb_1',
	status: 'P',
	pre: null,
	last10: '6-4',
	onerun: '15-19',
	xtr: '6-2',
	nextg: '8/22 @ TOR,  7:07P',
	vsW: '20-15',
	ra: '539',
	gb: '4.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_bosmlb_balmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3339701&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '43-18',
	code: 'bos',
	pct: '.575',
	league_sensitive_team_name: 'Boston',
	vsC: '19-8',
	vsE: '23-24',
	vsR: '55-44',
	vsL: '18-10',
	xwl: '75-52',
	strk: 'L1',
	l: '54',
	lastg: '8/20 @ BAL, L 6-11',
	interleague: '11-7',
	team: 'Boston',
	road: '30-36'
}, {
	w: '67',
	elim: '27',
	rs: '607',
	div: 'ale',
	gameid: '2008_08_21_nyamlb_tormlb_1',
	status: 'P',
	pre: null,
	last10: '4-6',
	onerun: '21-16',
	xtr: '6-2',
	nextg: '8/21 @ TOR,  7:07P',
	vsW: '16-10',
	ra: '557',
	gb: '10.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_nyamlb_tormlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3339443&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '38-27',
	code: 'nyy',
	pct: '.532',
	league_sensitive_team_name: 'NY Yankees',
	vsC: '17-18',
	vsE: '24-23',
	vsR: '49-40',
	vsL: '18-19',
	xwl: '68-58',
	strk: 'W1',
	l: '59',
	lastg: '8/20 @ TOR, W 5-1',
	interleague: '10-8',
	team: 'New York',
	road: '29-32'
}, {
	w: '65',
	elim: '25',
	rs: '540',
	div: 'ale',
	gameid: '2008_08_21_nyamlb_tormlb_1',
	status: 'P',
	pre: null,
	last10: '6-4',
	onerun: '19-24',
	xtr: '4-7',
	nextg: '8/21 v NYY,  7:07P',
	vsW: '17-19',
	ra: '493',
	gb: '12.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_nyamlb_tormlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3339443&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '35-27',
	code: 'tor',
	pct: '.516',
	league_sensitive_team_name: 'Toronto',
	vsC: '18-11',
	vsE: '22-21',
	vsR: '52-41',
	vsL: '13-20',
	xwl: '68-58',
	strk: 'L1',
	l: '61',
	lastg: '8/20 v NYY, L 1-5',
	interleague: '8-10',
	team: 'Toronto',
	road: '30-34'
}, {
	w: '61',
	elim: '21',
	rs: '650',
	div: 'ale',
	gameid: '2008_08_22_nyamlb_balmlb_1',
	status: 'P',
	pre: null,
	last10: '5-5',
	onerun: '19-21',
	xtr: '4-6',
	nextg: '8/22 v NYY,  7:05P',
	vsW: '15-16',
	ra: '647',
	gb: '16.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_bosmlb_balmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3339701&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '32-26',
	code: 'bal',
	pct: '.484',
	league_sensitive_team_name: 'Baltimore',
	vsC: '15-12',
	vsE: '20-30',
	vsR: '48-44',
	vsL: '13-21',
	xwl: '63-63',
	strk: 'W1',
	l: '65',
	lastg: '8/20 v BOS, W 11-6',
	interleague: '11-7',
	team: 'Baltimore',
	road: '29-39'
}]
var standings_rs_alw = [{
	w: '77',
	elim: '-',
	rs: '587',
	div: 'alw',
	gameid: '2008_08_21_minmlb_anamlb_1',
	status: 'P',
	pre: null,
	last10: '5-5',
	onerun: '25-15',
	xtr: '3-3',
	nextg: '8/21 v MIN, 10:05P',
	vsW: '20-13',
	ra: '528',
	gb: '-',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_anamlb_tbamlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3339683&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '37-23',
	code: 'ana',
	pct: '.616',
	league_sensitive_team_name: 'LA Angels',
	vsC: '19-12',
	vsE: '28-15',
	vsR: '54-38',
	vsL: '23-10',
	xwl: '69-56',
	strk: 'W1',
	l: '48',
	lastg: '8/20 @ TB, W 5-4',
	interleague: '10-8',
	team: 'Los Angeles',
	road: '40-25'
}, {
	w: '63',
	elim: '21',
	rs: '714',
	div: 'alw',
	gameid: '2008_08_22_clemlb_texmlb_1',
	status: 'P',
	pre: null,
	last10: '3-7',
	onerun: '23-13',
	xtr: '5-5',
	nextg: '8/22 v CLE,  8:05P',
	vsW: '20-15',
	ra: '777',
	gb: '15.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_detmlb_texmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3341666&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '33-30',
	code: 'tex',
	pct: '.492',
	league_sensitive_team_name: 'Texas',
	vsC: '17-18',
	vsE: '16-24',
	vsR: '48-40',
	vsL: '15-25',
	xwl: '59-69',
	strk: 'W1',
	l: '65',
	lastg: '8/20 v DET, W 9-1',
	interleague: '10-8',
	team: 'Texas',
	road: '30-35'
}, {
	w: '57',
	elim: '17',
	rs: '494',
	div: 'alw',
	gameid: '2008_08_21_oakmlb_seamlb_1',
	status: 'P',
	pre: null,
	last10: '3-7',
	onerun: '17-22',
	xtr: '7-6',
	nextg: '8/21 @ SEA, 10:10P',
	vsW: '14-20',
	ra: '514',
	gb: '20.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_oakmlb_minmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3338585&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '34-33',
	code: 'oak',
	pct: '.452',
	league_sensitive_team_name: 'Oakland',
	vsC: '18-18',
	vsE: '15-23',
	vsR: '38-46',
	vsL: '19-23',
	xwl: '61-65',
	strk: 'L2',
	l: '69',
	lastg: '8/20 @ MIN, L 1-3',
	interleague: '10-8',
	team: 'Oakland',
	road: '23-36'
}, {
	w: '46',
	elim: '6',
	rs: '524',
	div: 'alw',
	gameid: '2008_08_21_oakmlb_seamlb_1',
	status: 'P',
	pre: null,
	last10: '1-9',
	onerun: '13-24',
	xtr: '3-7',
	nextg: '8/21 v OAK, 10:10P',
	vsW: '14-20',
	ra: '643',
	gb: '31.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_seamlb_chamlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3339013&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '24-38',
	code: 'sea',
	pct: '.365',
	league_sensitive_team_name: 'Seattle',
	vsC: '10-23',
	vsE: '13-28',
	vsR: '34-54',
	vsL: '12-26',
	xwl: '51-75',
	strk: 'L6',
	l: '80',
	lastg: '8/20 @ CWS, L 3-15',
	interleague: '9-9',
	team: 'Seattle',
	road: '22-42'
}]
var standings_rs_nlc = [{
	w: '77',
	elim: '-',
	rs: '678',
	div: 'nlc',
	gameid: '2008_08_21_cinmlb_chnmlb_1',
	status: 'I',
	pre: null,
	last10: '7-3',
	onerun: '17-19',
	xtr: '8-5',
	nextg: '8/21 v CIN, <a href="javascript:void(0)" onclick="launchGameday({gid:\'2008_08_21_cinmlb_chnmlb_1\',mode:\'gameday\'})">LIVE</a>',
	vsW: '23-10',
	ra: '508',
	gb: '-',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_cinmlb_chnmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3339735&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '46-18',
	code: 'chc',
	pct: '.611',
	league_sensitive_team_name: 'Chi Cubs',
	vsC: '34-23',
	vsE: '14-7',
	vsR: '53-38',
	vsL: '24-11',
	xwl: '79-47',
	strk: 'L1',
	l: '49',
	lastg: '8/20 v CIN, L 1-2',
	interleague: '6-9',
	team: 'Chicago',
	road: '31-31'
}, {
	w: '73',
	elim: '31',
	rs: '600',
	div: 'nlc',
	gameid: '2008_08_22_pitmlb_milmlb_1',
	status: 'P',
	pre: null,
	last10: '6-4',
	onerun: '24-11',
	xtr: '9-5',
	nextg: '8/22 v PIT,  8:05P',
	vsW: '18-11',
	ra: '548',
	gb: '5.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_houmlb_milmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3338522&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '38-24',
	code: 'mil',
	pct: '.570',
	league_sensitive_team_name: 'Milwaukee',
	vsC: '32-24',
	vsE: '16-12',
	vsR: '47-42',
	vsL: '26-13',
	xwl: '69-59',
	strk: 'W1',
	l: '55',
	lastg: '8/20 v HOU, W 5-2',
	interleague: '7-8',
	team: 'Milwaukee',
	road: '35-31'
}, {
	w: '71',
	elim: '28',
	rs: '619',
	div: 'nlc',
	gameid: '2008_08_22_atlmlb_slnmlb_1',
	status: 'P',
	pre: null,
	last10: '6-4',
	onerun: '21-22',
	xtr: '6-10',
	nextg: '8/22 v ATL,  8:15P',
	vsW: '17-10',
	ra: '568',
	gb: '7.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_pitmlb_slnmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3340594&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '34-29',
	code: 'stl',
	pct: '.550',
	league_sensitive_team_name: 'St. Louis',
	vsC: '29-28',
	vsE: '18-12',
	vsR: '50-36',
	vsL: '21-22',
	xwl: '70-59',
	strk: 'W1',
	l: '58',
	lastg: '8/20 v PIT, W 11-2',
	interleague: '7-8',
	team: 'St. Louis',
	road: '37-29'
}, {
	w: '64',
	elim: '23',
	rs: '575',
	div: 'nlc',
	gameid: '2008_08_22_houmlb_nynmlb_1',
	status: 'P',
	pre: null,
	last10: '6-4',
	onerun: '17-19',
	xtr: '3-3',
	nextg: '8/22 @ NYM,  7:10P',
	vsW: '17-13',
	ra: '615',
	gb: '13.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_houmlb_milmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3338522&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '34-28',
	code: 'hou',
	pct: '.504',
	league_sensitive_team_name: 'Houston',
	vsC: '27-30',
	vsE: '13-9',
	vsR: '44-46',
	vsL: '20-17',
	xwl: '60-67',
	strk: 'L1',
	l: '63',
	lastg: '8/20 @ MIL, L 2-5',
	interleague: '7-11',
	team: 'Houston',
	road: '30-35'
}, {
	w: '57',
	elim: '16',
	rs: '589',
	div: 'nlc',
	gameid: '2008_08_22_pitmlb_milmlb_1',
	status: 'P',
	pre: null,
	last10: '4-6',
	onerun: '19-16',
	xtr: '11-3',
	nextg: '8/22 @ MIL,  8:05P',
	vsW: '10-14',
	ra: '683',
	gb: '20.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_pitmlb_slnmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3340594&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '34-31',
	code: 'pit',
	pct: '.449',
	league_sensitive_team_name: 'Pittsburgh',
	vsC: '26-30',
	vsE: '15-17',
	vsR: '43-50',
	vsL: '14-20',
	xwl: '55-72',
	strk: 'L1',
	l: '70',
	lastg: '8/20 @ STL, L 2-11',
	interleague: '6-9',
	team: 'Pittsburgh',
	road: '23-39'
}, {
	w: '56',
	elim: '15',
	rs: '535',
	div: 'nlc',
	gameid: '2008_08_21_cinmlb_chnmlb_1',
	status: 'I',
	pre: null,
	last10: '4-6',
	onerun: '19-10',
	xtr: '6-7',
	nextg: '8/21 @ CHC, <a href="javascript:void(0)" onclick="launchGameday({gid:\'2008_08_21_cinmlb_chnmlb_1\',mode:\'gameday\'})">LIVE</a>',
	vsW: '9-15',
	ra: '640',
	gb: '21.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_cinmlb_chnmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3339735&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '32-33',
	code: 'cin',
	pct: '.441',
	league_sensitive_team_name: 'Cincinnati',
	vsC: '20-33',
	vsE: '18-17',
	vsR: '34-48',
	vsL: '22-23',
	xwl: '53-74',
	strk: 'W1',
	l: '71',
	lastg: '8/20 @ CHC, W 2-1',
	interleague: '9-6',
	team: 'Cincinnati',
	road: '24-38'
}]
var standings_rs_nle = [{
	w: '70',
	elim: '-',
	rs: '623',
	div: 'nle',
	gameid: '2008_08_21_atlmlb_nynmlb_1',
	status: 'P',
	pre: null,
	last10: '8-2',
	onerun: '12-14',
	xtr: '8-6',
	nextg: '8/21 v ATL,  7:10P',
	vsW: '20-15',
	ra: '557',
	gb: '-',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_atlmlb_nynmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3339856&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '38-23',
	code: 'nym',
	pct: '.551',
	league_sensitive_team_name: 'NY Mets',
	vsC: '13-16',
	vsE: '28-20',
	vsR: '45-43',
	vsL: '25-14',
	xwl: '70-57',
	strk: 'W2',
	l: '57',
	lastg: '8/20 v ATL, W 6-3',
	interleague: '9-6',
	team: 'New York',
	road: '32-34'
}, {
	w: '68',
	elim: '35',
	rs: '604',
	div: 'nle',
	gameid: '2008_08_21_wasmlb_phimlb_1',
	status: 'P',
	pre: null,
	last10: '5-5',
	onerun: '22-20',
	xtr: '4-7',
	nextg: '8/21 v WSH,  7:05P',
	vsW: '16-12',
	ra: '533',
	gb: '1.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_wasmlb_phimlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3339614&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '34-27',
	code: 'phi',
	pct: '.540',
	league_sensitive_team_name: 'Philadelphia',
	vsC: '21-14',
	vsE: '27-21',
	vsR: '44-41',
	vsL: '24-17',
	xwl: '70-56',
	strk: 'W3',
	l: '58',
	lastg: '8/20 v WSH, W 4-0',
	interleague: '4-11',
	team: 'Philadelphia',
	road: '34-31'
}, {
	w: '65',
	elim: '31',
	rs: '590',
	div: 'nle',
	gameid: '2008_08_21_flomlb_sfnmlb_1',
	status: 'P',
	pre: null,
	last10: '4-6',
	onerun: '19-15',
	xtr: '8-5',
	nextg: '8/21 @ SF,  3:45P',
	vsW: '18-14',
	ra: '616',
	gb: '5.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_flomlb_sfnmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080821&content_id=3343159&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '35-31',
	code: 'fla',
	pct: '.512',
	league_sensitive_team_name: 'Florida',
	vsC: '15-17',
	vsE: '27-21',
	vsR: '47-44',
	vsL: '18-18',
	xwl: '61-66',
	strk: 'L1',
	l: '62',
	lastg: '8/20 @ SF, L 5-6',
	interleague: '5-10',
	team: 'Florida',
	road: '30-31'
}, {
	w: '56',
	elim: '22',
	rs: '572',
	div: 'nle',
	gameid: '2008_08_21_atlmlb_nynmlb_1',
	status: 'P',
	pre: null,
	last10: '1-9',
	onerun: '6-24',
	xtr: '2-7',
	nextg: '8/21 @ NYM,  7:10P',
	vsW: '17-14',
	ra: '579',
	gb: '14.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_atlmlb_nynmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3339856&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '34-31',
	code: 'atl',
	pct: '.441',
	league_sensitive_team_name: 'Atlanta',
	vsC: '11-24',
	vsE: '20-26',
	vsR: '40-46',
	vsL: '16-25',
	xwl: '63-64',
	strk: 'L4',
	l: '71',
	lastg: '8/20 @ NYM, L 3-6',
	interleague: '8-7',
	team: 'Atlanta',
	road: '22-40'
}, {
	w: '44',
	elim: '10',
	rs: '466',
	div: 'nle',
	gameid: '2008_08_21_wasmlb_phimlb_1',
	status: 'P',
	pre: null,
	last10: '0-10',
	onerun: '15-26',
	xtr: '4-6',
	nextg: '8/21 @ PHI,  7:05P',
	vsW: '6-20',
	ra: '633',
	gb: '26.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_wasmlb_phimlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3339614&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '23-39',
	code: 'was',
	pct: '.346',
	league_sensitive_team_name: 'Washington',
	vsC: '14-23',
	vsE: '16-30',
	vsR: '28-52',
	vsL: '16-31',
	xwl: '46-81',
	strk: 'L12',
	l: '83',
	lastg: '8/20 @ PHI, L 0-4',
	interleague: '8-10',
	team: 'Washington',
	road: '21-44'
}]
var standings_rs_nlw = [{
	w: '66',
	elim: '-',
	rs: '587',
	div: 'nlw',
	gameid: '2008_08_21_sdnmlb_arimlb_1',
	status: 'P',
	pre: null,
	last10: '7-3',
	onerun: '17-16',
	xtr: '4-4',
	nextg: '8/21 v SD,  9:40P',
	vsW: '33-16',
	ra: '548',
	gb: '-',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_sdnmlb_arimlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3340122&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '35-26',
	code: 'ari',
	pct: '.524',
	league_sensitive_team_name: 'Arizona',
	vsC: '13-16',
	vsE: '14-19',
	vsR: '40-43',
	vsL: '26-17',
	xwl: '67-59',
	strk: 'W2',
	l: '60',
	lastg: '8/20 v SD, W 8-6',
	interleague: '6-9',
	team: 'Arizona',
	road: '31-34'
}, {
	w: '64',
	elim: '35',
	rs: '533',
	div: 'nlw',
	gameid: '2008_08_21_colmlb_lanmlb_1',
	status: 'P',
	pre: null,
	last10: '6-4',
	onerun: '17-19',
	xtr: '5-8',
	nextg: '8/21 v COL,  3:10P',
	vsW: '23-24',
	ra: '504',
	gb: '2.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_colmlb_lanmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3340146&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '38-30',
	code: 'la',
	pct: '.508',
	league_sensitive_team_name: 'LA Dodgers',
	vsC: '20-17',
	vsE: '16-11',
	vsR: '42-46',
	vsL: '22-16',
	xwl: '66-60',
	strk: 'L2',
	l: '62',
	lastg: '8/20 v COL, L 3-4',
	interleague: '5-10',
	team: 'Los Angeles',
	road: '26-32'
}, {
	w: '59',
	elim: '28',
	rs: '603',
	div: 'nlw',
	gameid: '2008_08_21_colmlb_lanmlb_1',
	status: 'P',
	pre: null,
	last10: '6-4',
	onerun: '19-17',
	xtr: '3-5',
	nextg: '8/21 @ LAD,  3:10P',
	vsW: '19-28',
	ra: '660',
	gb: '8.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_colmlb_lanmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3340146&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '34-29',
	code: 'col',
	pct: '.461',
	league_sensitive_team_name: 'Colorado',
	vsC: '18-15',
	vsE: '15-18',
	vsR: '37-54',
	vsL: '22-15',
	xwl: '59-69',
	strk: 'W5',
	l: '69',
	lastg: '8/20 @ LAD, W 4-3',
	interleague: '7-8',
	team: 'Colorado',
	road: '25-40'
}, {
	w: '54',
	elim: '25',
	rs: '481',
	div: 'nlw',
	gameid: '2008_08_21_flomlb_sfnmlb_1',
	status: 'P',
	pre: null,
	last10: '4-6',
	onerun: '24-16',
	xtr: '7-4',
	nextg: '8/21 v FLA,  3:45P',
	vsW: '21-22',
	ra: '590',
	gb: '12.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_flomlb_sfnmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080821&content_id=3343159&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '25-37',
	code: 'sf',
	pct: '.429',
	league_sensitive_team_name: 'San Francisco',
	vsC: '9-25',
	vsE: '18-13',
	vsR: '40-48',
	vsL: '14-24',
	xwl: '51-75',
	strk: 'W1',
	l: '72',
	lastg: '8/20 v FLA, W 6-5',
	interleague: '6-12',
	team: 'San Francisco',
	road: '29-35'
}, {
	w: '48',
	elim: '19',
	rs: '486',
	div: 'nlw',
	gameid: '2008_08_21_sdnmlb_arimlb_1',
	status: 'P',
	pre: null,
	last10: '4-6',
	onerun: '13-24',
	xtr: '5-6',
	nextg: '8/21 @ ARI,  9:40P',
	vsW: '20-26',
	ra: '594',
	gb: '18.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_20_sdnmlb_arimlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3340122&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '27-38',
	code: 'sd',
	pct: '.381',
	league_sensitive_team_name: 'San Diego',
	vsC: '13-21',
	vsE: '12-16',
	vsR: '34-47',
	vsL: '14-31',
	xwl: '52-74',
	strk: 'L3',
	l: '78',
	lastg: '8/20 @ ARI, L 6-8',
	interleague: '3-15',
	team: 'San Diego',
	road: '21-40'
}]

/**
 * @desc function star_mlb_standings()
 * The function star_mlb_standings() builds a small table of current standings
 *   and outputs it as a table inside the given html object.
 *
 * @param string division
 * @param string team
 */
function star_mlb_standings() {
	// Deal with any passed arguments.
	if (arguments[0] != null && arguments[0] != 'undefined' && in_array(arguments[0], ["alc","ale","alw","nlc","nle","nlw"])) {
		star_mlb_options['division']	= arguments[0];
	}
	if (arguments[1] != null && arguments[1] != 'undefined' && in_array(arguments[1], ["oak","ana","hou","tor","atl","mil","stl","chc","tb","ari","la","sf","cle","sea","fla","nym","was","bal","sd","phi","pit","tex","cin","bos","col","kc","det","min","cws","nyy"])) {
		star_mlb_options['team']		= arguments[1];
	}

	// Build team mascots array.
	var mascots	= new Object;
	mascots['oak']	= 'A\'s';
	mascots['ana']	= 'Angels';
	mascots['hou']	= 'Astros';
	mascots['tor']	= 'Blue Jays';
	mascots['atl']	= 'Braves';
	mascots['mil']	= 'Brewers';
	mascots['stl']	= 'Cardinals';
	mascots['chc']	= 'Cubs';
	mascots['tb']	= 'Devil Rays';
	mascots['ari']	= 'Diamondbacks';
	mascots['la']	= 'Dodgers';
	mascots['sf']	= 'Giants';
	mascots['cle']	= 'Indians';
	mascots['sea']	= 'Mariners';
	mascots['fla']	= 'Marlins';
	mascots['nym']	= 'Mets';
	mascots['was']	= 'Nationals';
	mascots['bal']	= 'Orioles';
	mascots['sd']	= 'Padres';
	mascots['phi']	= 'Phillies';
	mascots['pit']	= 'Pirates';
	mascots['tex']	= 'Rangers';
	mascots['cin']	= 'Reds';
	mascots['bos']	= 'Red Sox';
	mascots['col']	= 'Rockies';
	mascots['kc']	= 'Royals';
	mascots['det']	= 'Tigers';
	mascots['min']	= 'Twins';
	mascots['cws']	= 'White Sox';
	mascots['nyy']	= 'Yankees';

	// Get the object to contain the standings content.
	var standingsBody	= document.getElementById('star_mlb_standings_body');

	// Get the object to contain the standings head.
	var standingsHead	= document.getElementById('star_mlb_standings_head');

	// Get the variable that contains the current standings and the head.
	var standings_rs	= '';
	var standings_head	= '';

	// Deal with the division.
	var division	= star_mlb_options['division'];
	if (division == null || division == 'undefined') {
		division	= 'nlc';
	}

	// Deal with the team.
	var team		= star_mlb_options['team'];

	switch (division) {
		// American League East.
		case 'ale':
			standings_rs	= eval('standings_rs_' + division);
			standings_head	= '<acronym title="American League">AL</acronym> East';
		break;

		// American League Central.
		case 'alc':
			standings_rs	= eval('standings_rs_' + division);
			standings_head	= '<acronym title="American League">AL</acronym> Central';
		break;

		// American League West.
		case 'alw':
			standings_rs	= eval('standings_rs_' + division);
			standings_head	= '<acronym title="American League">AL</acronym> West';
		break;

		// National League East.
		case 'nle':
			standings_rs	= eval('standings_rs_' + division);
			standings_head	= '<acronym title="National League">NL</acronym> East';
		break;

		// National League West.
		case 'nlw':
			standings_rs	= eval('standings_rs_' + division);
			standings_head	= '<acronym title="National League">NL</acronym> West';
		break;

		// National League Central.
		case 'nlc':
		default:
			standings_rs	= eval('standings_rs_' + division);
			standings_head	= '<acronym title="National League">NL</acronym> Central';
		break;
	}

	// Build the links.
	var standings	= '<div class="center">';
	if (division == 'alw') {
		standings	+= '<acronym title="American League West">ALW</acronym>\n';
	} else {
		standings	+= '<a href="javascript:star_mlb_standings(\'alw\');"><acronym title="American League West">ALW</acronym></a>\n';
	}
	if (division == 'alc') {
		standings	+= '<acronym title="American League Central">ALC</acronym>\n';
	} else {
		standings	+= '<a href="javascript:star_mlb_standings(\'alc\');"><acronym title="American League Central">ALC</acronym></a>\n';
	}
	if (division == 'ale') {
		standings	+= '<acronym title="American League East">ALE</acronym>\n';
	} else {
		standings	+= '<a href="javascript:star_mlb_standings(\'ale\');"><acronym title="American League East">ALE</acronym></a>\n';
	}
	if (division == 'nlw') {
		standings	+= '<acronym title="National League West">NLW</acronym>\n';
	} else {
		standings	+= '<a href="javascript:star_mlb_standings(\'nlw\');"><acronym title="National League West">NLW</acronym></a>\n';
	}
	if (division == 'nlc') {
		standings	+= '<acronym title="National League Central">NLC</acronym>\n';
	} else {
		standings	+= '<a href="javascript:star_mlb_standings(\'nlc\');"><acronym title="National League Central">NLC</acronym></a>\n';
	}
	if (division == 'nle') {
		standings	+= '<acronym title="National League East">NLE</acronym>\n';
	} else {
		standings	+= '<a href="javascript:star_mlb_standings(\'nle\');"><acronym title="National League East">NLE</acronym></a><br />\n';
	}
	standings	+= '</div>';

	// Start the standings table.
	standings		+= '<table class="ruler"><thead><tr><th>Team</th><th><acronym title="Wins">W</acronym></th><th><acronym title="Losses">L</acronym></th><th><acronym title="Winning Percentage">Pct.</acronym></th><th><acronym title="Games Back">GB</acronym></th></tr></thead><tbody>';

	// Iterate through each of the teams, displaying their data.
	for (i = 0; i < standings_rs.length; i++) {
		// Bold the selected team.
		if (standings_rs[i].code == team) {
			standings_rs[i].league_sensitive_team_name	= standings_rs[i].league_sensitive_team_name;
		}

		// Check URL for last game wrap.
		if (standings_rs[i].wrap != null) {
			var url	= '<a href="http://mlb.mlb.com/news/boxscore.jsp?gid=' + standings_rs[i].gameid + '" title="Last game: ' + standings_rs[i].lastg + '">' + standings_rs[i].league_sensitive_team_name + '</a>';
		} else {
			var url	= '<span title="Last game: ' + standings_rs[i].lastg + '">' + standings_rs[i].league_sensitive_team_name + '</span>';
		}
		standings	+= '<tr>';
		standings	+= '<td>' + url + '</td>';
		standings	+= '<td>' + standings_rs[i].w + '</td>';
		standings	+= '<td>' + standings_rs[i].l + '</td>';
		standings	+= '<td>' + standings_rs[i].pct + '</td>';
		standings	+= '<td>' + standings_rs[i].gb + '</td>';
		standings	+= '</tr>';
	}

	// Close the table.
	standings	+= '</tbody></table>';

	// Include a link to full standings.
	standings	+= '<a class="bold" href="http://mlb.mlb.com/mlb/standings/index.jsp">Expanded Standings</a>';

	// Set the standings object to the standings table.
	standingsBody.innerHTML	= standings;
	standingsHead.innerHTML	= standings_head;
	if (typeof(tableruler) == 'function') {
		tableruler();
	}
}

function in_array(needle, haystack, strict) {
	// http://kevin.vanzonneveld.net
	// +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
	// *     example 1: in_array('van', ['Kevin', 'van', 'Zonneveld']);
	// *     returns 1: true

	var found = false, key, strict = !!strict;

	for (key in haystack) {
		if ((strict && haystack[key] === needle) || (!strict && haystack[key] == needle)) {
			found	= true;
			break;
		}
	}

	return found;
}

function addLoadEvent(func) {
	var oldonload	= window.onload;
	if (typeof window.onload != 'function') {
		window.onload	= func;
	} else {
		window.onload	= function() {
			if (oldonload) {
				oldonload();
			}
			func();
		}
	}
}

var star_mlb_options = new Object;
star_mlb_options['division']	= 'alw';
star_mlb_options['team']		= 'sea';
addLoadEvent(star_mlb_standings);
