 function sendRequest (url,callback,postData)
  {
	  var req = createXMLHTTPObject ();
	  if (!req) return;
	  var method = (postData) ? "POST" : "GET";
	  req.open(method,url,true);
	  req.setRequestHeader ('User-Agent','XMLHTTP/1.0');
	  if (postData)
	   {
		   req.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded; charset=windows-1250;");
    }
  	req.onreadystatechange = function ()
    {
	   	if (req.readyState != 4) return;
		   if (req.statusText != "OK")	return;
		   callback(req);
  	 }
  	if (req.readyState == 4) return;
	   req.send(postData);
  }

  function XMLHttpFactories ()
   {
	   return [function () {return new XMLHttpRequest()},
		          function () {return new ActiveXObject("Msxml2.XMLHTTP")},
		          function () {return new ActiveXObject("Msxml3.XMLHTTP")},
		          function () {return new ActiveXObject("Microsoft.XMLHTTP")}
	          ];
  }

 function createXMLHTTPObject ()
  {
	  var xmlhttp = false;
	  var factories = XMLHttpFactories();
	  for (var i=0;i<factories.length;i++)
    {
		   try
      {
			    xmlhttp = factories[i]();
		    }
		   catch (e)
		    {
			    continue;
		    }
		   break;
	   }
	  return xmlhttp;
  }

 function stiahniInfo (input)
  {
   var postdata = "ajax=1&action=stiahniInfo&input_value=" + input;
                  
   sendRequest ("index.php", input_evaluation, postdata);
  }

 function input_evaluation (xmlHttp)
  {
   if (xmlHttp.responseText)
    document.getElementById ('return_stiahniInfo').innerHTML = xmlHttp.responseText;
  }

