AjaxTW = {
  handleSuccess:function(o){this.processResult(o);},
  handleFailure:function(o){},
  processResult:function(o){
   	if (o.responseText) {
		document.getElementById('NothingFound').innerHTML = '';
		document.location = o.responseText;
	}
	else {
		document.getElementById('NothingFound').innerHTML ='Не откривам потребителя.';
	}
  },

  startRequest:function(searchQuery) {
    YAHOO.util.Connect.asyncRequest(
    'POST', '/ajax/findtwitter.php', callback5, "q="+searchQuery);
  }
};

var callback5 =
{
  success:AjaxTW.handleSuccess,
  failure:AjaxTW.handleFailure,
  scope: AjaxTW,
  cache: false
};

function TwitterSearch() {
  searchQuery = document.getElementById('tblsq2')['q'].value;
  if (searchQuery)  AjaxTW.startRequest(searchQuery);
}

function TwitterHighlight() {
SQAr = document.location.href.split('#');
if (SQAr.length && document.getElementById('twi'+SQAr[1])) {
        document.getElementById('twi'+SQAr[1]).style.backgroundColor = '#FFB0B0';
}
}
