- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
<script LANGUAGE="JavaScript">
<!--
function checkEmailAddress(email) {
var allowedChars = ".-_@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
var numberAt = 0;
var indexAt = -1;
var thisChar = "";
if (email == "")
return 0;
for(j=0 ; j <= email.length ; j++) {
thisChar = email.substring(j,j+1);
if (allowedChars.indexOf(thisChar) == -1) {
return 0;
}
if (thisChar == "@") {
if (j == 0 || j >= email.length - 3 || numberAt > 0)
return;
numberAt++;
indexAt = j;
}
}
if (numberAt != 1)
{
return 0;
}
if (email.substring(indexAt+1).indexOf(".") <= 0)
return;
for (j=0; j < email.indexOf("@"); j++) {
if (allowedChars.indexOf(email.substring(j,j+1)) >= 4) // Email address is correct!!
return 1;
}
return;
}