document.write('') document.write('') function b2iSubmitEmail(){ var errorMsg = "Invalid email"; var Valid=true; var email = document.getElementById("b2iCDE").value; if (email==""){ alert(errorMsg); Valid=false; }else{ var atPosition = email.indexOf("@"); var dotPosition = email.lastIndexOf("."); var illegalChars = ";: ,/\\<>?|"; if (email == "" || email== null) { alert(errorMsg); Valid=false; } else { if (atPosition <= 0 || email.indexOf("@", atPosition+1) != -1 || atPosition == email.length - 1 || dotPosition < atPosition+2 || dotPosition != email.length-3 && dotPosition != email.length-4 && dotPosition != email.length-5) { alert(errorMsg); Valid=false; } for (i=0; i