
var FormElements = new Array('personnel_name', 'personnel_sender', 'personnel_position', 'personnel_city', 'personnel_background', 'personnel_hear', 'personnel_liason', 'personnel_reason', 'personnel_achieve', 'personnel_secure', 'personnel_passions', 
'personnel_philosophy', 'personnel_apart', 'personnel_strengths', 'personnel_weakness', 'personnel_business', 'personnel_goal', 'personnel_best', 'personnel_opinion', 
'personnel_manage', 'personnel_objective', 'personnel_agree', 'personnel_stress', 'personnel_learned' );

function disableSubmit()
{
    // disables the submit button
    //document.getElementById( 'contact_submit' ).disabled = true;
}

function checkForm()
{
    // we've got a few controls to look at
    
    var element;
    var success = true;
    
    for ( element in FormElements )
    {
        if ( document.getElementById( FormElements[element] ) )
        {
            if ( document.getElementById( FormElements[element] ).value.length < 2 )
            {
                success = false;
                document.getElementById( FormElements[element] ).style.background="yellow";
            }
        }
        else
            alert( FormElements[element] + ' has no properties!' );
    }
    
    if ( success == false )
        alert( "The highlighted fields need to be filled out.  Thanks!" );
    
    return success;
}