
function toggleRow( statID )
{
	details = document.getElementById( statID + '_details' );
	if ( details.style.display != 'block' )
	{
		details.style.display = 'block';
		crow = document.getElementById( statID + '_stats_row' );
		crow.className = 'stats_row_on';
		arrow = document.getElementById( statID + '_arrow' );
		arrow.src = arrow.src.replace( /arrow_down/, 'arrow_up' );
		hr = document.getElementById( statID + '_hr' );
		hr.src = hr.src.replace( /hr_white/, 'hr_grey' );
		document.getElementById( statID + '_val_1_on' ).style.display = 'none';
		document.getElementById( statID + '_val_2_on' ).style.display = 'none';
		document.getElementById( statID + '_val_1_off' ).style.display = 'inline';
		document.getElementById( statID + '_val_2_off' ).style.display = 'inline';
	}
	else
	{
		details.style.display = 'none';
		crow = document.getElementById( statID + '_stats_row' );
		crow.className = 'stats_row';
		arrow = document.getElementById( statID + '_arrow' );
		arrow.src = arrow.src.replace( /arrow_up/, 'arrow_down' );
		hr = document.getElementById( statID + '_hr' );
		hr.src = hr.src.replace( /hr_grey/, 'hr_white' );
		document.getElementById( statID + '_val_1_on' ).style.display = 'inline';
		document.getElementById( statID + '_val_2_on' ).style.display = 'inline';
		document.getElementById( statID + '_val_1_off' ).style.display = 'none';
		document.getElementById( statID + '_val_2_off' ).style.display = 'none';
	}
}

function iSwap( imgID, t )
{
	e = document.getElementById( imgID );
	if ( e.src.indexOf( '_on.' ) != -1 )
	{
		if ( t == 'g' )
		{
			e.src = e.src.replace( /_on\.gif/, '.gif' );
		}
		else
		{
			e.src = e.src.replace( /_on\.jpg/, '.jpg' );
		}
	}
	else
	{
		if ( t == 'g' )
		{
			e.src = e.src.replace( /\.gif/, '_on.gif' );
		}
		else
		{
			e.src = e.src.replace( /\.jpg/, '_on.jpg' );
		}
	}
}
