function verifynewsletter() { var error=""; if(document.newsletterform.subscribe[0].checked == true){ if(document.newsletterform.name.value=="") error+="Te rugam sa introduci Numele!\n"; } if(document.newsletterform.emailaddress.value=="") error+="Te rugam sa introduci adresa de e-mail!\n"; else if (document.newsletterform.emailaddress.value.indexOf("@")==-1) error+="Adresa de e-mail incorecta!\n"; if (error!="") alert(error); return error==""; }