﻿var xmlHttpCaptcha;
           
function ChangeCaptcha() 
{
var url="Captcha.aspx?sid=" + Math.random() + ""
xmlHttpCaptcha=GetXmlHttpObject(stateChangedCaptcha)
xmlHttpCaptcha.open("GET", url , true)
xmlHttpCaptcha.send(null)
} 
function stateChangedCaptcha() 
{ 
if (xmlHttpCaptcha.readyState==4 || xmlHttpCaptcha.readyState=="complete" && window.location.href.indexOf("http")==-1)
{ 
document.getElementById("teocaptcha").innerHTML=xmlHttpCaptcha.responseText

document.getElementById("cc4grtew445teo2cap2tchax3xf3445grtt").value = document.getElementById("ccgrtew45teocaptchaxxf345grttfdr").value;


//if (window.Event)
//    document.captureEvents(Event.MOUSEUP);
//function nocontextmenu() 
//{
//    event.cancelBubble = true
//    event.returnValue = false;
//    return false;
//}

//function norightclick(e)
//{
//if (window.Event)
//{
//if (e.which == 2 || e.which == 3)
//    return false;	
//}
//else
//if (event.button == 2 || event.button == 3)		
//{
//    event.cancelBubble = true
//    event.returnValue = false;
//    return false;		
//}	
//}
//document.getElementById('teocap1').oncontextmenu = nocontextmenu;
//document.getElementById('teocap2').oncontextmenu = nocontextmenu;
//document.getElementById('teocap3').oncontextmenu = nocontextmenu;
//document.getElementById('teocap4').oncontextmenu = nocontextmenu;
//document.getElementById('teocap5').oncontextmenu = nocontextmenu;
//document.getElementById('teocap6').oncontextmenu = nocontextmenu;

//document.getElementById('teocap1').onmousedown = norightclick;
//document.getElementById('teocap2').onmousedown = norightclick;
//document.getElementById('teocap3').onmousedown = norightclick;
//document.getElementById('teocap4').onmousedown = norightclick;
//document.getElementById('teocap5').onmousedown = norightclick;
//document.getElementById('teocap6').onmousedown = norightclick;
} 


} 
function GetXmlHttpObject(handler)
{ 
var objXmlHttp=null

if (navigator.userAgent.indexOf("Opera")>=0)
{
alert("This example doesn't work in Opera") 
return 
}
if (navigator.userAgent.indexOf("MSIE")>=0)
{ 
var strName="Msxml2.XMLHTTP"
if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
{
strName="Microsoft.XMLHTTP"
} 
try
{ 
objXmlHttp=new ActiveXObject(strName)
objXmlHttp.onreadystatechange=handler 
return objXmlHttp
} 
catch(e)
{ 
alert("Error. Scripting for ActiveX might be disabled") 
return 
} 
} 
if (navigator.userAgent.indexOf("Mozilla")>=0)
{
objXmlHttp=new XMLHttpRequest()
objXmlHttp.onload=handler
objXmlHttp.onerror=handler 
return objXmlHttp
}
} 
