function validate_entry(){
	if (validate_submission()){
		document.tagform.submit();
		Clear_Last_Message_on_Submit(); 
	}
	return false;
}


function validate_submission(){
	var name = document.tagform.tagname.value;
	var location = document.tagform.taglocation.value;
	var message = document.tagform.message.value;

	if(name == ""){
		alert("Please enter your Name.")
		return false;
	}
	if(location == ""){
		alert("Please enter your Location.")
		return false;
	}
	if(message == ""){
		alert("Please Say Sumting!")
		return false;
	}	
	else{
		var dd = message.substring(0,34);
		if(dd == "Your Post has been Submitted!"){
			alert("Please Say Sumting!")
			return false;
		}
	}
	return true;
}

//selects all text and refocuses text box after submit
//chosen over clearing the message as some messages dont go through
//due to flood controls, character limits, etc
//this gives the user an option of changing the text, or simply overwriting it
function clear_message()
{
  document.tagform.message.focus();
  document.tagform.message.select();
}

//clear the message after it is submitted.  pause 0.2 seconds to be sure
//that the message has been submitted first
function Clear_Last_Message_on_Submit() 
{ 	
  document.tagform.message.value = "Your Post has been Submitted!";
  setTimeout("clear_message()",200);
  return false;
}



