// JavaScript Document
function check_new_review_submission(theform)
{
	if(theform.author.value=="")
	{
		alert("Please enter your name.");
		return false;
	}
	if(theform.summary.value=="")
	{
		alert("Please enter a summary or title for your review.");
		return false;
	}
	if(theform.content.value=="")
	{
		alert("You have not entered any review!");
		return false;
	}
	return true;
}

function clear_value(val,obj)
			{
				if(obj.value==val) obj.value="";
			}
			function submit_message()
			{
				var theform = document.getElementById("chat_input");
				var theuser = document.getElementById("chat_user").value;
				var thecomment = document.getElementById("chat_content").value;
				if(thecomment=="Enter message..."||thecomment=="")
				{	
					alert("Please enter a message!");
					return false;
				}
				if(theuser=="Enter name..."||theuser=="")
				{	
					alert("Please enter your name!"); 
					return false;
				}
				
				AjaxRequest.submit(theform,{'onSuccess':function(req) 
				{
					theform.chat_content.value="";
					theform.chat_content.focus();
					document.getElementById("chat_messages").innerHTML = req.responseText;
				}});
				return false;
			}
			

function check_search_form(theform)
{
	if(theform.keywords.value=="")
	{
		alert("Please enter some keywords to search!");
		return false;
	}
	return true;
}