/******************* checking for empty string  *****************/
function isEmpty(s)
{   return ((s == null) || (s.length == 0))
}

/******************* (end) checking for empty string *****************/

/******************* checking for white space  *****************/

var whitespace = " \t\n\r";
function isWhitespace (s)
{ var i;
   if (isEmpty(s)) return true;
   for (i = 0; i < s.length; i++)
    {
    var c = s.charAt(i);
   if (whitespace.indexOf(c) == -1) return false;
   }
  return true;
}
/******************* (end) checking for white space  *****************/


function send_mail_form_validation()
{
	check_name=document.send_email_form.visitor.value;
	if (isWhitespace(check_name) || isEmpty(check_name))
	{
		alert('Name is mandatory.');
		document.send_email_form.visitor.focus();		
		return false;
	}
	
	
	
	check_mail=document.send_email_form.email.value;
	if (isWhitespace(check_mail) || isEmpty(check_mail))
	{
		alert('Email is mandatory.');
		document.send_email_form.email.focus();		
		return false;
	}

	if ((check_mail == "") || (check_mail.indexOf('@', 0) == -1) || (check_mail.indexOf('.', 0) == -1) )
	{
		alert("Not a valid e-mail address!");
		document.send_email_form.email.focus();
		return false;
	}
	
	notes=document.send_email_form.notes.value;
	if (isWhitespace(notes) || isEmpty(notes))
	{
		alert('Message is mandatory.');
		document.send_email_form.notes.focus();		
		return false;
	}
	
	
	
}

