function IsEmail(sText) { var at="@" var dot="." var lat=sText.indexOf(at) var lstr=sText.length var ldot=sText.indexOf(dot) if (sText=="" || sText==null){ return false } if (sText.indexOf(at)==-1 || sText.indexOf(at)==0 || sText.indexOf(at)==lstr){ return false } if (sText.indexOf(dot)==-1 || sText.indexOf(dot)==0 || sText.indexOf(dot)==lstr){ return false } if (sText.indexOf(at,(lat+1))!=-1){ return false } if (sText.substring(lat-1,lat)==dot || sText.substring(lat+1,lat+2)==dot){ return false } if (sText.indexOf(dot,(lat+2))==-1){ return false } if (sText.indexOf(" ")!=-1){ return false } return true } function doForgot(){ if (IsEmail(document.frmForgot.email.value)){ if (document.frmForgot.pass.value!=''){ return (true); }else{ alert("יש להזין את קוד האבטחה - הספרות המופיעות בתמונה"); document.frmForgot.pass.select(); } }else{ alert("יש להזין את כתובת המייל"); document.frmForgot.email.select(); } return (false); } function doLogin(){ if (document.frmLogin.email.value!=''){ if (document.frmLogin.pass.value!=''){ return (true); }else{ alert("יש להזין את הססימא"); document.frmLogin.pass.select(); } }else{ alert("יש להזין את כתובת המייל"); document.frmLogin.email.select(); } return (false); }