var url='images/captcha/captcha.php?code=';var captchaOK=2;function getHTTPObject()
{try{req=new XMLHttpRequest();}catch(err1)
{try{req=new ActiveXObject("Msxml12.XMLHTTP");}catch(err2)
{try{req=new ActiveXObject("Microsoft.XMLHTTP");}catch(err3)
{req=false;}}}
return req;}
var http=getHTTPObject();function handleHttpResponse(){if(http.readyState==4){captchaOK=http.responseText;if(captchaOK!=1){alert('The entered code was not correct. Please try again');document.myform.code.value='';document.myform.code.focus();return false;}
document.myform.accessPassword.value='4mypass';document.myform.submit();}}
function checkcode(thecode){http.open("GET",url+escape(thecode),true);http.onreadystatechange=handleHttpResponse;http.send(null);}
function checkform(){if(document.myform.code.value==''){alert('Please enter the string from the displayed image');document.myform.code.value='';document.myform.code.focus();return false;}
checkcode(document.myform.code.value);return false;}