myCallback = function(url,box){
	this.http = new JKL.ParseXML( url );
	this.data = http.parse();
	this.items = data.rss.channel.item;
	if (typeof(this.items)=="object"&&typeof(this.items[0])=="undefined") {
		this.items[0] = this.items;
	}
	var n=0;
        var week = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
	this.rtn = '<dl>';
	while( n<30 ) {
		if (typeof(this.items[n])=="undefined") {
			break;
		}
                this.formatDate = new Date(this.items[n].pubDate);
                this.formatDate_str =  this.formatDate.getFullYear() + '.' + this.formatDate.getMonth() + '.' + this.formatDate.getDate() + ' ' + week[this.formatDate.getDay()];
		if(this.items[n].link){
			this.rtn = this.rtn + '<dt>' + this.formatDate_str + '</dt><dd><a href="' + this.items[n].link + '" target="_blank">' + this.items[n].title + '</a></dd>';
		}
		n++
    }
        this.rtn = this.rtn + '</dl>';
	document.getElementById(box).innerHTML = this.rtn;
}

rssView = function(){
	myCallback('./topics.xml','news');
	myCallback('../staff/index.xml','staffblog');
}

function rssLoad(){
	rssView();
//*	timerID = setInterval(rssView,5000); *//
}
