if (top == self ){
	document.location='/';
}
function trim(value) {
  value = value.replace(/^\s+/,''); 
  value = value.replace(/\s+$/,'');
  return value;
}
function validEmail(email) {
	var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (!filter.test(email)) 
	{
		return false;
	}
	else
	{
		return true;
	}
}
function isNumeric(strString)
{
	var strValidChars = "0123456789";
	var strChar;
	
	for (i = 0; i < strString.length; i++)
	{
		strChar = strString.charAt(i);
		if (strValidChars.indexOf(strChar) == -1)
		{
			return false;
		}
	}
	return true;
}

function validDOB(DOB) {
	var filter = /^([0-3])([0-9])-([0-1])([0-9])-([0-9]){4}$/;
	if (!filter.test(DOB)) 
	{
		return false;
	}
	else
	{
		return true;
	}
}
function fotovdweekfn() {
	var fvdwimgcnt = $(".fvdwimg").size()-1;
	var currentimg = $(".active").attr("rel");
	if (!currentimg) { currentimg = 0;}
	var nextimg = parseInt(currentimg)+1;
	//alert("wisselen headerimage:"+nextimg);
	 //setCookie('headerimage',nextimg,1);
	if (nextimg > fvdwimgcnt) { nextimg = 0; }
	// huidige beeld naar achter
	$("."+"fimg"+currentimg+"").css("z-index", "-1000")
	// volgende beeld naar voorgrond
	$("."+"fimg"+nextimg+"").css("z-index", "-100")
	// voorgrond weergeven
	$("."+"fimg"+nextimg+"").fadeTo("slow", 1);
	// class toevoegen
	$("."+"fimg"+nextimg+"").addClass("active");
	// vorige beeld verwijderen
	$("."+"fimg"+currentimg+"").fadeTo("slow", 0);
	// class verwijderen
	$("."+"fimg"+currentimg+"").removeClass("active");
	//alert("himgcount="+nextimg);
};
$(document).ready(function () {
	paginginterval = setInterval ( "fotovdweekfn()" , 8000 );
	//changebanner();
	currentimage = 0;
	//alert("currentimage"+currentimage);
	// alle elementen instellen
	$('.fvdwimg').each(function (index, imgitem) {
    	$(imgitem).attr( "rel", index );
    	//$(imgitem :first).addClass("active");
    	$(imgitem).addClass("fimg"+index);
    	//alert("currentimage"+currentimage+" || index="+index);
    	if ( index == currentimage) {
    			//alert("addclass "+currentimage+" || index="+index);
    			$(imgitem).addClass("active");
    			$(imgitem).css("opacity","1");
    		} else {
    			$(imgitem).removeClass("active")
    			$(imgitem).css("opacity","0");
    		}
    });
 });