/* Javascript File for Goldsmith Computer Services */

var xmlHttp;
var scripturl = "/cgi-bin/rss.pl";
// Ajax Stuff

function getfeed() {
//initBrowser(); // load up any other page elements before calling ajax routine
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)  // browser does not support AJAX
  {
  alert ("Your browser does not support AJAX!"); // let them know!
  return;
  }
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",scripturl,true);
xmlHttp.send(null);
}


function GetXmlHttpObject()
{
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;
}


function stateChanged()
{
if (xmlHttp.readyState==4) // when request has completed
  { 
  document.getElementById("newsbox").innerHTML =  xmlHttp.responseText; //return the repsonse to the browser
  }
//xmlHttp = null;
return;
}


