highlightcolour="#eee";
highlightbackground="";
highlighttext="HIDE";

normalcolour="#eee";
normalbackground="";
normaltext="VIEW";

function OpenPopupWindow(url,width,height,scrolls)
{
	var MyWin=window.open(url,"","width=" + width + ",height=" + height + ",directories=0,location=0,menubar=0,resizable=1,scrollbars=" + scrolls + ",status=0,toolbar=0,top=50,left=50", true);
	return( false );
}

function Collapse(which,cookieName,menu)
{
	if (document.getElementById && document.createTextNode)
	{
		m=document.getElementById(menu);
		trig=m.getElementsByTagName("div").item(which).style.display;
		t=m.getElementsByTagName("h4").item(which).firstChild;
		h=t.getElementsByTagName("a").item(1).firstChild;
		if (trig=="block") trig="none";
		else if (trig=="" || trig=="none") trig="block";
		if (trig=="none")
		{
			h.nodeValue=h.nodeValue.replace(highlighttext,normaltext);
			t.style.background=normalbackground;
			t.style.color=normalcolour;
			date = new Date();
			date.setFullYear(date.getFullYear() + 1);
			document.cookie = 'My=' + GetCookieString(cookieName,"1") + ';path=/;domain=' + GetDomain() + ';expires=' + date.toUTCString();
			}
		else
		{
			h.nodeValue=h.nodeValue.replace(normaltext,highlighttext);
			t.style.background=highlightbackground;
			t.style.color=highlightcolour;
			date = new Date();
			date.setFullYear(date.getFullYear() + 1);
			document.cookie = 'My=' + GetCookieString(cookieName,"0") + ';path=/;domain=' + GetDomain() + ';expires=' + date.toUTCString();
			}
		m.getElementsByTagName("div").item(which).style.display=trig;
	}
}

function GetCookieString(cookieName,cookieValue)
{
	if (document.cookie == '')
	{ 
	  return '';
	}
	else
	{
		var firstChar, lastChar, returnString;
		var theBigCookie = document.cookie;
		var name = "My"
		firstChar = theBigCookie.indexOf(name);

		if(firstChar != -1)
		{
			firstChar += name.length + 1;
			lastChar = theBigCookie.indexOf(';', firstChar);
	
			if(lastChar == -1) lastChar = theBigCookie.length;
			returnString = theBigCookie.substring(firstChar, lastChar);
			
			if (cookieValue == "1")
			{
				returnString = returnString.replace(cookieName + "=1", cookieName + "=0")
			}
			else
			{
				returnString = returnString.replace(cookieName + "=0", cookieName + "=1")
			}
			return returnString;
		}
		else
		{
			return '';
		}
	}
}

function GetDomain()
{
	var domain = this.document.domain;
	
	if (domain.indexOf('.fool',1) != domain.indexOf('.',1))
	{
		return domain.substring(domain.indexOf('.',1) + 1, domain.length);
	}
	else
	{
		return domain;
	}
}

if (document.getElementById && document.createTextNode)
{
	document.write('<style type="text/css">#menu div{display:none;}</style>')
}

