<!--
var http = null;
var WEBPATH = '';

if(window.XMLHttpRequest) 
{
  http = new XMLHttpRequest();
} 
else if(window.ActiveXObject) 
{
  http = new ActiveXObject("Microsoft.XMLHTTP");
}

function newCaptcha(webpath) {
   WEBPATH = webpath;
   handle();
}

function handle() 
{
	if(http != null) 
	{
		document.getElementById('details_captcha_img').innerHTML = "<img src=\"" + WEBPATH + "img/indicator.gif\" id=\"details_captcha_indicator\" />";  
	  http.open("GET", WEBPATH + "include/captcha.ajax.php", true);
	  http.onreadystatechange = output;
	  http.send(null);
	}
}

function output() 
{	
  if(http.readyState == 4) 
  { 	   	
 	  document.getElementById('details_captcha_img').innerHTML = "<img src=\"" + WEBPATH + "include/captcha.php?id=" + http.responseText + "\" id=\"details_captcha_img_tag\" />";           
    document.kommentarform.captcha_session_code.value = http.responseText;
  }
}
//-->