/*This document contains all scripts throughout the R and E Developers site*/

// Script copyright (C) 2008 solDesigns.net

//verify contact form fields
function verifyContact(){
var email=document.ContactForm.email.value;
var apos=email.indexOf("@");
var dotpos=email.lastIndexOf(".");
if (apos<1||dotpos-apos<2)
{
    alert("Please fill in a valid email address. Ex: email@emailprovider.com");
    return false
    }
    else if(document.ContactForm.email.value=="" || document.ContactForm.email.value==null)
        {
           alert("Please fill in a valid email address. Ex: email@emailprovider.com");
           return false
        }
else if (document.ContactForm.name.value=="" || document.ContactForm.name.value==null)
{
    alert("Please fill in your name");
    return false
    }
    else if(document.ContactForm.phone.value=="" || document.ContactForm.phone.value==null)
    {
        alert("Please fill in a contact phone number");
        return false
        }
        else if(document.ContactForm.address.value=="" || document.ContactForm.address.value==null)
        {
            alert("Please fill in a valid address");
            return false
        }
        else if(document.ContactForm.city.value=="" || document.ContactForm.city.value==null)
        {
            alert("Please fill in a valid city");
            return false
        }
        else if(document.ContactForm.state.value=="" || document.ContactForm.state.value==null)
        {
            alert("Please fill in a valid state");
            return false
        }
        else if(document.ContactForm.zip.value=="" || document.ContactForm.zip.value==null)
        {
            alert("Please fill in a valid zip code");
            return false
        }
        else if(document.ContactForm.country.value=="" || document.ContactForm.country.value==null)
        {
            alert("Please fill in a valid country");
            return false
        }
        else
        {
            return true
        }
}
