var current_visible = -1;
function show(id,style,visible_box)
{
	if(current_visible == -1)
	{
		current_visible = visible_box;
		//alert(current_visible);
		//alert(visible_box);
	}
	try
	{
		document.getElementById('announ_'+current_visible).style.display = "none";
		document.getElementById('announ_'+id).style.display = style;
		document.getElementById('tab_'+current_visible).className = "";
		document.getElementById('tab_'+id).className = 'active';
	}
	catch(err)
	{}
	current_visible = id;
	//alert(current_visible);
}

function show_hide(id)
{
	try
	{
		if(document.getElementById(id).style.display == "none")
			document.getElementById(id).style.display = "block";
		else
			document.getElementById(id).style.display = "none";
	}
	catch(err)
	{}
}

var current_news_visible = -1;
function show_news_tab(id,style,visible_box)
{
	if(current_news_visible == -1)
	{
		current_news_visible = visible_box;
		//alert(current_visible);
		//alert(visible_box);
	}
	try
	{
		document.getElementById('news_container'+current_news_visible).style.display = "none";
		document.getElementById('news_container'+id).style.display = style;
		document.getElementById('news_tab'+current_news_visible).className = "";
		document.getElementById('news_tab'+id).className = 'active';
	}
	catch(err)
	{}
	current_news_visible = id;
	//alert(current_visible);
}

var curr_photo = 1;
function show_photo(mode, max)
{
	try
	{
		if(mode == 'next')
		{
			document.getElementById('foto_'+curr_photo).style.display = "none";
			if(curr_photo == max)
				curr_photo = 1;
			else
				curr_photo++;
			document.getElementById('foto_'+curr_photo).style.display = "block";
		}
		else
		{
			document.getElementById('foto_'+curr_photo).style.display = "none";
			if(curr_photo == 1)
				curr_photo = max;
			else
				curr_photo--;
			document.getElementById('foto_'+curr_photo).style.display = "block";
		}
		document.getElementById('foto_num').innerHTML = '('+curr_photo+'/'+max+')';
	}
	catch(err)
	{}
	//alert(current_visible);
}
