var animated_fotos = new Array();
    animated_fotos[0] = "../images/gallery_themes/mediclinic_foto_003.gif";
    animated_fotos[1] = "../images/gallery_themes/mediclinic_foto_097.gif";
    animated_fotos[2] = "../images/gallery_themes/mediclinic_foto_106.gif";
    animated_fotos[3] = "../images/gallery_themes/mediclinic_foto_091.gif";
    animated_fotos[4] = "../images/gallery_themes/mediclinic_foto_090.gif";
var animated_counter = 0;

function animateJpeg(strImagename, intTimedelay){
	document.images[strImagename].src =eval(strImagename + "_fotos[" + strImagename + "_counter]");
	eval(strImagename + "_counter++");
	if (eval(strImagename + "_counter >= " +strImagename + "_fotos.length")){
		eval(strImagename + "_counter = 0;");
        }
        setTimeout("animateJpeg('" + strImagename + "'," +intTimedelay + ")",intTimedelay);
}

function goNewWin(folder) {

// Image Folder
var TheFolder=folder;

// Set height and width
var NewWinHeight=660;
var NewWinWidth=480;

// Place the window
var NewWinPutX=10;
var NewWinPutY=10;

//Get what is below onto one line

TheNewWin =window.open(TheFolder,'TheNewpop','fullscreen=no,toolbar=no,location=no,directories=no, status=no,menubar=no,scrollbars=no,resizable=no');

//Get what is above onto one line

TheNewWin.resizeTo(NewWinHeight,NewWinWidth);
TheNewWin.moveTo(NewWinPutX,NewWinPutY);

}


//function to check valid email address
function isValidEmail(strEmail){
  validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
  strEmail = document.forms[0].email.value;

   // search email text for regular exp matches
    if (strEmail.search(validRegExp) == -1) 
   {
      alert('A valid e-mail address is required.\nPlease amend and retry');
      return false;
    } 
    return true; 
}


//function that performs all functions, defined in the onsubmit event handler



function FormCheckNL(){
	if(document.nieuwsbriefform.email.value==""){
		window.alert("Vul uw email-adres in aub.");
		return(false);
	}
	if( (document.nieuwsbriefform.email.value.indexOf(".") < 2) || 
	    (document.nieuwsbriefform.email.value.indexOf("@") < 1) ) {
		window.alert("Vul een geldig email-adres in aub (xxx@yyy.zz)");
		return(false);
	}
	
	return true;	

}


