function loadXMLDoc( method, url ){
  if ( window.XMLHttpRequest ) {
    req = new XMLHttpRequest();
    req.onreadystatechange = processReqChange;
    req.open(method, url, true);
    req.send( null );
  } else if ( window.ActiveXObject ) {
    req = new ActiveXObject( "Microsoft.XMLHTTP" );
    if ( req ) {
      req.onreadystatechange = processReqChange;
      req.open( method, url, true );
      req.send( );
    }
  }
}
// Функция, выполняемая при изменении статуса
// запроса, если статус  равен 200, данные получены.
function processReqChange() {
  if ( req.readyState == 4 ) {
    if ( req.status == 200 ) {
      getCheck(req.responseXML.documentElement);
    }
    else
      alert("There was a problem retrieving the XML data:\n" + req.statusText);
  }
}
function CheckField( _this, what_check, ret_img ) {
    var url = "studio_check.php?check=" + what_check + "&return=" + ret_img + "&value=" + encodeURI(_this.value);
    loadXMLDoc( "get", url );
}
function getCheck( xml ) {  var _return = xml.getElementsByTagName( "check" );
  var img = '';
  var _img = document.getElementById(_return[0].getAttribute("value"));
	if (_return[0].firstChild.data == '1'){		img = 'accept.gif';
	} else {		img = 'decline.gif';	}
	_img.src = 'images/' + img;

}