home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
i·claim - visualizing argument
/
ICLAIM.ISO
/
mac
/
Assignments.swf
/
scripts
/
DefineSprite_325
/
frame_12
/
DoAction.as
Wrap
Text File
|
2005-02-28
|
1KB
|
56 lines
function validateEmail(email)
{
if(RegExp)
{
var _loc2_ = new RegExp("^([a-zA-Z0-9][-a-zA-Z0-9_\\&%]*)?[a-zA-Z0-9+]@[a-zA-Z0-9][-a-zA-Z0-9\\]*\\.[a-zA-Z0-9]{2,3}$");
if(!_loc2_.test(email) || email.charAt(email.indexOf("@") + 1) == " ")
{
return false;
}
return true;
}
i = 0;
while(i < email.length)
{
if((email.charAt(i) < "a" || email.charAt(i) > "z") && (email.charAt(i) < "A" || email.charAt(i) > "Z") && (email.charAt(i) < "0" || email.charAt(i) > "9") && email.charAt(i) != "." && email.charAt(i) != "_" && email.charAt(i) != "-" && email.charAt(i) != "@")
{
return false;
}
i++;
}
if(email.indexOf("@") == -1)
{
return false;
}
if(email.length < 5)
{
return false;
}
return true;
}
function isNumeric(val)
{
if(val == null || val == "")
{
return false;
}
i = 0;
while(i < val.length)
{
if(val.charAt(i) < "0" || val.charAt(i) > "9")
{
return false;
}
i++;
}
return true;
}
if(validateEmail(this.ix_To) && validateEmail(this.ix_From))
{
gotoAndStop("send");
}
else
{
gotoAndStop("eerr");
}