function changePhotosGroup(albumId){
	document.location.href='default.asp?actie=getAlbum&album=' + albumId;
}

function openImage(photoId,photoGroup){
	var winl = ((screen.width) / 2) - 250;
	var wint = ((screen.height) / 2) - 250;

	windowName = "pictureWindow";
	windowURL = "pictureWindow.asp?photoId=" + photoId + "&photoGroup=" + photoGroup;
	myWindow = window.open(windowURL, windowName,'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=500, height=500,top='+wint+',left='+winl+'');
	myWindow.focus();
}

function closeImage(){
	window.close();
}

function SubmitThread(){
	var filter  = /^[\w\.-]+@[\w\.-]+\.[a-zA-Z]{2,4}$/;
	if(!filter.test(document.thread.threadEmail.value) || document.thread.threadName.value == "" || document.thread.threadTitle.value == "" || document.thread.threadDescription.value == ""){
		alert("Geen geldige invoer!");
		return false;
	}
	return true;
}

function TextCounter( field, maxlimit ){
	if ( field.value.length >= maxlimit ){
		field.value = field.value.substring( 0, maxlimit-1 );
		alert( 'Dit veld kan maar ' + maxlimit + ' karakters bevatten!');
	}
}