

  var mikExp = /[$\\@\\\#%\^\&\*\\<\>(\)\[\]\+\_\{\}\`\~\=\|]/;

  function dodacheck(val) {
	  var strPass 	= val.value;
	  var strLength = strPass.length;
	  var lchar 	= val.value.charAt((strLength) - 1);

	  if(lchar.search(mikExp) != -1) {
		  var tst 	= val.value.substring(0, (strLength) - 1);
		  val.value = tst;
     	}
  }





function ChkSubForm(formIn, oktoProcessYN){

//	alert('checking 000');
	// oktoProcessYN (2nd param) = to do with uers entering only 5 entries per article within 24 hour period.
	// if this value=0 then return false;

	if (oktoProcessYN==0) {
		alert(' you have submitted 5 feedbacks within the last 24 hours.');
	return false;
	}
	
	

//	document.getElementById('SpanFormErrMessage').innerHTML = '';

    document.getElementById('SpanFormAddCommentName').innerHTML = '';
    document.getElementById('SpanFormAddCommentLocation').innerHTML = '';
    document.getElementById('SpanFormErrAddCommentComment').innerHTML = '';

							 

	var AddCommentName 		= formIn.AddCommentName.value.length;
	var AddCommentLocation 	= formIn.AddCommentLocation.value.length;
	var AddCommentComment 	= formIn.AddCommentComment.value.length;
	
	var vAddCommentName 	= formIn.AddCommentName.value;
	var vAddCommentLocation = formIn.AddCommentLocation.value;
	var vAddCommentComment 	= formIn.AddCommentComment.value;
	
	
	var errYN				= 0;



    if (AddCommentName<5) {
    	errYN = 1;
    	document.getElementById('SpanFormAddCommentName').innerHTML = ' 5 characters or more please';
    } 
    	
    	
    if (AddCommentLocation<5) {
    	errYN = 1;
    	document.getElementById('SpanFormAddCommentLocation').innerHTML = ' 5 characters or more please';
    } 	
	
    if (AddCommentComment<10 || AddCommentComment>500) {
	    errYN = 1;
    	document.getElementById('SpanFormErrAddCommentComment').innerHTML = ' 10-500 characters please';
    }

/*
	if (containsAlphabets(vAddCommentComment)){
	    errYN = 1;
    	document.getElementById('SpanFormErrAddCommentComment').innerHTML = 'Alphabet characters only please';
	}
*/	
	
	
	if (errYN == 0){ 
		alert('Thank you for your comments.  We reserve the right to modify your comments before publishing if necessary.  Please note, only 5 comments per user within a 24 hour period is allowed as an anti-spam measure');
		formIn.submit();
	return false;
	
//	return true ;
	}
	
	else {
		return false;
	}

}
