// JavaScript Document

function blogSearch(url)
{
	window.location = url + '/blog/search/search:' + $('#search').val();
}

function blogValidate()
{
	var valid = true;
	var error = "Error: Please check the following field(s);\r\n";

	if (!$('#comment').val())
	{
		error += "\r\n- Please enter a comment.";
		valid = false;
	}

	if ($('#comment').val().length > 500)
	{
		error += "\r\n- Please enter a comment less than 500 characters long.";
		valid = false;
	}

	if (valid == false)
		alert(error);
	
	return valid;
}