function postComment(){

	if(post_form.name.value == ''){
		alert('Please enter your name and try again.');
		return true;
	}
	
	if(post_form.email.value == ''){
		alert('Please enter your email address and try again.');
		return true;
	}
	
	if (echeck(post_form.email.value) == false){
		return true;
	}
	
	if(post_form.comment.value == ''){
		alert('Please enter a comment and try again.');
		return true;
	}
	
	var theParams = Form.serialize('post_form');
	//alert('theParams: ' + theParams);

	$('post_status').innerHTML = '<img src="/graphics/gui/indicators/loading.gif"> Posting Comment...';

	new Ajax.Request('/lasso/post_comment.inc', {parameters: theParams, onSuccess:processCommentPost, onFailure:errFunc});

}
 
var processCommentPost = function(theResponse){
	//alert('k - all done then');
	$('comment_form').innerHTML = theResponse.responseText;
	
	// ### To Do ###
	// Update the comments list after posting.
	// figure out how to deal with the status before and after posting.
}

var errFunc = function(t) {
	alert('Error ' + t.status + ' -- ' + t.statusText);
}


function echeck(str) {


	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	var errorStr='Please enter a valid email address and try again'
	if (str.indexOf(at)==-1){
		alert(errorStr);
		return false;
	}

	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		alert(errorStr);
		return false;
	}

	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		alert(errorStr);
		return false;
	}

	if (str.indexOf(at,(lat+1))!=-1){
		alert(errorStr);
		return false;
	}

	if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		alert(errorStr);
		return false;
	}

	if (str.indexOf(dot,(lat+2))==-1){
		alert(errorStr);
		return false;
	}
	
	if (str.indexOf(" ")!=-1){
		alert(errorStr);
		return false;
	}

	return true;
}