function doAjax(){
	var xmlhttp = false ;
	try{
		xmlhttp = new ActiveXObject('Msxml2.XMLHTTP') ;
	}catch(e){
		try{
			xmlhttp = new ActiveXObject('Microsoft.XMLHTTP') ;
		}catch(E){
			xmlhttp = false ;
		}
	}
	if(!xmlhttp && typeof XMLHttpRequest != 'undefined'){
		xmlhttp = new XMLHttpRequest() ;
	}
	return xmlhttp ;
}

function refreshCaptcha(){

	document.getElementById('captcha_content-id').innerHTML = '<div style="text-align: center"><img src="pics/loading-circle.gif" style="margin: 20px 0" /></div>' ;
	
	var req = doAjax() ;
	
	if(req){
		req.onreadystatechange = function(){
			if(req.readyState == 4){
				document.getElementById('captcha_content-id').innerHTML = req.responseText ;
			}
		}
		req.open("GET", "ajax.php?op=captcha", true) ;
		req.send(null) ;
	}	
}

