/*********************************************
 * Settings
 ********************************************/
var first_opac = 60; //The percentage of opacity in the beginning
var sec_opac = 100; //The final percentage of opacity
var speed = 1; //The speed of the timeout

/*********************************************
 * Button: Patienten
 ********************************************/
var btnPatientenOpac = first_opac;
var btnPatientenTimeOut;
function btnPatienten(show)
{
	if (document.all)
	{
		//If the show boolean is true, the opacity value will be higher.
		(show) ? btnPatientenOpac+=speed : btnPatientenOpac-=speed;
		
		//Try to update the opacity
		eval("patienten.filters.alpha.opacity="+btnPatientenOpac);
		
		//If the opacity value is out of the first and second opac range, clear the interval
		if (btnPatientenOpac <= first_opac || btnPatientenOpac >= sec_opac)
			clearInterval(btnPatientenTimeOut);
	}
	
	if (document.layers) clearInterval(btnPatientenTimeOut);	
}

/*********************************************
 * Button: Werkgevers
 ********************************************/
var btnWerkgeversOpac = first_opac;
var btnWerkgeversTimeOut;
function btnWerkgevers(show)
{
	if (document.all)
	{
		//If the show boolean is true, the opacity value will be higher.
		(show) ? btnWerkgeversOpac+=speed : btnWerkgeversOpac-=speed;
		
		//Try to update the opacity
		eval("werkgevers.filters.alpha.opacity="+btnWerkgeversOpac);
		
		//If the opacity value is out of the first and second opac range, clear the interval
		if (btnWerkgeversOpac <= first_opac || btnWerkgeversOpac >= sec_opac)
			clearInterval(btnWerkgeversTimeOut);
	}
	
	if (document.layers) clearInterval(btnWerkgeversTimeOut);	
}

/*********************************************
 * Button: Sporters
 ********************************************/
var btnSportersOpac = first_opac;
var btnSportersTimeOut;
function btnSporters(show)
{
	if (document.all)
	{
		//If the show boolean is true, the opacity value will be higher.
		(show) ? btnSportersOpac+=speed : btnSportersOpac-=speed;
		
		//Try to update the opacity
		eval("sporters.filters.alpha.opacity="+btnSportersOpac);
		
		//If the opacity value is out of the first and second opac range, clear the interval
		if (btnSportersOpac <= first_opac || btnSportersOpac >= sec_opac)
			clearInterval(btnSportersTimeOut);
	}
	
	if (document.layers) clearInterval(btnSportersTimeOut);	
}

/*********************************************
 * Button: Complementair
 ********************************************/
var btnComplementairOpac = first_opac;
var btnComplementairTimeOut;
function btnComplementair(show)
{
	if (document.all)
	{
		//If the show boolean is true, the opacity value will be higher.
		(show) ? btnComplementairOpac+=speed : btnComplementairOpac-=speed;
		
		//Try to update the opacity
		eval("complementair.filters.alpha.opacity="+btnComplementairOpac);
		
		//If the opacity value is out of the first and second opac range, clear the interval
		if (btnComplementairOpac <= first_opac || btnComplementairOpac >= sec_opac)
			clearInterval(btnComplementairTimeOut);
	}
	
	if (document.layers) clearInterval(btnComplementairTimeOut);	
}

function clearTimeOut(interval)
{
	clearInterval(interval);
}