Can someone tell me if my script is ok

Hi can someone please check and tell me if my action script is ok it, for my email, but my confirmation stays on when the send button has been prest the email goes it works but I have to fix this confirmations thanks.

fscommand (“allowscale”, “false”);
//
// set some variables
//
mailform = “mailform.php”;
confirm = “please wait for confirmation …”
action = “send”;
//
// and focus on variable fname
//
Selection.setFocus(“fname”);
//
// validate email function
//
function validate (address) {
if (address.length>=7) {
if (address.indexOf("@")>0) {
if ((address.indexOf("@")+2) if (address.lastIndexOf(".")<(address.length-2)) {
return (true);
}
}
}
}
return (false);
}
//
//form check
//
function formcheck () {
if ((((email == null)) || (email.length<1)) || (email == “ERROR! Address not valid”)) {
email = “ERROR! Address not valid”;
action = “”;
}
if (!validate(email)) {
email = “ERROR! Address not valid”;
action = “”;
}
if (fname == null) {
fname = “ERROR! Name required”;
action = “”;
}
if (lname == null) {
lname = “ERROR! Name required”;
action = “”;
}
if ((validate(email)) && (email != “ERROR!”) && (fname != “”) && (lname != “”)) {
action = “send”;
loadVariablesNum (mailform, 0, “POST”);
gotoAndPlay (“wait”);
}
}
stop ();