function saveBoxState(_id) 
{
	// Get state
	if($("#box_" + _id + "_content").is(":visible"))
	{
		var type = "Show";
	}
	else
	{
		var type = "Hide";
	}
	
	// Do ajax request
	$.get(pathPrefix + "/Ajax/sty" + type + "Box" + firstSeperator + "id=" + _id + sid2);	
}

function showTab(_box, _tab, _container) 
{
	// Hide all tabs
	$("#box_" + _box + " div.boxTab").hide();
	$("#box_" + _box + " ul.tabs li").removeClass("active");
	
	// Show the specified tab
	$("#tab_" + _box + "_" + _tab).show();
	$("#tabli_" + _box + "_" + _tab).addClass("active");
	
	// Show the whole box content if it is hidden
	if($("#box_" + _box + "_content").is(":hidden"))
	{
		$("#box_" + _box + "_content_ti").click();
	}
	
	return false;
}

function updateNavigationCategoryItemState(_item) 
{
	var visible = _item.style.display == 'none' ? 0 : 1;
	
	$.get(pathPrefix + "/Ajax/navUpdateCategoryState" + firstSeperator + "id=" + _item.id.substr(14) + "&visible=" + visible);
}
