Email form validation code

thought i would post this request here as well since its from the tutorial found here.
I adapted this from another code (layout galaxy) . the problem is that the error field is not reporting errors when data is passed through the form.
here is the code that is on the first frame of actions layer :



stop();
// Making the default setting for below mentioned textfields
name = "";
email = "";
message = "";
//
//-------------------------------------------------------
// Submit Button action
send.onRelease = function() {
    //Add Path of the php file
    feedbackpath = "mailto.php";
    //
    str1 = email.indexOf("@");
    str2 = email.indexOf("@")+1;
    str3 = email.charAt(str1+1);
    str4 = email.lastIndexOf(".");
    str5 = email.charAt(str4+1);
    len = length(email);
    counter = 1;
    flag = 0;
    while (Number(counter)<=Number(len)) {
        Char = substring(email, counter, 1);
        if (Char ne "@") {
            flag = Number(flag)+1;
        }
        counter = Number(counter)+1;
    }
    //
    //Name field validation
    if (name == "") {
        condition1 = "";
        error = "Please Enter Your Name";
    } else {
        condition1 = "ok";
        error = "";
    }
    //E-Mail Address validation
    if (str4<=str2 || str3 == "." || str5 == "" || Number(flag) != Number(len-1)) {
        condition2 = "";
        error = "Please Enter A Valid Email";
    } else {
        condition2 = "ok";
        error = "";
    }
    //message field validation
    if (message == "") {
        condition3 = "";
        error = "Please Include Your Message";
    } else {
        condition3 = "ok";
        error = "";
    }
    //Sending data to php file only if all the above validations are fulfilled
    if (condition1 == "ok" && condition2 == "ok" && condition3 == "ok") {
        loadVariablesNum(feedbackpath+"?name="+name+"&email="+email+"&feedback="+suggestion, 0);
        gotoAndStop(2);
    }
};
//
//-------------------------------------------------------
// Reset Button action
reset.onRelease = function() {
    // Making the default setting for below mentioned textfields
    name = "";
    email = "";
    message = "";
};


and the .fla is included too.

thanks.
EDIT : now i can receive Errors for the message filed, but still nothing if Email or name is incorrectly entered.