var xmlHttp

toggle=0;

function comments_read()
{ 

xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="../UNI/comments_reader.asp";
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function stateChanged() { 
if (xmlHttp.readyState==4)
{ 

if (toggle==0) 
{
document.getElementById("Collapse").innerHTML="Collapse"; 
document.getElementById("txtComments").innerHTML=xmlHttp.responseText; 
toggle=1;

}
else if (toggle==1)
{
document.getElementById("Collapse").innerHTML="Click Me"; 
document.getElementById("txtComments").innerHTML="Please click the button to read all the comments."; 

toggle=0;}


}
}//end function


function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}