function init() {
document.getElementById('25e41685fed11f9b2c410682f43872f8Captcha2').innerHTML = text_show;
}
window.onload = init;
var now = new Date()
var timestamp = now.getSeconds()
var text_show = '\
\
\
\
\
';
var text_invalid = '\
\
This account is not valid.
\
\
Captcha2 \
Human Validation\
\
\
';
var text_error = '\
\
There was an error with validation.
\
\
Captcha2 \
Human Validation\
\
\
';
var text_valid = '\
\
Submitting Form... \
\
';
jQuery(document).ready(function(){
$("#25e41685fed11f9b2c410682f43872f8Captcha2").click(function(e){
offsetxy = findPos(this);
var x = e.pageX - offsetxy[0];
var y = e.pageY - offsetxy[1];
//$('#status').html(x +', '+ y +', '+ y2);
getDataReturnText('http://captcha2.com/sys/validate.php?evid=8842082fb2ce58a864f883eb6640b5e7&x='+x+'&y='+y, callback);
});
})
function callback(resp){
if (resp == '1'){
var now = new Date()
var timestamp = now.getSeconds()
var secimage = new Image();
secimage.src = "http://captcha2.com/sys/genimg.php?evid=8842082fb2ce58a864f883eb6640b5e7×tamp="+timestamp;
document["25e41685fed11f9b2c410682f43872f8image"].src = secimage.src;
}
else if (resp.length == 32){
document.getElementById('25e41685fed11f9b2c410682f43872f8validation_id').value = resp;
document.getElementById('25e41685fed11f9b2c410682f43872f8submit').click();
document.getElementById('25e41685fed11f9b2c410682f43872f8Captcha2').innerHTML = text_valid;
}
else{
document.getElementById('25e41685fed11f9b2c410682f43872f8Captcha2').innerHTML = text_error;
}
}
function findPos(obj) {
var curleft = curtop = 0;
if (obj.offsetParent) {
do {
curleft += obj.offsetLeft;
curtop += obj.offsetTop;
} while (obj = obj.offsetParent);
return [curleft,curtop];
}
}
function getDataReturnText(url, callback)
{
var XMLHttpRequestObject = false;
if (window.XMLHttpRequest) {
XMLHttpRequestObject = new XMLHttpRequest();
} else if (window.ActiveXObject) {
XMLHttpRequestObject = new
ActiveXObject("Microsoft.XMLHTTP");
}
if(XMLHttpRequestObject) {
XMLHttpRequestObject.open("GET", url);
XMLHttpRequestObject.onreadystatechange = function()
{
if (XMLHttpRequestObject.readyState == 4 &&
XMLHttpRequestObject.status == 200) {
callback(XMLHttpRequestObject.responseText);
delete XMLHttpRequestObject;
XMLHttpRequestObject = null;
}
}
XMLHttpRequestObject.send(null);
}
}