function limitText(limitField, limitCount, limitNum) {
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);
		} else {
			limitCount.value = limitNum - limitField.value.length;
		}
	}
function openWindow(linkString) {
  popupWin = window.open('/print.cfm?recID='+linkString,'printWindow','menubar,scrollbars,resizable,width=550,height=400,left=20,top=20')}

function isValidEmail(str) {
   return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}

function Validator(commentform)
 {
 
 if (commentform.name.value == "")
  {
	alert("Please enter your name.");
	commentform.name.focus();
	return (false);
  }
  if (commentform.email.value == "")
  {
	alert("Please enter your email.");
	commentform.email.focus();
	return (false);
  }
   if (!isValidEmail(commentform.email.value))
  {
	alert("Please enter a valid email address.");
	commentform.email.focus();
	return (false);
  }
   if (commentform.comment.value == "")
  {
	alert("Please enter a comment.");
	commentform.comment.focus();
	return (false);
  }		
 return (true);
}

function popImgWindow(imagename)
{
	popupWin = window.open('../_images/'+imagename,'imgwindow','width=350,height=400,left=20,top100');	
}