

// ---------------------------------------------------- SEND CONTACT FORM

function SendForm(form) {
   var theForm = typeof form != 'object' ? document.getElementById(form): form;
   var ret = Spry.Widget.Form.validate(theForm);
   if (ret) {
      Spry.Utils.submitForm(theForm);
	  var sentText = '<strong class="green">Thank you for your message</strong>, a receipt has now been sent to your inbox.  We will get back to you as soon we can.'
	  Spry.Utils.setInnerHTML('response_contact_form', sentText);
	  document.contact.reset();
   }
   return false;
};

// ---------------------------------------------------- VALIDTATE BLOG COMMENTS

function validate_cmt()
	{
		valid = true;

		if ( (document.cmt_form.cmt_auth.value == "") || (document.cmt_form.cmt_auth.value == "Name...") )
		{
			alert ( "You must enter your name" );
			valid = false;
		}
		
		if ( (document.cmt_form.cmt_text.value == "") || (document.cmt_form.cmt_text.value == "Comment...") )
		{
			alert ( "You must enter a comment" );
			valid = false;
		}
		
		var sec_str = document.cmt_form.captcha.value.toLowerCase();
		
		if (sec_str != "tk421") 
		{
			alert ( "You must enter the correct security text" );
			valid = false;
		}
	
	return valid;
}

// ---------------------------------------------------- VALIDTATE BLOG COMMENTS

function validate_search()
	{
		valid = true;

		if ( (document.search_form.search_str.value == "") || (document.search_form.search_str.value == "Search...") )
		{
			alert ( "You must enter a search criteria" );
			valid = false;
		}
	
	return valid;
}
