
var favorite = GetCookie('language');

if (favorite != null) {
	switch (favorite) {
		case 'fr' : url = 'index.php?lg=fr';
	     	break;
		case 'nl' : url = 'index.php?lg=nl';
	     	break;
		case 'en' : url = 'index.php?lg=en';
	     	break;
	}
	

	var loc = window.location;
	loc = loc.toString();
	var tmpUrl = loc.substr(0,35);
	
	if (window.location.href != tmpUrl){
		window.location.href = url;
	}

}
