/*
Validate Form
*/

function ValidateContactForm()
{
    var name = document.ContactForm.Name;
    var phone = document.ContactForm.Telephone;
    var email = document.ContactForm.Email;
    var what = document.ContactForm.Subject;
    var comment = document.ContactForm.Comment;

    if (name.value == "")
    {
        window.alert("Please enter your name.");
        name.focus();
        return false;
    }

	if (phone.value == "")
	{
		window.alert("Please enter your phone number.")
		phone.focus();
		return false;
	}
    
    if (email.value == "")
    {
        window.alert("Please enter a valid E-mail address.");
        email.focus();
        return false;
    }
    if (email.value.indexOf("@", 0) < 0)
    {
        window.alert("Please enter a valid E-mail address.");
        email.focus();
        return false;
    }
    if (email.value.indexOf(".", 0) < 0)
    {
        window.alert("Please enter a valid E-mail address.");
        email.focus();
        return false;
    }

    if (what.selectedIndex < 1)
    {
        alert("Please tell us how we can help you.");
        what.focus();
        return false;
    }

    if (comment.value == "")
    {
        window.alert("Please provide a detailed description or comment.");
        comment.focus();
        return false;
    }
    return true;
}
