function isEmpty(field,alerttxt) {
    with (field) {
	if( name == "eula" ) {
	    if ( field.checked != 1 ) {
		alert(alerttxt);
		field.focus();
		return true;
	    }
	}  
	if (value==null||value=="") {
	    alert(alerttxt); 
	    field.focus();
	    return true;
	} else {
	    return false;
	}
    }
}

function validate_contact(thisform)
{
  
    with (thisform)
	{

	    if( isEmpty(firstName,"First name must be filled out.") ||
		isEmpty(lastName,"Last name must be filled out.") ||
		isEmpty(title,"Title must be filled out.") ||
		isEmpty(phone,"Phone must be filled out.") ||
		isEmpty(email,"Email must be filled out.") ||
		isEmpty(organization,"Organization name must be filled out.") ||
		isEmpty(city,"City must be filled out.") ||
		isEmpty(country,"Country must be filled out.") ) {
		return false;
	    }
 
	    if( country.value == "United States" || country.value == "Canada" ) {
		if( isEmpty(stateProvince, "State/Province must be filled out.") ||
		    isEmpty(zipPostalCode, 
			    "Zip Code / Postal Code must be filled out.") ) {
		    return false;
		}
	    }
	}
}

function validate_email(thisform)
{
    with (thisform) {
	return !isEmpty(email,"Email must be filled out.");
    }
}

function validate_full_form(thisform) {
    return validate_email( thisform ) && validate_contact( thisform );
}

