try{
  xmlHttp = new XMLHttpRequest();
}
catch(e){
  xmlHttp = new ActiveXObject("MSXML2.XMLHTTP");
}
if (!xmlHttp) alert('Извините. Ваш браузер не поддерживает активное содержимое.')
function process(par1,par2){
  if (xmlHttp){
    try{
      var page = 'scripts/psysearch.php?param1='+par1+'&param2='+par2;
      xmlHttp.open('GET',page,true);
      xmlHttp.onreadystatechange = handleRequestStateChange;
      xmlHttp.send(null);
    }
    catch(e){
      //alert('Ошибка. Данные не отправлены');
    }
  }
  else alert('XmlHttpRequestObject отсутствует')
}
function handleRequestStateChange(){
  if (xmlHttp.readyState == 4){
    try{
      var response = xmlHttp.responseText;
      oSpan = document.getElementById('span_metro');
      oSpan.innerHTML = response;
    }
    catch(e){
      //alert('Ошибка обработки данных');
    }
  }
}
