
function printEntry(entryID)	{
   var width=780;
   var height=420;
   var left=(screen.availWidth - width) / 2;
   var top=(screen.availHeight - height) / 2;
   window.open('/tweebergen/printentry.cfm?print='+entryID, 'print', 'top=' + top + ', left=' + left + ', scrollbars=yes,resizable=no,toolbar=yes,location=yes,width='+width+',height='+height+'');
}
function displayComments(entryID) {
	if(document.getElementById('comment'+entryID).className=="none"||document.getElementById('comment'+entryID).className!="block"){
		document.getElementById('comment'+entryID).className="block";
	}else{
		document.getElementById('comment'+entryID).className="none";
	}

/*    var width=420;
   var height=420;
   var left=(screen.availWidth - width) / 2;
   var top=(screen.availHeight - height) / 2;
   window.open('comments.cfm?entryID='+entryID, 'comments', 'top=' + top + ', left=' + left + ', scrollbars=yes,resizable=yes,toolbar=no,location=no,width='+width+',height='+height+''); */
}
function checkCommentsForm(thisform)	{
	var emailRegex=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/;
	if(thisform.poster.value.length==0)	{
		alert('Naam is verplicht.');
		return false;
	} else if(thisform.posterEmail.length==0||emailRegex.test(thisform.posterEmail.value)==false)	{
		alert('E-mail is verplicht');
		return false;
	} else if(thisform.comment.value.length==0)	{
		alert('reactie is verplicht');
		return false;
	} else {
		return true;
	}
}
function checkEmailSubscriptionForm()	{
	var emailRegex=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/;
	if(document.emailSubscriber.emailAddress.length==0||emailRegex.test(document.emailSubscriber.emailAddress.value)==false)	{
		alert('Please enter your Email!');
		return false;
	} else {
		return true;
	}
}