var activemenu = 0;
function popup(url,winName,W,H,X,Y) {
		if(W == undefined) W = 400;	//default width
		if(H == undefined) H = 300; //default height
		if(X == undefined) X = screen.width/2-W/2; //default Xpos (is now centered)
		if(Y == undefined) Y = screen.height/2-H/2; //default Ypos (is now centered)
		X = 10;
		Y = 10;
	
		winprops = 'height='+H+',width='+W+',top='+X+',left='+Y+',scrollbars=yes, resizable=yes';
	
		win = window.open(url, winName, winprops);
		if (parseInt(navigator.appVersion) >= 4) {
			win.window.focus();
		}
	}
	function disclaimer()
	{
	popup(stricturl+"disclaimer.php",'disclaimer',500,600,10,10)
	}
function $(id)
{
return document.getElementById(id);
}
function hide(id)
{
$(id).style.display = 'none';
}
function show(id)
{
$(id).style.display = 'block';
}
function isHidden(id)
{
if($(id).style.display == 'none')
return true;
else
return false;
}
function V_switch(id)
{
if(isHidden(id))
show(id);
else
hide(id);
}
												

function addListener(element, type, expression)
{
if(window.addEventListener)	
{
 // Standard
 element.addEventListener(type, expression, false);
 return true;
 }
  else if(window.attachEvent)
   { // IE	
	element.attachEvent('on' + type, expression);	
	return true;	
}
 else return false;
}

addListener(document, "keyup", function (e) { if (!e) { e = event; } if (e.keyCode == 27) { document.location.href = "http://www.myrgb.be"; } } );


var current = 1;
function next()
{
	accordeon('pre_', (current%4+1), 4);	
}
function accordeon(prefix, activenr, total)
{
	var i;	
	for( i = 1; i<= total; i++)
		hide(prefix+i);		
	
	current = activenr;
	show(prefix+activenr);
	
}



