function getResults(link , string){
   var xhr;
   try{
   	 xhr = new XMLHttpRequest();
   }catch(error){
       try{
          xhr = new ActiveXObject('Microsoft.XMLHTTP');
       }catch (error){
          xhr = null;
       }
   }

   if (xhr != null) {
       xhr.open("GET" , link + "pages/ajax/hub-search.php?string=" + string , true);
       xhr.onreadystatechange = function (){
       	  if (xhr.readyState == 4) {
       	  	if (xhr.status == 200 || xhr.status == 304) {
			   returnResults(xhr.responseXML , link);
       	  	}else{

       	  	}
       	  }
       }
       xhr.send();
   	   return false;
   }
   return true;
}


/**
 *
 * @access public
 * @return void
 **/
function returnResults(response , link ){
	var hubs = response.getElementsByTagName("hub");
	var id;
	var name;
	var description;
	if (document.getElementById('results')) {
		document.getElementById('left-container-transparent').removeChild(document.getElementById('results'));
	}
	var table = document.createElement('table');
	table.id = 'results';
	var tr;
	var td;
	var text;
	var a;
	for (var i = 0; i < hubs.length; i++){
		id = hubs[i].childNodes[1].childNodes[0].nodeValue;
		name = hubs[i].childNodes[3].childNodes[0].nodeValue;
		description = hubs[i].childNodes[5].childNodes[0].nodeValue;
		text = document.createTextNode(name);
		a = document.createElement("a");
		a.href = link + 'hublist/' + id + '-' + name + '.html';
		td = document.createElement("td");
		tr = document.createElement("tr");
		a.appendChild(text);
		td.appendChild(a);
		tr.appendChild(td);
		table.appendChild(tr);
		text = document.createTextNode(description);
		td = document.createElement("td");
		tr = document.createElement("tr");
		td.appendChild(text);
		tr.appendChild(td);
		table.appendChild(tr);
	}
	document.getElementById('left-container-transparent').appendChild(table);
}