<!-- Original:  Jonathan Feaster (http://www.archreality.com/) -->

<!-- Web Site:  http://www.archreality.com/jcap/ -->

<!-- Based on: Gimpy CAPTCHA Project at Carnegie Mellon University (http://www.captcha.net/) -->

<!-- Begin

function cimg(){
var imgdir = "cimages/"; //identify directory where captcha images are located
anum = (Math.floor(Math.random()*30))+1;
imgid = parseInt(anum);
cword = 
["60ee0bc62638fccf2d37ac27a634a9e9", "68e2d83709f317938b51e53f7552ed04", "f4c9385f1902f7334b00b9b4ecd164de",
 "df491a4de50739fa9cffdbd4e3f4b4bb", "ef56b0b0ddb93c2885892c06be830c68", "fe4c0f30aa359c41d9f9a5f69c8c4192",
 "cbf4e0b7971051760907c327e975f4e5", "ea9e801b0d806f2398bd0c7fe3f3f0cd", "609a8f6f218fdfe6f955e19f818ec050",
 "cbf4e0b7971051760907c327e975f4e5", "8cb554127837a4002338c10a299289fb", "28f9b1cae5ae23caa8471696342f6f0c",
 "74e04ddb55ce3825f65ebec374ef8f0d", "567904efe9e64d9faf3e41ef402cb568", "7edabf994b76a00cbc60c95af337db8f",
 "639849f6b368019778991b32434354fc", "7edabf994b76a00cbc60c95af337db8f", "dd8fc45d87f91c6f9a9f43a3f355a94a",
 "eb5c1399a871211c7e7ed732d15e3a8b", "8cb554127837a4002338c10a299289fb", "0b8263d341de01f741e4deadfb18f9eb",
 "87fa4eaaf3698e1b1e2caadabbc8ca60", "327a6c4304ad5938eaf0efb6cc3e53dc", "841a2d689ad86bd1611447453c22c6fc",
 "ceb20772e0c9d240c75eb26b0e37abee", "a3e2a6cbf4437e50816a60a64375490e", "bc8fba5b68a7babc05ec51771bf6be21",
 "68934a3e9455fa72420237eb05902327", "c9fab33e9458412c527c3fe8a13ee37d", "2fc01ec765ec0cb3dcc559126de20b30"];

document.write('<img src="'+imgdir+imgid+'.jpg" width=290 height=80 border=0 alt="">');
}

function jcap(){

var uword = hex_md5(document.getElementById('uword').value);
var cname = document.getElementById('cbox_comment_name').value;
var ctext = document.getElementById('cbox_comment_text').value;
var space = ' ';
var comment = cname.concat(space.concat(ctext));
var lcomment = comment.toLowerCase();

if (lcomment.match("[b-dB-Df-hF-Hj-nJ-Np-tP-Tv-xV-XzZ][b-dB-Df-hF-Hj-nJ-Np-tP-Tv-xV-XzZ][b-dB-Df-hF-Hj-nJ-Np-tP-Tv-xV-XzZ][b-dB-Df-hF-Hj-nJ-Np-tP-Tv-xV-XzZ][b-dB-Df-hF-Hj-nJ-Np-tP-Tv-xV-XzZ]")) {
alert('Your comment is not allowed. Please change it.');
document.getElementById('cbox_comment_text').focus();
return false;
}

if (lcomment.match("xxx")) {
alert('Your comment is not allowed. Please change it.');
document.getElementById('cbox_comment_text').focus();
return false;
}

if (lcomment.match("sex")) {
alert('Your comment is not allowed. Please change it.');
document.getElementById('cbox_comment_text').focus();
return false;
}

if (lcomment.match("porn")) {
alert('Your comment is not allowed. Please change it.');
document.getElementById('cbox_comment_text').focus();
return false;
}

if (lcomment.match("url")) {
alert('Your comment is not allowed. Please change it.');
document.getElementById('cbox_comment_text').focus();
return false;
}

if (lcomment.match("link")) {
alert('Your comment is not allowed. Please change it.');
document.getElementById('cbox_comment_text').focus();
return false;
}

if (lcomment.match("http")) {
alert('Your comment is not allowed. Please change it.');
document.getElementById('cbox_comment_text').focus();
return false;
}

if (uword==cword[anum-1]) {
return true;
}
else {
alert('Enter the code as it is shown!');
document.getElementById('uword').focus(); 
return false;
}
}

//  End -->
