function slideSwitch() {
    var $active = $('#slideshow IMG.active');
    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow IMG:first');

    // uncomment the 3 lines below to pull the images in random order
    
    var $sibs  = $active.siblings();
    var rndNum = Math.floor(Math.random() * $sibs.length );
    var $next  = $( $sibs[ rndNum ] );

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

function setCookie(NameOfCookie, value, expiredays) {
var ExpireDate = new Date ();
ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));

document.cookie = NameOfCookie + "=" + escape(value) + 
((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());

} 

function getCookie(NameOfCookie){
if (document.cookie.length > 0) { 
	begin = document.cookie.indexOf(NameOfCookie+"="); 
	if (begin != -1) { 
		begin += NameOfCookie.length+1; 
		end = document.cookie.indexOf(";", begin);
		if (end == -1) end = document.cookie.length;
		var lng = document.cookie.substring(begin, end);
		if(lng=='FR'){
			location.replace("../fr/index.asp");
		}else if(lng=='NL'){
			location.replace("../nl/index.asp");
		}else{
			setCookie('Zeilmakerijtoussein.be','NL','365');
			location.replace("../nl/index.asp");
		}
		
		return null;		
	} else{
		alert("Please activate Coockies");
		location.replace("../nl/index.asp");
	}
}else{
	alert("Please activate Coockies");
    location.replace("../nl/index.asp");
}
return null; 

} 

function markActiveLink() {  
	$("#mainMenu a").filter(function() { 
		var currentURL = window.location.toString().split("/");		
		return $(this).attr("href") == currentURL[currentURL.length-1]; 
	}).css({'background-color' : '#FBDD39', 'color' : '#072B64', 'position' : 'relative', 'left' : '-25px', 'width' : '175px'});
} 
