function hlMenu(id, state, active)
{
	if(active==0)
	{
		if(state)
		{
			$("#menu_td_"+id).attr("class","active_item");
			$("#menu_a_"+id).attr("class","active_link");
			$("#menu_div_"+id).attr("class","active_descr");			
		}
		else
		{
			$("#menu_td_"+id).attr("class","menu_item");
			$("#menu_a_"+id).attr("class","menu_link");	
			$("#menu_div_"+id).attr("class","menu_descr");
		}
	}
}

function menuClick(url)
{
	document.location=url;
}



/*----------------------NEWS-------------------*/
function  toggleNews(num)
{
	display=$("#news_text_"+num).css("display");	
	if(display=="none")
	{
		$("#news_text_"+num).slideDown();
	}
	else
	{
		$("#news_text_"+num).slideUp();	
	}
}

//var oldRandValue=-1;
//var oldRandAnimal=-1;

function changeValues()
{
	animal_rand=Math.floor(Math.random()*(allanimals.length));
	if(animal_rand>(allanimals.length-1))
	{
		animal_rand=allanimals.length-1;
	}
	
	value_rand=Math.floor(Math.random()*(allvalues.length));
	if(value_rand>(allvalues.length-1))
	{
		value_rand=allvalues.length-1;
	}
	
	if(animal_rand==oldRandAnimal)
	{
		if((animal_rand+1)>(allanimals.length-1))
		{
			animal_rand--;
		}
		else
		{
			animal_rand++;
		}
	}
	
	if(value_rand==oldRandValue)
	{
		if((value_rand+1)>(allvalues.length-1))
		{
			value_rand--;
		}
		else
		{
			value_rand++;
		}
	}
	
	value=allvalues[value_rand];
	animal=allanimals[animal_rand];
	
	$("#values_text").fadeOut("slow", function(){
		$("#values_text").html(value);
		$("#values_text").fadeIn("slow");
	});
	
	$("#values_animal").fadeOut("slow", function(){
		$("#values_animal").html("<img src='"+animal+"' width='"+allwidth[animal_rand]+"' />");
		$("#values_animal").fadeIn("slow");
	});
	
	oldRandValue=value_rand;
	oldRandAnimal=animal_rand;
}