var standings_rs_alc = [{
	w: '72',
	elim: '-',
	rs: '644',
	div: 'alc',
	gameid: '2008_08_20_seamlb_chamlb_1',
	status: 'P',
	pre: null,
	last10: '8-2',
	onerun: '17-13',
	xtr: '6-2',
	nextg: '8/20 v SEA,  2:05P',
	vsW: '15-12',
	ra: '539',
	gb: '-',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_seamlb_chamlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3333648&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '44-19',
	code: 'cws',
	pct: '.576',
	league_sensitive_team_name: 'Chi White Sox',
	vsC: '36-21',
	vsE: '9-14',
	vsR: '46-38',
	vsL: '26-15',
	xwl: '73-52',
	strk: 'W4',
	l: '53',
	lastg: '8/19 v SEA, W 5-0',
	interleague: '12-6',
	team: 'Chicago',
	road: '28-34'
}, {
	w: '71',
	elim: '37',
	rs: '638',
	div: 'alc',
	gameid: '2008_08_20_oakmlb_minmlb_1',
	status: 'P',
	pre: null,
	last10: '7-3',
	onerun: '22-20',
	xtr: '6-6',
	nextg: '8/20 v OAK,  1:10P',
	vsW: '12-13',
	ra: '578',
	gb: '1.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_oakmlb_minmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3335323&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '45-23',
	code: 'min',
	pct: '.568',
	league_sensitive_team_name: 'Minnesota',
	vsC: '36-21',
	vsE: '9-16',
	vsR: '49-39',
	vsL: '22-15',
	xwl: '68-57',
	strk: 'W1',
	l: '54',
	lastg: '8/19 v OAK, W 13-2',
	interleague: '14-4',
	team: 'Minnesota',
	road: '26-31'
}, {
	w: '62',
	elim: '27',
	rs: '643',
	div: 'alc',
	gameid: '2008_08_20_detmlb_texmlb_1',
	status: 'P',
	pre: null,
	last10: '5-5',
	onerun: '14-19',
	xtr: '3-7',
	nextg: '8/20 @ TEX,  8:05P',
	vsW: '16-11',
	ra: '625',
	gb: '10.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_detmlb_texmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3334858&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '33-28',
	code: 'det',
	pct: '.492',
	league_sensitive_team_name: 'Detroit',
	vsC: '21-30',
	vsE: '12-18',
	vsR: '39-50',
	vsL: '23-14',
	xwl: '65-61',
	strk: 'W2',
	l: '64',
	lastg: '8/19 @ TEX, W 11-3',
	interleague: '13-5',
	team: 'Detroit',
	road: '29-36'
}, {
	w: '57',
	elim: '24',
	rs: '586',
	div: 'alc',
	gameid: '2008_08_20_kcamlb_clemlb_1',
	status: 'P',
	pre: null,
	last10: '7-3',
	onerun: '9-13',
	xtr: '3-8',
	nextg: '8/20 v KC,  7:05P',
	vsW: '16-15',
	ra: '576',
	gb: '14.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_kcamlb_clemlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3334186&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '34-29',
	code: 'cle',
	pct: '.460',
	league_sensitive_team_name: 'Cleveland',
	vsC: '18-30',
	vsE: '17-10',
	vsR: '43-49',
	vsL: '14-18',
	xwl: '63-61',
	strk: 'W2',
	l: '67',
	lastg: '8/19 v KC, W 9-4',
	interleague: '6-12',
	team: 'Cleveland',
	road: '23-38'
}, {
	w: '55',
	elim: '21',
	rs: '514',
	div: 'alc',
	gameid: '2008_08_20_kcamlb_clemlb_1',
	status: 'P',
	pre: null,
	last10: '2-8',
	onerun: '18-15',
	xtr: '5-6',
	nextg: '8/20 @ CLE,  7:05P',
	vsW: '10-12',
	ra: '628',
	gb: '17.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_kcamlb_clemlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3334186&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '28-34',
	code: 'kc',
	pct: '.440',
	league_sensitive_team_name: 'Kansas City',
	vsC: '18-27',
	vsE: '14-26',
	vsR: '32-53',
	vsL: '23-17',
	xwl: '51-74',
	strk: 'L3',
	l: '70',
	lastg: '8/19 @ CLE, L 4-9',
	interleague: '13-5',
	team: 'Kansas City',
	road: '27-36'
}]
var standings_rs_ale = [{
	w: '77',
	elim: '-',
	rs: '574',
	div: 'ale',
	gameid: '2008_08_20_anamlb_tbamlb_1',
	status: 'P',
	pre: null,
	last10: '8-2',
	onerun: '23-13',
	xtr: '8-4',
	nextg: '8/20 v LAA,  7:10P',
	vsW: '22-11',
	ra: '497',
	gb: '-',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_anamlb_tbamlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3333451&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '47-17',
	code: 'tb',
	pct: '.616',
	league_sensitive_team_name: 'Tampa Bay',
	vsC: '15-12',
	vsE: '28-19',
	vsR: '57-30',
	vsL: '20-18',
	xwl: '71-54',
	strk: 'W3',
	l: '48',
	lastg: '8/19 v LAA, W 4-2',
	interleague: '12-6',
	team: 'Tampa Bay',
	road: '30-31'
}, {
	w: '73',
	elim: '33',
	rs: '650',
	div: 'ale',
	gameid: '2008_08_20_bosmlb_balmlb_1',
	status: 'P',
	pre: null,
	last10: '7-3',
	onerun: '15-19',
	xtr: '6-2',
	nextg: '8/20 @ BAL,  7:05P',
	vsW: '20-15',
	ra: '528',
	gb: '4.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_bosmlb_balmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3334889&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '43-18',
	code: 'bos',
	pct: '.579',
	league_sensitive_team_name: 'Boston',
	vsC: '19-8',
	vsE: '23-23',
	vsR: '55-44',
	vsL: '18-9',
	xwl: '75-51',
	strk: 'W2',
	l: '53',
	lastg: '8/19 @ BAL, W 7-2',
	interleague: '11-7',
	team: 'Boston',
	road: '30-35'
}, {
	w: '66',
	elim: '27',
	rs: '602',
	div: 'ale',
	gameid: '2008_08_20_nyamlb_tormlb_1',
	status: 'P',
	pre: null,
	last10: '3-7',
	onerun: '21-16',
	xtr: '6-2',
	nextg: '8/20 @ TOR,  7:07P',
	vsW: '16-10',
	ra: '556',
	gb: '11.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_nyamlb_tormlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3333342&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '38-27',
	code: 'nyy',
	pct: '.528',
	league_sensitive_team_name: 'NY Yankees',
	vsC: '17-18',
	vsE: '23-23',
	vsR: '49-40',
	vsL: '17-19',
	xwl: '67-58',
	strk: 'L1',
	l: '59',
	lastg: '8/19 @ TOR, L 1-2',
	interleague: '10-8',
	team: 'New York',
	road: '28-32'
}, {
	w: '65',
	elim: '26',
	rs: '539',
	div: 'ale',
	gameid: '2008_08_20_nyamlb_tormlb_1',
	status: 'P',
	pre: null,
	last10: '6-4',
	onerun: '19-24',
	xtr: '4-7',
	nextg: '8/20 v NYY,  7:07P',
	vsW: '17-19',
	ra: '488',
	gb: '12.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_nyamlb_tormlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3333342&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '35-26',
	code: 'tor',
	pct: '.520',
	league_sensitive_team_name: 'Toronto',
	vsC: '18-11',
	vsE: '22-20',
	vsR: '52-41',
	vsL: '13-19',
	xwl: '68-57',
	strk: 'W3',
	l: '60',
	lastg: '8/19 v NYY, W 2-1',
	interleague: '8-10',
	team: 'Toronto',
	road: '30-34'
}, {
	w: '60',
	elim: '21',
	rs: '639',
	div: 'ale',
	gameid: '2008_08_20_bosmlb_balmlb_1',
	status: 'P',
	pre: null,
	last10: '4-6',
	onerun: '19-21',
	xtr: '4-6',
	nextg: '8/20 v BOS,  7:05P',
	vsW: '15-16',
	ra: '641',
	gb: '17.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_bosmlb_balmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3334889&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '31-26',
	code: 'bal',
	pct: '.480',
	league_sensitive_team_name: 'Baltimore',
	vsC: '15-12',
	vsE: '19-30',
	vsR: '47-44',
	vsL: '13-21',
	xwl: '62-63',
	strk: 'L2',
	l: '65',
	lastg: '8/19 v BOS, L 2-7',
	interleague: '11-7',
	team: 'Baltimore',
	road: '29-39'
}]
var standings_rs_alw = [{
	w: '76',
	elim: '-',
	rs: '582',
	div: 'alw',
	gameid: '2008_08_20_anamlb_tbamlb_1',
	status: 'P',
	pre: null,
	last10: '5-5',
	onerun: '24-15',
	xtr: '3-3',
	nextg: '8/20 @ TB,  7:10P',
	vsW: '20-13',
	ra: '524',
	gb: '-',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_anamlb_tbamlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3333451&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '37-23',
	code: 'ana',
	pct: '.613',
	league_sensitive_team_name: 'LA Angels',
	vsC: '19-12',
	vsE: '27-15',
	vsR: '53-38',
	vsL: '23-10',
	xwl: '68-56',
	strk: 'L3',
	l: '48',
	lastg: '8/19 @ TB, L 2-4',
	interleague: '10-8',
	team: 'Los Angeles',
	road: '39-25'
}, {
	w: '62',
	elim: '22',
	rs: '705',
	div: 'alw',
	gameid: '2008_08_20_detmlb_texmlb_1',
	status: 'P',
	pre: null,
	last10: '2-8',
	onerun: '23-13',
	xtr: '5-5',
	nextg: '8/20 v DET,  8:05P',
	vsW: '20-15',
	ra: '776',
	gb: '15.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_detmlb_texmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3334858&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '32-30',
	code: 'tex',
	pct: '.488',
	league_sensitive_team_name: 'Texas',
	vsC: '16-18',
	vsE: '16-24',
	vsR: '48-40',
	vsL: '14-25',
	xwl: '58-69',
	strk: 'L3',
	l: '65',
	lastg: '8/19 v DET, L 3-11',
	interleague: '10-8',
	team: 'Texas',
	road: '30-35'
}, {
	w: '57',
	elim: '19',
	rs: '493',
	div: 'alw',
	gameid: '2008_08_20_oakmlb_minmlb_1',
	status: 'P',
	pre: null,
	last10: '3-7',
	onerun: '17-22',
	xtr: '7-6',
	nextg: '8/20 @ MIN,  1:10P',
	vsW: '14-20',
	ra: '511',
	gb: '19.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_oakmlb_minmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3335323&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '34-33',
	code: 'oak',
	pct: '.456',
	league_sensitive_team_name: 'Oakland',
	vsC: '18-17',
	vsE: '15-23',
	vsR: '38-46',
	vsL: '19-22',
	xwl: '60-65',
	strk: 'L1',
	l: '68',
	lastg: '8/19 @ MIN, L 2-13',
	interleague: '10-8',
	team: 'Oakland',
	road: '23-35'
}, {
	w: '46',
	elim: '8',
	rs: '521',
	div: 'alw',
	gameid: '2008_08_20_seamlb_chamlb_1',
	status: 'P',
	pre: null,
	last10: '1-9',
	onerun: '13-24',
	xtr: '3-7',
	nextg: '8/20 @ CWS,  2:05P',
	vsW: '14-20',
	ra: '628',
	gb: '30.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_seamlb_chamlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3333648&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '24-38',
	code: 'sea',
	pct: '.368',
	league_sensitive_team_name: 'Seattle',
	vsC: '10-22',
	vsE: '13-28',
	vsR: '34-53',
	vsL: '12-26',
	xwl: '52-73',
	strk: 'L5',
	l: '79',
	lastg: '8/19 @ CWS, L 0-5',
	interleague: '9-9',
	team: 'Seattle',
	road: '22-41'
}]
var standings_rs_nlc = [{
	w: '77',
	elim: '-',
	rs: '677',
	div: 'nlc',
	gameid: '2008_08_20_cinmlb_chnmlb_1',
	status: 'P',
	pre: null,
	last10: '8-2',
	onerun: '17-18',
	xtr: '8-5',
	nextg: '8/20 v CIN,  8:05P',
	vsW: '23-10',
	ra: '506',
	gb: '-',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_cinmlb_chnmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3333526&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '46-17',
	code: 'chc',
	pct: '.616',
	league_sensitive_team_name: 'Chi Cubs',
	vsC: '34-22',
	vsE: '14-7',
	vsR: '53-37',
	vsL: '24-11',
	xwl: '79-46',
	strk: 'W2',
	l: '48',
	lastg: '8/19 v CIN, W 5-0',
	interleague: '6-9',
	team: 'Chicago',
	road: '31-31'
}, {
	w: '72',
	elim: '31',
	rs: '595',
	div: 'nlc',
	gameid: '2008_08_20_houmlb_milmlb_1',
	status: 'P',
	pre: null,
	last10: '6-4',
	onerun: '24-11',
	xtr: '9-5',
	nextg: '8/20 v HOU,  2:05P',
	vsW: '18-11',
	ra: '546',
	gb: '6.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_houmlb_milmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3333790&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '37-24',
	code: 'mil',
	pct: '.567',
	league_sensitive_team_name: 'Milwaukee',
	vsC: '31-24',
	vsE: '16-12',
	vsR: '47-42',
	vsL: '25-13',
	xwl: '68-59',
	strk: 'L1',
	l: '55',
	lastg: '8/19 v HOU, L 2-5',
	interleague: '7-8',
	team: 'Milwaukee',
	road: '35-31'
}, {
	w: '70',
	elim: '28',
	rs: '608',
	div: 'nlc',
	gameid: '2008_08_20_pitmlb_slnmlb_1',
	status: 'P',
	pre: null,
	last10: '6-4',
	onerun: '21-22',
	xtr: '6-10',
	nextg: '8/20 v PIT,  8:15P',
	vsW: '17-10',
	ra: '566',
	gb: '8.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_pitmlb_slnmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3334712&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '33-29',
	code: 'stl',
	pct: '.547',
	league_sensitive_team_name: 'St. Louis',
	vsC: '28-28',
	vsE: '18-12',
	vsR: '49-36',
	vsL: '21-22',
	xwl: '68-60',
	strk: 'L2',
	l: '58',
	lastg: '8/19 v PIT, L 1-4',
	interleague: '7-8',
	team: 'St. Louis',
	road: '37-29'
}, {
	w: '64',
	elim: '24',
	rs: '573',
	div: 'nlc',
	gameid: '2008_08_20_houmlb_milmlb_1',
	status: 'P',
	pre: null,
	last10: '7-3',
	onerun: '17-19',
	xtr: '3-3',
	nextg: '8/20 @ MIL,  2:05P',
	vsW: '17-13',
	ra: '610',
	gb: '13.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_houmlb_milmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3333790&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '34-28',
	code: 'hou',
	pct: '.508',
	league_sensitive_team_name: 'Houston',
	vsC: '27-29',
	vsE: '13-9',
	vsR: '44-46',
	vsL: '20-16',
	xwl: '59-67',
	strk: 'W1',
	l: '62',
	lastg: '8/19 @ MIL, W 5-2',
	interleague: '7-11',
	team: 'Houston',
	road: '30-34'
}, {
	w: '57',
	elim: '17',
	rs: '587',
	div: 'nlc',
	gameid: '2008_08_20_pitmlb_slnmlb_1',
	status: 'P',
	pre: null,
	last10: '4-6',
	onerun: '19-16',
	xtr: '11-3',
	nextg: '8/20 @ STL,  8:15P',
	vsW: '10-14',
	ra: '672',
	gb: '20.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_pitmlb_slnmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3334712&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '34-31',
	code: 'pit',
	pct: '.452',
	league_sensitive_team_name: 'Pittsburgh',
	vsC: '26-29',
	vsE: '15-17',
	vsR: '43-49',
	vsL: '14-20',
	xwl: '55-71',
	strk: 'W2',
	l: '69',
	lastg: '8/19 @ STL, W 4-1',
	interleague: '6-9',
	team: 'Pittsburgh',
	road: '23-38'
}, {
	w: '55',
	elim: '15',
	rs: '533',
	div: 'nlc',
	gameid: '2008_08_20_cinmlb_chnmlb_1',
	status: 'P',
	pre: null,
	last10: '3-7',
	onerun: '18-10',
	xtr: '6-7',
	nextg: '8/20 @ CHC,  8:05P',
	vsW: '9-15',
	ra: '639',
	gb: '22.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_cinmlb_chnmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3333526&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '32-33',
	code: 'cin',
	pct: '.437',
	league_sensitive_team_name: 'Cincinnati',
	vsC: '19-33',
	vsE: '18-17',
	vsR: '34-48',
	vsL: '21-23',
	xwl: '53-73',
	strk: 'L1',
	l: '71',
	lastg: '8/19 @ CHC, L 0-5',
	interleague: '9-6',
	team: 'Cincinnati',
	road: '23-38'
}]
var standings_rs_nle = [{
	w: '69',
	elim: '-',
	rs: '617',
	div: 'nle',
	gameid: '2008_08_20_atlmlb_nynmlb_1',
	status: 'P',
	pre: null,
	last10: '7-3',
	onerun: '12-14',
	xtr: '8-6',
	nextg: '8/20 v ATL,  7:10P',
	vsW: '20-15',
	ra: '554',
	gb: '-',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_atlmlb_nynmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3333658&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '37-23',
	code: 'nym',
	pct: '.548',
	league_sensitive_team_name: 'NY Mets',
	vsC: '13-16',
	vsE: '27-20',
	vsR: '44-43',
	vsL: '25-14',
	xwl: '69-57',
	strk: 'W1',
	l: '57',
	lastg: '8/19 v ATL, W 7-3',
	interleague: '9-6',
	team: 'New York',
	road: '32-34'
}, {
	w: '67',
	elim: '36',
	rs: '600',
	div: 'nle',
	gameid: '2008_08_20_wasmlb_phimlb_1',
	status: 'P',
	pre: null,
	last10: '5-5',
	onerun: '22-20',
	xtr: '4-7',
	nextg: '8/20 v WSH,  7:05P',
	vsW: '16-12',
	ra: '533',
	gb: '1.5',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_wasmlb_phimlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3333499&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '33-27',
	code: 'phi',
	pct: '.536',
	league_sensitive_team_name: 'Philadelphia',
	vsC: '21-14',
	vsE: '26-21',
	vsR: '43-41',
	vsL: '24-17',
	xwl: '69-56',
	strk: 'W2',
	l: '58',
	lastg: '8/19 v WSH, W 5-4',
	interleague: '4-11',
	team: 'Philadelphia',
	road: '34-31'
}, {
	w: '65',
	elim: '33',
	rs: '585',
	div: 'nle',
	gameid: '2008_08_20_flomlb_sfnmlb_1',
	status: 'P',
	pre: null,
	last10: '4-6',
	onerun: '19-14',
	xtr: '8-5',
	nextg: '8/20 @ SF, 10:15P',
	vsW: '18-13',
	ra: '610',
	gb: '4.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_flomlb_sfnmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3336804&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '35-31',
	code: 'fla',
	pct: '.516',
	league_sensitive_team_name: 'Florida',
	vsC: '15-17',
	vsE: '27-21',
	vsR: '47-43',
	vsL: '18-18',
	xwl: '61-65',
	strk: 'W1',
	l: '61',
	lastg: '8/19 @ SF, W 6-0',
	interleague: '5-10',
	team: 'Florida',
	road: '30-30'
}, {
	w: '56',
	elim: '24',
	rs: '569',
	div: 'nle',
	gameid: '2008_08_20_atlmlb_nynmlb_1',
	status: 'P',
	pre: null,
	last10: '2-8',
	onerun: '6-24',
	xtr: '2-7',
	nextg: '8/20 @ NYM,  7:10P',
	vsW: '17-14',
	ra: '573',
	gb: '13.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_atlmlb_nynmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3333658&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '34-31',
	code: 'atl',
	pct: '.444',
	league_sensitive_team_name: 'Atlanta',
	vsC: '11-24',
	vsE: '20-25',
	vsR: '40-45',
	vsL: '16-25',
	xwl: '63-63',
	strk: 'L3',
	l: '70',
	lastg: '8/19 @ NYM, L 3-7',
	interleague: '8-7',
	team: 'Atlanta',
	road: '22-39'
}, {
	w: '44',
	elim: '12',
	rs: '466',
	div: 'nle',
	gameid: '2008_08_20_wasmlb_phimlb_1',
	status: 'P',
	pre: null,
	last10: '0-10',
	onerun: '15-26',
	xtr: '4-6',
	nextg: '8/20 @ PHI,  7:05P',
	vsW: '6-20',
	ra: '629',
	gb: '25.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_wasmlb_phimlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3333499&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '23-39',
	code: 'was',
	pct: '.349',
	league_sensitive_team_name: 'Washington',
	vsC: '14-23',
	vsE: '16-29',
	vsR: '28-51',
	vsL: '16-31',
	xwl: '46-80',
	strk: 'L11',
	l: '82',
	lastg: '8/19 @ PHI, L 4-5',
	interleague: '8-10',
	team: 'Washington',
	road: '21-43'
}]
var standings_rs_nlw = [{
	w: '65',
	elim: '-',
	rs: '579',
	div: 'nlw',
	gameid: '2008_08_20_sdnmlb_arimlb_1',
	status: 'P',
	pre: null,
	last10: '6-4',
	onerun: '17-16',
	xtr: '4-4',
	nextg: '8/20 v SD,  9:40P',
	vsW: '32-16',
	ra: '542',
	gb: '-',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_sdnmlb_arimlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3333874&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '34-26',
	code: 'ari',
	pct: '.520',
	league_sensitive_team_name: 'Arizona',
	vsC: '13-16',
	vsE: '14-19',
	vsR: '39-43',
	vsL: '26-17',
	xwl: '66-59',
	strk: 'W1',
	l: '60',
	lastg: '8/19 v SD, W 7-6',
	interleague: '6-9',
	team: 'Arizona',
	road: '31-34'
}, {
	w: '64',
	elim: '37',
	rs: '530',
	div: 'nlw',
	gameid: '2008_08_20_colmlb_lanmlb_1',
	status: 'P',
	pre: null,
	last10: '6-4',
	onerun: '17-18',
	xtr: '5-8',
	nextg: '8/20 v COL, 10:10P',
	vsW: '23-23',
	ra: '500',
	gb: '1.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_colmlb_lanmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3333902&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '38-29',
	code: 'la',
	pct: '.512',
	league_sensitive_team_name: 'LA Dodgers',
	vsC: '20-17',
	vsE: '16-11',
	vsR: '42-46',
	vsL: '22-15',
	xwl: '66-59',
	strk: 'L1',
	l: '61',
	lastg: '8/19 v COL, L 3-8',
	interleague: '5-10',
	team: 'Los Angeles',
	road: '26-32'
}, {
	w: '58',
	elim: '29',
	rs: '599',
	div: 'nlw',
	gameid: '2008_08_20_colmlb_lanmlb_1',
	status: 'P',
	pre: null,
	last10: '6-4',
	onerun: '18-17',
	xtr: '3-5',
	nextg: '8/20 @ LAD, 10:10P',
	vsW: '18-28',
	ra: '657',
	gb: '8.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_colmlb_lanmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3333902&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '34-29',
	code: 'col',
	pct: '.457',
	league_sensitive_team_name: 'Colorado',
	vsC: '18-15',
	vsE: '15-18',
	vsR: '36-54',
	vsL: '22-15',
	xwl: '58-69',
	strk: 'W4',
	l: '69',
	lastg: '8/19 @ LAD, W 8-3',
	interleague: '7-8',
	team: 'Colorado',
	road: '24-40'
}, {
	w: '53',
	elim: '26',
	rs: '475',
	div: 'nlw',
	gameid: '2008_08_20_flomlb_sfnmlb_1',
	status: 'P',
	pre: null,
	last10: '4-6',
	onerun: '23-16',
	xtr: '7-4',
	nextg: '8/20 v FLA, 10:15P',
	vsW: '21-22',
	ra: '585',
	gb: '12.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_flomlb_sfnmlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080820&content_id=3336804&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '24-37',
	code: 'sf',
	pct: '.424',
	league_sensitive_team_name: 'San Francisco',
	vsC: '9-25',
	vsE: '17-13',
	vsR: '40-48',
	vsL: '13-24',
	xwl: '51-74',
	strk: 'L1',
	l: '72',
	lastg: '8/19 v FLA, L 0-6',
	interleague: '6-12',
	team: 'San Francisco',
	road: '29-35'
}, {
	w: '48',
	elim: '21',
	rs: '480',
	div: 'nlw',
	gameid: '2008_08_20_sdnmlb_arimlb_1',
	status: 'P',
	pre: null,
	last10: '4-6',
	onerun: '13-24',
	xtr: '5-6',
	nextg: '8/20 @ ARI,  9:40P',
	vsW: '20-25',
	ra: '586',
	gb: '17.0',
	wrap: 'javascript:void(launchGameday({gid:\'2008_08_19_sdnmlb_arimlb_1\',mode:\'wrap\',lurl:\'/news/wrap.jsp?ymd=20080819&content_id=3333874&vkey=wrapup2005&fext=.jsp&c_id=mlb\'}));',
	home: '27-38',
	code: 'sd',
	pct: '.384',
	league_sensitive_team_name: 'San Diego',
	vsC: '13-21',
	vsE: '12-16',
	vsR: '34-46',
	vsL: '14-31',
	xwl: '51-74',
	strk: 'L2',
	l: '77',
	lastg: '8/19 @ ARI, L 6-7',
	interleague: '3-15',
	team: 'San Diego',
	road: '21-39'
}]
/**
 * @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']	= 'nlc';
star_mlb_options['team']		= 'stl';
addLoadEvent(star_mlb_standings);
