document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="http://www.go2.be/config/varia.css">');
document.write('<SCRIPT src="http://www.go2.be/config/banners.js"></SCRIPT>');

// window table collapse feature
// set up all necessary variables and check if cookie exists
SwitchString = new String();
SwitchString = LoadCookieSwitch("Go2Switch");
switchtmp = new Object();
SwitchArray = new Array();
if(SwitchString != null) 
{
  switchtmp = SwitchString.split("&"); 
}
for (x in switchtmp) 
{
 switchtmp2 = new Array();
 switchtmp2 = switchtmp[x].split(":");
 SwitchArray[switchtmp2[0]] = switchtmp2[1];
}

// ShC stands for ShutCategory, this piece writes new tags to the page so that the table header
// collapses by switching the value of the table row tr tag by using the CSS tag style display // is none
// not exactly nuclear science is it ? 

function ShC(name) 
{
if(SwitchArray[name] == 1) 
{
 return "<tr id=\"" + name + "\" style=\"display:none\">"; 
}
else 
{ 
return "<tr id=\"" + name + "\">"; }
}

// the switch function reads/sets the cookievalues according to the array values
// it took an Einstein to come up with this
function Switch(name) 
{
if(SwitchArray[name] == 1) 
{
 SwitchArray[name]=0; 
}
else 
{ 
SwitchArray[name]=1; 
}

cookexp = new Date();
AddYears = 1;
if(cookexp.getYear() < 1900) 
{
 AddYears+=1900; 
}
cookexp.setYear(cookexp.getYear()+AddYears);
var switchedstring = "";

for (CategoryID in SwitchArray) 
{
 if(SwitchArray[CategoryID] == 1) 
	{
 switchedstring += "&" + CategoryID + ":1"; 
	}
}

// set the cookies values
document.cookie = "Go2Switch=" + escape(switchedstring.substr(1)) + "; expires=" + cookexp.toGMTString();
// check for browser being used in case of explorer
if(navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion.substring(0,4)) > 3) { 
 cstat = eval(name).style.display;
 switch(cstat) {
  case "block": eval(name).style.display = "none"; break;
  case "": eval(name).style.display = "none"; break;
  default     : eval(name).style.display = "block";
  }
 }
// in all other cases force a reload of the page
else { document.location.reload(); } 
}

// load the values stored in the cookie
function LoadCookieSwitch(name) 
{
var begin = document.cookie.indexOf(name+"=");
var len = begin+name.length+1;

if ((!begin) && (name != document.cookie.substring(0,name.length))) return null;
if (begin == -1) return null;
var end = document.cookie.indexOf(";",len);

if (end == -1) 
end = document.cookie.length;
return unescape(document.cookie.substring(len,end));
}

// end of switch routine