// JavaScript Document
var http = false;

if(navigator.appName == "Microsoft Internet Explorer") {
  http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
  http = new XMLHttpRequest();
} 

function removeFromHistory(word) {
  http.open("GET", "/empty_history.php?word="+word, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('h-'+word).innerHTML = "";
	  document.getElementById('hd-'+word).innerHTML = "";
    }
  }
  http.send(null);
}

function removeFromHistoryAll() {
  http.open("GET", "/empty_history.php", true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('history').innerHTML = "";
    }
  }
  http.send(null);
}







 
 