function navHover(which)
{					
	if (document.getElementById(which.id))
	{
		cur = document.getElementById(which.id).className;
		
		if (cur == 'buttonLarge')
		{
			document.getElementById(which.id).className = 'buttonLargeHover'
		}
		else if (cur == 'buttonSmall')
		{
			document.getElementById(which.id).className = 'buttonSmallHover'
		}
	}
}

function navReset(which)
{					
	if (document.getElementById(which.id))
	{
		cur = document.getElementById(which.id).className;
		
		if (cur == 'buttonLargeHover')
		{
			document.getElementById(which.id).className = 'buttonLarge'
		}
		else if (cur == 'buttonSmallHover')
		{
			document.getElementById(which.id).className = 'buttonSmall'
		}
	}
}


function navJump(where)
{window.location=where;}

function show_element(which)
{	
	document.getElementById(which + 'on').style.display = "block";
	document.getElementById(which + 'off').style.display = "none";
	set_cookie(which, 'on');
}


function hide_element(which)
{
	document.getElementById(which + 'on').style.display = "none";
	document.getElementById(which + 'off').style.display = "block";
	set_cookie(which, 'off');
}

function set_cookie(which, state)
{
	document.cookie = "www_state" + which + "=" + state + "; path=" + "/" + ';';
}

function fetch_cookie(which)
{
	thecookie = "www_state" + which + '=';
	str_pos  = document.cookie.indexOf(thecookie);
	cc = false;
	
	if (str_pos != -1)
	{
		cstart = str_pos + thecookie.length;
		cend   = document.cookie.indexOf(";", cstart);
		
		if (cend == -1)
			cend = document.cookie.length;
		
		cc = unescape(document.cookie.substring(cstart, cend));		
	}

	return cc;
}

function set_display()
{			
	var el = new Array();
el[0] = "forum3";el[1] = "forum4";el[2] = "forum6";el[3] = "forum7";el[4] = "forum9";el[5] = "forum10";el[6] = "forum14";el[7] = "forum15";el[8] = "forum18";el[9] = "forum19";el[10] = "forum20";el[11] = "forum21";el[12] = "forum22";el[13] = "forum23";el[14] = "forum24";el[15] = "forum26";el[16] = "forum28";el[17] = "forum29";el[18] = "forum30";el[19] = "forum31";el[20] = "forum32";el[21] = "forum33";el[22] = "forum34";el[23] = "forumstats";	
	for (i = 0 ; i < el.length; i++ )
	{
		if (fetch_cookie(el[i]) != false)
		{
			if (fetch_cookie(el[i]) == 'on')
			{show_element(el[i]);}
			else
			{hide_element(el[i]);}
		}
	}
}
