//	V1.01 13-07-06	ka	initial version (e-day)
//	V1.02 15-07-06	jjc	updated voor 3 blokken teller/footer/back2top
//	V1.03 04-08-06	jjc	firefox fix


// normal buttons
function mo(a)
{
	a.className = 'butt butt_mo';
}

function mg(a)
{
	a.className = 'butt butt_mg';
}

function mc(a)
{
	a.className = 'butt butt_mc';
}

function ref_to(a)
{
	var b = a.getAttribute('href'); // Mozilla fix
	window.location = b;
}


// resize een div
function divReSize()
{
	cWidth   = document.body.clientWidth;					// wat is schermbreedte
	ts_width = document.getElementById('teller_space').offsetWidth;
	lt_width = document.getElementById('lefttop_space').offsetWidth;
	tsOffset = cWidth - ts_width;							// breedte - tellerspace_breedte
	mtWidth  = cWidth - ts_width - lt_width;				// breedte - teller & lefttop space
	document.getElementById('teller_space').style.left   = tsOffset;
	document.getElementById('midtop_space').style.width  = mtWidth;
	document.getElementById('news_space').style.width  = mtWidth;
	document.getElementById('teller_space').style.visibility = 'visible';	// ==jc==

	cHeight  = document.body.clientHeight;					// wat is schermhoogte
	cScroll  = document.body.scrollTop;						// hoeveel gescrolld
	lt_hght  = document.getElementById('lefttop_space').offsetHeight;
	bs_hght  = document.getElementById('button_space').offsetHeight;
	b2_hght	 = document.getElementById('back2top_space').offsetHeight;
	cs_hght  = document.getElementById('content_space').offsetHeight;
	f1_hght  = document.getElementById('footer_space').offsetHeight;
	min_topb = lt_hght + bs_hght + 10;			   	// minimale plek is hier. (10 om wat ruimte tussen button en back2top te scheppen)
	max_topb = (cScroll + cHeight ) - b2_hght;	   	// ideale plek is op de onderrand van het scherm (voeg -x toe om iets boven te zetten)

	min_topc = lt_hght + cs_hght + 10;
	max_topc = cHeight - f1_hght;

	if(max_topb < min_topb) document.getElementById('back2top_space').style.top = min_topb;
	else document.getElementById('back2top_space').style.top = max_topb;
	document.getElementById('back2top_space').style.visibility = 'visible'; // ==jc==

	if(max_topc < min_topc) document.getElementById('footer_space').style.top = min_topc;
	else document.getElementById('footer_space').style.top = max_topc;

// maak footer breedte gelijk aan content breedte
	cs_width  = document.getElementById('content_space').offsetWidth;
	document.getElementById('footer_space').style.width = cs_width;
	document.getElementById('footer_space').style.visibility = 'visible'; // ==jc==

	document.getElementById('news_space').style.visibility = 'visible'; // ==ka==

	setTimeout('divReSize()',500);
}


// glow een stuk tekst
function glow()
{
	var col = new Array ('#000000', '#111111', '#222222', '#333333', '#444444', '#555555', '#666666', '#777777', '#888888', '#999999', '#aaaaaa', '#bbbbbb', '#cccccc', '#dddddd', '#eeeeee', '#ffffff', '#ffffff', '#ffffee', '#ffffdd', '#ffffcc', '#ffffbb', '#ffffaa', '#ffff99', '#ffff88', '#ffff77', '#ffff66', '#ffff55', '#ffff44', '#ffff33', '#ffff22', '#ffff11', '#ffff00', '#ffee00', '#ffdd00', '#ffcc00', '#ffbb00', '#ffaa00', '#ff9900', '#ff8800', '#ff7700', '#ff6600', '#ff5500', '#ff4400', '#ff3300', '#ff2200', '#ff1100', '#ff0000', '#ee0000', '#dd0000', '#cc0000', '#bb0000', '#aa0000', '#990000', '#880000', '#770000', '#660000', '#550000', '#440000', '#330000', '#220000', '#110000' );
	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);
}

function test(test, w, h)
{
	document.write("<h1>" + test + "<br>" + w + "<br>" + h + "</h1>");
}
