function switch_guestbook(user, offset, all)
{
	if ($('#gb_i_' + offset).hasClass('active'))
	{
		return false;
	}


	var count = offset;
	if(offset == 0)
	{
		count = 1;
	}
	else
	{
		count = count + 1;
	}

	var bis = offset + 5

	if (bis > all)
	{
		bis = all;
	}
	
	$('#nr_bis').html(bis);
	$('#nr_von').html(count);

	
	var h = $('#gb_content').height();
	var m = h / 2.5;
	$('#gb_content').height(h);
	document.getElementById('gb_content').innerHTML = '<center style="margin-top:' + m + 'px;"><img src="'+js_base_url+'gfx/img/preloading.gif" alt="loading..."></center>';


	$.get(js_current_url + 'ajax/get_guestbook/' + user + '/' + offset, function(data)
	{
		$('#gb_content').height('');
		document.getElementById('gb_content').innerHTML = data;

		var liks = document.getElementById('gb_link_list').getElementsByTagName('a');
		$(liks).attr('class', '');
		document.getElementById('gb_i_' + offset).className = 'active';
	});
}

/**
 *
 *
 * @return	bool
 */
function waitBox(strBox, action)
{
	try
	{
		$(strBox).css('position', 'relative');

		var intClientHeight = parseInt($(strBox).height()) + 1;
		var intimgHeight	= (intClientHeight / 2) - 20;
		var intClientWidth	= parseInt($(strBox).width()) + 1;

		if ($(strBox + ' .box_wait_panel').length == 0)
		{
			$(strBox).append('<div class="box_wait_panel"><center><img src="' + base_url + 'gfx/base/img/ajax-loader-transbg.gif" style="margin-top:' + intimgHeight + 'px;" /></center></div>');
		}

		$(strBox + ' .box_wait_panel').height(intClientHeight);
		$(strBox + ' .box_wait_panel').width('100%');

		if (action == 'show')
		{
			$(strBox + ' .box_wait_panel').show();
		}
		else
		{
			$(strBox + ' .box_wait_panel').hide();
		}

		return true;
	}
	catch (e)
	{
		return false;
	}

}