function comval(formType){
	// function to validate comments for errors
	var name = document.getElementById("txtName")
	var comment = document.getElementById("txtComment")
	var x = true
	var msgd = 'There were errors with your comment submission: \n \n'
	if (name.value==''){
		x = false
		msgd=msgd+'You have to enter a name \n'
	}
	if (comment.value==''){
		x = false
		switch(formType){
			case 'comment':	msgd=msgd+'You have to enter a comment \n';
			break;
			case 'email': msgd=msgd+'You have to enter a message \n';
			break;
		}
	}
	if (x==false){
		alert(msgd)
		return false
	}
	return true
}