// Javascript FUNCTIONS.JS
// V1.00 05-10-2005 JC Initial Version
// V1.01 27-10-2005 ka bredere info kolom (werkt niet, size is afhankelijk van kolom linksboven)

// ==================================================================================
// Space for common variables that need to be used throughout the code
// ==================================================================================
var toggle = 0;


// ==================================================================================
// Function space
// ==================================================================================
function showinfo()
{	// if toggle is 1, turn the info space frame off by setting it to 0 pixels. It will still update, just won't show
	if(toggle) 
	{
		toggle = 0;
		document.getElementById('fs2').cols = '0px,*';
	}
	else
	{
		toggle = 1;
		document.getElementById('fs2').cols = '325px,*';
	}
}


// ==================================================================================
// glow een stuk tekst
// ==================================================================================
function glow()
{
	var col = new Array ('#880000', '#990000', '#AA0000', '#BB0000', '#B21111', '#B22222', '#C23333', '#C24444', '#C25e10', '#C26666', '#DD7777', '#D28888', '#D29999', '#E2AAAA', '#E2BBBB', '#E2CCCC', '#F2DD99', '#F2EE99', '#F2FF99');
	var a = document.getElementById('glow');
	var b = a.lang;
	var c = a.title;
	var d = col.length;
	if(c=='up') 
	{
		b++;
		if(b>d) 
		{
			b=d;
			a.title = 'down';
		}
	}
	if(c=='down')
	{
		b--;
		if(b<0)
		{
			b=0;
			a.title='up';
		}
	}
	a.style.color = col[b];
	a.lang = b;
	setTimeout('glow()',100);
}

// get a cookie
function get_cookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}

// set a cookie
function set_cookie(name, value, expires, path, domain, secure) {
  var expires = new Date(2999,1,1); 
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}
