function ajaxFunction(){
  var xmlHttp;
  try{
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
  }catch (e){
    // Internet Explorer
    try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  return xmlHttp;
}

var feedcount = 0;

function getFeed(title, feedurl){
  var feedcontainer = document.createElement("div");
  feedcontainer.setAttribute("class",'feedcontainer '+feedcount);
  feedcount++;

  if(false == true){
      feedcontainer.innerHTML = "<span class=\"rsstitle\">"+title+"</span>"+xmlHttp.responseText;
      document.getElementById("l_rsscontainer").appendChild(feedcontainer);
      return;
  }

  var xmlHttp = ajaxFunction();
  xmlHttp.onreadystatechange=function(){
    if(xmlHttp.readyState==4){
      feedcontainer.innerHTML = "<span class=\"rsstitle\">"+title+"</span>"+xmlHttp.responseText;
      document.getElementById("l_rsscontainer").appendChild(feedcontainer);
    }
  }
  xmlHttp.open("GET","typo3conf/ext/tw_rssfeeds/pi1/getfeed.php?feedurl="+feedurl,true);
  xmlHttp.send(null);
}

function switchFeed(){
}

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+="sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp("sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
