// JavaScript Document


 
function showRSS(str, strCategory,strPage)
 { 
 var xmlHttp;
 xmlHttp=GetXmlHttpObject();
 if (xmlHttp==null) {
  alert ("Browser does not support HTTP Request");
  return;
  }
 var url="/web/content/rss/getrss.php";
 if (strPage=="home") {
    url="/web/content/rss/getrss.php";
 } else {
    if (strPage=="News") {
      url="/web/content/rss/getnews.php";
    } else {
      url="/web/content/rss/getagenda.php";
    }
}
 
 url=url+"?q="+str;
 //add category
 url=url+"&c="+strCategory;
 xmlHttp.onreadystatechange= function(){
    // do the thing
    if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
  { 
    if (strCategory=="News") { 
      document.getElementById("rssOutputNews").innerHTML=xmlHttp.responseText;
    } else {
      document.getElementById("rssOutputAgenda").innerHTML=xmlHttp.responseText;
    }
    
    }
};
 xmlHttp.open("GET",url,true);
 xmlHttp.send(null);
 }

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;
}

