var help_flag = 0;
var questions_flag = 0;

/* показываем и прячем помощь */
function toggleDescription (current) {
$(current).parent().toggleClass('active').next('.description').toggle();
$(current).parent().find('a.browser').toggle();
reloadPage()
return false;
}

/* показываем и прячем группу помощи */
function toggleGroupDescription (current) {
if ($(current).parent().is(".active")) $(current).parent().toggleClass('active').next('.biglist').find('.title').removeClass('active').next('.description').hide();
else $(current).parent().toggleClass('active').next('.biglist').find('.title').addClass('active').next('.description').show();
reloadPage()
return false;
}

/* показываем и прячем всю помощь */
function toggleAllDescription (current) {
if (help_flag==0) {
	$(current).parent().removeClass('showall').addClass('hideall').find('a').html('<span>Свернуть все</span>');
	$('.biglist .title').addClass('active').next('.description').show();
	$('.content h3.js').addClass('active');
	help_flag=1;
} else {
	$(current).parent().removeClass('hideall').addClass('showall').find('a').html('<span>Развернуть все</span>');
	$('.biglist .title').removeClass('active').next('.description').hide();
	$('.content h3.js').removeClass('active');
	help_flag=0;
}
reloadPage()
return false;
}

/* показываем и прячем вопросы */
function toggleQuestions (current) {
if (questions_flag==0) {
	$(current).parent().removeClass('showall').addClass('hideall').find('a').html('<span>Свернуть все</span>');
	$('.link>p').show();
	questions_flag=1;
} else {
	$(current).parent().removeClass('hideall').addClass('viewall').find('a').html('<span>Развернуть все</span>');
	$('.link>p').hide();
	questions_flag=0;
}
if ($.browser.msie) $('body').css("font-size","1.3em");// чтобы IE6 не пёрло
reloadPage()
return false;
}

function toggleTools (current,who) {
$('#tools_rightspace .description').not('#'+who).hide();
$('#tools_left .title').not($(current).parent()).removeClass('active');
$(current).parent().toggleClass('active');
$('#'+who).toggle();
reloadPage()
return false;
}

function selectBobrButton (current) {
$('#choose_button').find('.bobrbutton').removeClass('b_active');
$(current).parent().addClass('b_active');
return false;
}

function selectBobrColor (current) {
$('.bobrcolor').find('span').removeClass('c_active');
$(current).parent().addClass('c_active');
return false;
}
