// JavaScript Document
function validate_form()
{
	if (document.tagform.name.value == "" ) {
		alert("You must enter your name!");
		return false; } 
	else {
		return true; }
	if (document.tagform.message.value == "" ) {
		alert("You must enter a message!");
		return false; }
	else {
		return true; }
	if (document.tagform.usernum.value != document.tagform.verinum.value)
		alert("The number you entered does not match.");
		return false; }
	else {
		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();
}

//empties all text from the message box and re-focuses on the message
//box.  This is not the default action.
function clear_message2()
{
  document.tagform.message.value="";
  document.tagform.message.focus();
}


//select the message after it is submitted.  pause 0.2 seconds to be sure
//that the message has been submitted first
//function is named poorly, but the default has been changed and I didn't want
//to break the code for various folks, so I didn't rename
function Clear_Last_Message_on_Submit() 
{ 
  document.tagform.submit();
  setTimeout("clear_message()",200);
  return false;
}


function Clear_Last_Message_on_Submit2() 
{ 
  document.tagform.submit();
  setTimeout("clear_message2()",200);
  return false;
}