// JavaScript Document
var xmlhttp

function loadXMLDoc(url)
{
// code for Mozilla, etc.
if (window.XMLHttpRequest)
  {
  xmlhttp=new XMLHttpRequest()
  xmlhttp.onreadystatechange=state_Change
  xmlhttp.open("GET",url,true)
  xmlhttp.send(null)
  }
// code for IE
else if (window.ActiveXObject)
  {
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
    if (xmlhttp)
    {
    xmlhttp.onreadystatechange=state_Change
    xmlhttp.open("GET",url,true)
    xmlhttp.send()
    }
  }
}

function state_Change()
{
// if xmlhttp shows "loaded"
if (xmlhttp.readyState==4)
  {
  // if "OK"
  if (xmlhttp.status==200)
  {
  //alert("XML data OK")
  var response = xmlhttp.responseXML.documentElement;
  x=response.getElementsByTagName("date");
  txt = "<p><strong>"
  //xx= x.getElementsByTagName("date")
  txt += x[0].firstChild.data + "</strong><br />" 
  
  x=response.getElementsByTagName("content");
  txt += x[0].firstChild.data + "</p>";
    //"Allen Yunqing Pan and two of his students, Jasmine Wong and Edwin Tang, were invited by Comcast TV for a special interview on Chinese guzheng. They performed &quot;High Mountain and Running River,&quot; &quot;Liuyang River,&quot; and &quot;Fisherman's Song&quot; respectively. </p>"

  document.getElementById('latestnews').innerHTML=txt;
  //document.getElementById('A2').innerHTML=xmlhttp.statusText
  //document.getElementById('A3').innerHTML=xmlhttp.responseText
  }
  else
  {
  //alert("Problem retrieving XML data:" + xmlhttp.statusText)
  }
  }
}
