// JavaScript Document
var url = "newsdetail.php?id="; // The server-side script

function getnewsdetail(arg) {
  // display a quick message while the script is being processed
  //document.getElementById(arg2).innerHTML = 'Loading preview...';
  //var name = document.getElementById("email").value;
  document.getElementById('newscontent').innerHTML = "Loading news...";
  http.open("GET", url + escape(arg), true);
  http.onreadystatechange = handleHttpResponse;
  http.send(null);
}

function handleHttpResponse() {
  if (http.readyState == 4) {
    results = http.responseText;
    //var name = document.getElementById("email").value;
    //if(results == "") results = "Username <i>"+name+"</i> Is Available...";
    //the div in which the message appears
    document.getElementById('newscontent').innerHTML = results;
    document.getElementById('newscontent').style.height = "auto";
	
  }
}
function getHTTPObject() {
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}
var http = getHTTPObject(); // We create the HTTP Object
