var http = createRequestObject();
var lastUrl = '';
var current_url = '';
var field = '';
var interval = '';
var loading=0;
var update = '001';
var loadingText = "<img src='"+ img_loading_path +"/images/loading/loading2.gif' alt=''> <font color=red>Loading ...</font>";

function createRequestObject() {
	var xmlhttp;
	try {
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); 
	}
	catch(e) 
	{
		try { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
		catch(f) { xmlhttp=null; }
	}
	if(!xmlhttp&&typeof XMLHttpRequest!="undefined") 
	{
		xmlhttp=new XMLHttpRequest();
	}
	return  xmlhttp;
}

function reload_ConfirmCode() {
	field = 'captcharImg';
	try{//alert('url='+ field);
		document.getElementById(field).innerHTML = loadingText;
		http.open('POST', action_path + '/actions.php');
		http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		http.onreadystatechange = handleResponse;
		http.send('url='+ field);
	}
	catch(e){}
	finally{}
}

function handleResponse() {
	try {
		if((http.readyState == 4)&&(http.status == 200))
			document.getElementById(field).innerHTML = http.responseText;
  	}
	catch(e){}
	finally{}
}
