function IsEmpty( text )
{
    if( text.value.length == 0 ) 
        return( true );
    for( var i=0; i<text.value.length; ++i )  
    {
        var ch = text.value.charAt(i);
        if( ch != ' ' && ch != '\t' ) 
            return( false );
    }
    return( true );
}


function IsEmail( text )
{
    if( text.value.length == 0 ) 
        return( false );
    if( text.value.indexOf("@") == -1 || text.value.indexOf(".") == -1 )
        return( false );
    return( true );
}


function ValidateRFPRequestForm(F)
{
    if ( IsEmpty(F.Organization) )
        {
        alert("Please enter your organization.");
        F.Organization.focus();
        }
    else 
    if ( IsEmpty(F.Name) )
        {
        alert("Please enter the contact name.");
        F.Name.focus();
        }
    else 
	if ( IsEmpty(F.Email) || !IsEmail(F.Email) )
        {
        alert("Please enter a valid e-mail address.");
        F.Email.focus();
        }
    else 
    if ( IsEmpty(F.Address) )
        {
        alert("Please enter the address.");
        F.Address.focus();
        }
    else 
    if ( IsEmpty(F.City) )
        {
        alert("Please enter the city.");
        F.City.focus();
        }
    else 
    if ( IsEmpty(F.State) )
        {
        alert("Please enter the state.");
        F.State.focus();
        }
    else 
    if ( IsEmpty(F.Zip) )
        {
        alert("Please enter the zip code.");
        F.Zip.focus();
        }
    else 
    if ( IsEmpty(F.Description) )
        {
        alert("Please describe your project.");
        F.Description.focus();
        }
    else
    if ( IsEmpty(F.Start) )
        {
        alert("Please enter your preferred start date.");
        F.Start.focus();
        }
    else 
    if ( IsEmpty(F.End) )
        {
        alert("Please enter your end date.");
        F.End.focus();
        }
    else 
    return( true );
    
    return( false );
}

