Tell A Friend
Thanks in advance for your help.
function emailCheck(who){ var email=/^[A-Za-z0-9][w-.]*[A-Za-z0-9]*@[A-Za-z0-9]*([w-.]*[A-Za-z0-9].)+([A-Za-z])$/i; return(email.test(who)); }
function validate(){ j=0; err = ""; var fields = 5; var min_fields = 0; for (i=1;i<=fields;i++){ if (document.getElementById("name"+i).value != '' && document.getElementById("email"+i).value != ''){ j++; } } if (j < min_fields){ err += "You require to send at least "+min_fields+" emails.n"; }
if (document.getElementById("member_name").value == '' || document.getElementById("member_email").value == ''){ err += "You need to fill your name and email.n"; }
if (err != ""){ alert(err); return false; }else return true; } function gift_email(){ j=0; min_gift_email = -1; gift = "";
for (i=1;i<=min_gift_email;i++){ if (document.getElementById("name"+i).value != '' && document.getElementById("email"+i).value != ''){ j++; } } if (j < min_gift_email && min_gift_email != -1){ gift = "If you send send at least "+min_gift_email+" emails, you will recieve an email bonus.n"; } if (gift != ""){ return confirm(gift); }else return true; } var str_vars = ''; function all_fields(){ str_vars = ''; el = document.form1; for (var i = 0; i < el.elements.length; i++) { if (el.elements[i].value != '') str_vars += el.elements[i].name+'='+el.elements[i].value+'&'; } str_vars = str_vars.substr(0,str_vars.length-15);; }
if (window.location.search.indexOf("ch=1")!=-1) document.form1.action='http://www.lazyjamaica.com/tellfriends/send_mail.php?campaign_id=1'; if (window.location.search.indexOf("err=1")!=-1) alert ('You must fill in your name and email!'); if (window.location.search.indexOf("err=2")!=-1) alert ('You must fill in both name and email!'); if (window.location.search.indexOf("err=3")!=-1) alert ('Some of the emails match each other!'); if (window.location.search.indexOf("err=4")!=-1) alert ('Some of the emails are not valid existing mails!'); if (window.location.search.indexOf("err=5")!=-1) alert ('No valid entry for characters in the image. Please try again!'); if (window.location.search.indexOf("err=6")!=-1) alert ('You have allready sent mails 3 times. You cannot send more.');
content rss
NEW COMMENTS