indicator = {
	// available types: point, line, round
	load : function( j, type )
	{
		if( typeof( j ) == 'string' )
		{
			j = $( j );
		}

		var src = 'line';
		if( type )
		{
			src = type;
		}
		j.html( '<img src="/images/loading_' + src + '.gif" />' );
	},
	clear : function( jcontent )
	{
		jcontent.html( '' );
	},
	show : function( j )
	{
		if( !( j instanceof jQuery ) )
		{
			j = $( j );
		}
		var ind = j.find( '.indicator' );
		var shown = parseInt( ind.attr( 'ind_shown' ), 10 );
		if( !shown )
		{
			ind.attr( 'ind_shown', 1 ).show();
		}
		else
		{
			ind.attr( 'ind_shown', shown + 1 );
		}
		return( j );
	},
	hide : function( j )
	{
		if( !( j instanceof jQuery ) )
		{
			j = $( j );
		}
		var ind = j.find( '.indicator' );
		var shown = parseInt( ind.attr( 'ind_shown' ), 10 );
		if( shown == 1 || isNaN( shown ) )
		{
			ind.removeAttr( 'ind_shown' ).hide();
		}
		else
		{
			ind.attr( 'ind_shown', shown - 1 );
		}
	}

};