
function setCaptcha( target_div ){
	//alert('here');
	document.getElementById(target_div).innerHTML = '<img src="./contact_us/create-captcha.php" />';
}

function check_text(captcha_value, mail_add){	
	xmlhttp= (window.XMLHttpRequest ? new XMLHttpRequest(): ((window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : null) );
	xmlhttp.onreadystatechange=state_change
	xmlhttp.open("POST",'./contact_us/check_text.php',false)
	xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	var send_val = '1==1';
	
	if (captcha_value != '' && captcha_value != null)
		send_val += '&captcha_value_inputed='+ captcha_value; 
	//alert(send_val);
	if (mail_add != '' && mail_add != null)
		send_val += '&mail_add='+ mail_add; 
 	xmlhttp.send(send_val);	
	return (xmlhttp.responseText);
}


function state_change()
{
  if (xmlhttp.readyState==4)
  {
  }
}

