var http = false;

if(navigator.appName == "Microsoft Internet Explorer") {
  http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
  http = new XMLHttpRequest();
}

function getDetail(id_news) {
  http.abort();
  http.open("GET", "/librari/ajax/ajax_news.php?id_news=" +id_news, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
   		document.getElementById('news_depan').innerHTML = http.responseText; // Ini kalau untuk div
    }
  }
  http.send(null);
}
function trapError() {
	return true; // stop the yellow triangle
}
window.onerror = trapError;
