ecco tutto il codice al primo frame
fscommand("allowscale", "false");
//
// set some variables
//
mailform = "http://www.pinkatmosphere.com/mailform.php";
confirm = "grazie mille riceverai a breve una mail di conferma di invio del form.";
action = "send";
error1 = "valid email required";
error2 = "input required";
//
// and focus on variable fname
//
Selection.setFocus("name");
//
// validate email function
//
function validate(address) {
if (address.length>=7) {
if (address.indexOf("@")>0) {
if ((address.indexOf("@")+2)<address.lastIndexOf(".") ) {
if (address.lastIndexOf(".")<(address.length-2)) {
return (true);
}
}
}
}
return (false);
}
//
// form check
//
function formcheck() {
if ((((email == null)) || (email.length<1)) || (email == "valid email required")) {
email = error1;
action = "";
}
if (!validate(email)) {
email = error1;
action = "";
}
if ((name == null) || (name == "")) {
name = error2;
action = "";
}
if ((comments == null) || (comments == "")) {
comments = error2;
action = "";
}
if ((cognome == null) || (cognome == "")) {
cognome = error2;
action = "";
}
if ((telefono == null) || (telefono == "")) {
telefono = error2;
action = "";
}
if ((persone == null) || (persone == "")) {
persone = error2;
action = "";
}
if ((club == null) || (club == "")) {
club = error2;
action = "";
}
if ((cosaclub == null) || (cosaclub == "")) {
cosaclub = error2;
action = "";
}
if ((ristorante == null) || (ristorante == "")) {
ristorante = error2;
action = "";
}
if ((cosaristorante == null) || (cosaristorante == "")) {
cosaristorante = error2;
action = "";
}
if ((validate(email)) && (email != error1) && (name != "") && (name != error2) && (comments != "") && (comments != error2)) {
action = "send";
loadVariablesNum(mailform, 0, "POST");
gotoAndPlay("wait");
}
}
stop();

Rispondi quotando