/////////////////////////////////////////////////////
// Contact Form Javascript 
// Created By: 		Matt Erney
// Company:    		Blind Acre Media
// Version:			1.0
// Date				01/07/2009
/////////////////////////////////////////////////////

function validateInfo(fname,lname,phone,email)
{
	if(fname && fname != "")
	{
		if(lname && lname != "")
		{
			if(phone && phone != "")
			{
				if(email && email != "")
				{
					document.contact-form.submit;	
				}else{
					alert("You must enter an email address to continue.");
					return;
				}
			}else{
				alert("You must enter your phone number to continue.");
				return;
			}
		}else{
			alert("You must enter your last name to continue.");
			return;
		}
	}else{
		alert("You must enter your first name to continue.");
		return;
	}
}

function showmenu(elmnt)
{
document.getElementById(elmnt).style.visibility="visible";
}
function hidemenu(elmnt)
{
document.getElementById(elmnt).style.visibility="hidden";
}

function validate_form ( )
{
    valid = true;

    if ( document.contact_form.name.value == "" )
    {
        alert ( "Please fill in the 'Name' box." );
        valid = false;
    }
	
	if ( document.contact_form.company.value == "" )
    {
        alert ( "Please fill in the 'Company' box." );
        valid = false;
    }
    
    if ( document.contact_form.street1.value == "" )
    {
        alert ( "Please fill in the 'Street' box." );
        valid = false;
    }
    
    if ( document.contact_form.city.value == "" )
    {
        alert ( "Please fill in the 'City' box." );
        valid = false;
    }
        
    if ( document.contact_form.state.value == "" )
    {
        alert ( "Please fill in the 'State' box." );
        valid = false;
    }
    
    if ( document.contact_form.zip.value == "" )
    {
        alert ( "Please fill in the 'ZIP Code' box." );
        valid = false;
    }
        
    if ( document.contact_form.phone.value == "" )
    {
        alert ( "Please fill in the 'Phone Number' box." );
        valid = false;
    }
    
    if ( document.contact_form.email.value == "" )
    {
        alert ( "Please fill in the 'Email' box." );
        valid = false;
    }
    
    if ( document.contact_form.message.value == "" )
    {
        alert ( "Please fill in the 'Message' box." );
        valid = false;
    }
    
    return valid;
}