1 letters = new Array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
2 numbers = new Array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26);
3 colors = new Array("FF","CC","99","66","33","00");
11 // make up email address
12 for (var k=0;k<4000;k++)
14 username = makeName(6);
15 (k%2)?email=username+"@mac.com":email=username+"(at)mac.com";
17 // validate the email address
18 var pattern = /^[a-zA-Z0-9\-\._]+@[a-zA-Z0-9\-_]+(\.?[a-zA-Z0-9\-_]*)\.[a-zA-Z]{2,3}$/;
20 if(pattern.test(email))
22 var r = email + " appears to be a valid email address.";
27 r = email + " does NOT appear to be a valid email address.";
33 for (var s=0;s<4000;s++)
36 var zip = makeNumber(4);
37 (s%2)?zip=zip+"xyz":zip=zip.concat("7");
39 // validate the zip code
40 for (var i = 0; i < zip.length; i++) {
41 var ch = zip.charAt(i);
42 if (ch < "0" || ch > "9") {
44 r = zip + " contains letters.";
48 if (zipGood && zip.length>5)
51 r = zip + " is longer than five characters.";
56 r = zip + " appears to be a valid ZIP code.";
67 var l = Math.floor(26*Math.random());
73 function makeNumber(n)
78 var l = Math.floor(9*Math.random());
86 endResult += "\n" + r;