if( typeof( __rssparser_js_included__ ) == "undefined" ) {
	__rssparser_js_included = true;

	function RssParser() {
		this.RssLinks = new Array();
		this.RssLinks["CNNMoney"]  = "http://rss.cnn.com/rss/money_mostpopular.rss";
		this.RssLinks["Expediter"] = "http://www.expeditersystems.com/arianew/class/xml.php";

		this.getRss = function( url ) {
			var rssObj = new Object();
			rssObj.item = new Array();
			var node = WebUtil.execXml( url );
			var channel = node.getElementsByTagName("channel");
			var item    = channel.getElementsByTagName("item");
		
			for( var i=0; i<channel[0].childNodes.length; i++ ) {
				var nName = channel[0].childNodes[i].attributes[0].nodeValue;
				var nVal  = channel[0].childNodes[0].childNodes[0].nodeValue;
				if(nName.match("title") != null) rssObj.title = nVal;
				else if(nName.match("link") != null) rssObj.link = nVal;
				else if(nName.match("description") != null) rssObj.description = nVal;
				else if(nName.match("language") != null) rssObj.language = nVal;
				else if(nName.match("copyright") != null) rssObj.copyright = nVal;
				else if(nName.match("managingEditor") != null) rssObj.managingEditor = nVal;
				else if(nName.match("webMaster") != null) rssObj.webMaster = nVal;
				else if(nName.match("pubDate") != null) rssObj.pubDate = nVal;
				else if(nName.match("lastBuildDate") != null) rssObj.lastBuildDate = nVal;
				else if(nName.match("category") != null) rssObj.category = nVal;
				else if(nName.match("generator") != null) rssObj.generator = nVal;
				else if(nName.match("docs") != null) rssObj.docs = nVal;
				else if(nName.match("cloud") != null) rssObj.cloud = nVal;
				else if(nName.match("ttl") != null) rssObj.ttl = nVal;
				else if(nName.match("image") != null) rssObj.image = nVal;
				else if(nName.match("rating") != null) rssObj.rating = nVal;
				else if(nName.match("textInput") != null) rssObj.textInput = nVal;
				else if(nName.match("skipHours") != null) rssObj.skipHours = nVal;
				else if(nName.match("skipDays") != null) rssObj.skipDays = nVal;
				else break;
			}
		}

		this.show = function( usrRss ) {
			var vm = document.getElementById("displayArea");
			var o = this.getRss( this.RssLinks[usrRss] );
			var str = "";
			str += "Title: <a href='"+o.link+"'>" + o.title + "</a><br />";
			str += "Description: " + o.description +"<br />";
			str += "Copyright: " + o.coyright+"<br />";
			str += "Publish Date: " + o.pubDate + "<br />";
			
			if(vm) vm.innerHTML = str;
		}
	}
	RssParser = new RssParser();
}

