var xmlHttp;

function fnRefreshCaptcha()	{ 
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)	{
	  alert ("Your browser does not support this feature.");
	  return;
	}        
	var url="incGenCaptcha.php";
	url=url+"?sid="+Math.random();
	xmlHttp.onreadystatechange=function()	{
		if (xmlHttp.readyState==4)		{
			if (xmlHttp.responseText.search("Error!")!=-1)	{
				var ErrorMsg = xmlHttp.responseText;
				ErrorMsg=ErrorMsg.replace(/Error! /i, "")
				alert(ErrorMsg);
			}
			else	{
				document.getElementById("CaptchaField").innerHTML = xmlHttp.responseText;
			}
		}
	}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}	
