var org = {p3k: ({url:"http://www.fifa.com/rss/index.xml", xml:"<?xml version=\"1.0\" encoding=\"UTF-8\" ?><rss version=\"2.0\"><channel><title><![CDATA[FIFA.com - Latest News]]></title><link>http://www.fifa.com/index.html</link><description><![CDATA[Breaking football news from around the world from FIFA.com. Tags: football news, soccer news, world cup, fifa world cup, fifa, soccer, football, sport]]></description><language>en</language><copyright>Copyright \xa91994 - 2010 FIFA. All rights reserved</copyright><pubDate>Thu, 02 Sep 2010 14:01:00 GMT</pubDate><lastBuildDate>Thu, 02 Sep 2010 14:01:49 GMT</lastBuildDate><category>FIFA.com</category><image><title>FIFA.com</title><url>http://www.fifa.com/imgml/rssheader.gif\n\t\t\t</url><link>http://www.fifa.com/index.html</link><width>139</width><height>28</height><description>FIFA.com RSS</description></image><item><title><![CDATA[Mourinho: Milan can rule Europe]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293486.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Jose Mourinho has labelled Robinho and Zlatan Ibrahimovic among the world\u2019s best players and AC Milan as contenders to win the UEFA Champions League, and also discussed his feelings for Inter Milan.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/28/66/16/1286616%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 12:35:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Movement aplenty as transfer window shuts]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293146.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>With the transfer window now shut,<strong> FIFA.com</strong> takes a look at the high-profile performers able to secure switches before yesterday's deadline elapsed.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/tournament/competition/01/26/57/61/1265761%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 10:18:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Prandelli: We can't wait to get started]]></title><link>http://www.fifa.com/worldfootball/news/newsid=1293497.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Cesare Prandelli has revealed his Italy players are both nervous and excited ahead of their UEFA EURO 2012 qualifier against Estonia, and discussed the way to bring the best out of Antonio Cassano.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/nationalteams/01/29/34/98/1293498%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 13:33:00 GMT</pubDate><category>Area=World Football</category><category>Section=National Teams</category><category>Kind=News</category></item><item><title><![CDATA[Huntelaar relishing Raul partnership]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293494.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Klaas-Jan Huntelaar believes he and Schalke team-mate Raul can form the most lethal strike partnership in the Bundesliga. The Dutchman has also revealed his desire to score in the <em>Revierderby</em>.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/tournament/competition/01/25/76/75/1257675%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 12:58:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Villa eyes record as Spain begin defence]]></title><link>http://www.fifa.com/worldfootball/news/newsid=1293298.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>World champions Spain play their first competitive match since lifting football's ultimate prize when they face\xa0Liechtenstein on Friday in their opening UEFA EURO 2012 qualifier.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/tournament/competition/01/26/40/31/1264031%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 03:02:00 GMT</pubDate><category>Area=World Football</category><category>Section=National Teams</category><category>Kind=News</category></item><item><title><![CDATA[Juve still keen on Dzeko]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293425.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Juventus have confirmed they will try again next year to sign Edin Dzeko having failed to acquire the Bosnian striker this summer.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/27/83/92/1278392%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 10:47:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Loach replaces Carson for England ]]></title><link>http://www.fifa.com/worldfootball/news/newsid=1293440.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Goalkeeper Scott Carson has been released from the England squad to play against Bulgaria following a family bereavement.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/29/34/39/1293439%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 11:06:00 GMT</pubDate><category>Area=World Football</category><category>Section=National Teams</category><category>Kind=News</category></item><item><title><![CDATA[Dipsy's delight at Botswana's beginning]]></title><link>http://www.fifa.com/worldfootball/news/newsid=1293124.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>After a fantastic start to the qualifying campaign for Equatorial Guinea/Gabon 2012, Diphetogo \u2018Dipsy\u2019 Selolwane speaks to <strong>FIFA.com</strong> about his feelings on Botswana topping the early Group K table.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/nationalteams/01/29/33/33/1293333%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 04:52:00 GMT</pubDate><category>Area=World Football</category><category>Section=National Teams</category><category>Kind=News</category></item><item><title><![CDATA[Klose: We must look to the future]]></title><link>http://www.fifa.com/worldfootball/news/newsid=1293528.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Germany must forget about a memorable FIFA World Cup campaign and focus on qualifying for UEFA EURO 2012 according to Miroslav Klose, who has played down the tension over their captain\u2019s armband.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/tournament/competition/01/26/43/80/1264380%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 14:01:00 GMT</pubDate><category>Area=World Football</category><category>Section=National Teams</category><category>Kind=News</category></item><item><title><![CDATA[Al Wahda sack Boloni]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293442.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Al Wahda, who will participate in December's FIFA Club World Cup, have dismissed coach Laszlo Boloni following a disappointing start to the season.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/general/trdv291474%5f41062%5fsq%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 11:14:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Hildebrand signs for Sporting]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293437.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Timo Hildebrand, the former Germany goalkeeper who had been a free agent since his contract with Hoffenheim ended following the 2009/10 season, has joined Lisbon giants Sporting.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/19/15/33/1191533%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 11:02:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Al Ahli swoop for Eller]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293433.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Qatari side Al Ahli have announced the signing of Brazilian defender Fabiano Eller.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/05/20/34/1052034%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 10:59:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[No place like Rome for Borriello]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293427.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Experienced striker Marco Boriello has discussed joining Roma on loan and the reception he was given at his presentation as a <em>Giallorossi </em>player.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/tournament/competition/01/21/80/69/1218069%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 10:53:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Gold Coast sign Socceroo striker Djite]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293354.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Australian A-League club Gold Coast United have signed Socceroo\xa0striker Bruce Djite as a replacement for last season's\xa0leading goalscorer Shane Smeltz.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/tournament/competition/87/49/64/874964%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 08:03:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Guarani make Sudamericana progress]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293345.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Paraguayan side Guarani made it into the Copa Sudamericana second stage despite a 4-2 defeat at Uruguay's River Plate, while Colombia's Huila also progressed.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/29/33/46/1293346%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 07:52:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Fluminense thwarted by Palmeiras]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293343.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Leaders Fluminense have been held at home\xa0as Palmeiras grabbed\xa0a last-gasp\xa0equaliser, while\xa0Botafogo moved third thanks to a\xa01-0 triumph at Gremio.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/29/33/40/1293340%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 07:26:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Blanc's France renaissance hindered]]></title><link>http://www.fifa.com/worldfootball/news/newsid=1293308.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Laurent Blanc's plans to use France's opening UEFA EURO 2012 qualifier against\xa0Belarus on Friday as a launch-pad for the rebirth of the national side have been hit by bans and injuries to key players.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/nationalteams/01/28/69/01/1286901%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 03:35:00 GMT</pubDate><category>Area=World Football</category><category>Section=National Teams</category><category>Kind=News</category></item><item><title><![CDATA[Capello looks to silence critics]]></title><link>http://www.fifa.com/worldfootball/news/newsid=1293303.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Fabio Capello launches his quest for redemption on Friday knowing only a convincing victory by a makeshift England team over Bulgaria can silence a growing band of critics.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/nationalteams/01/29/26/53/1292653%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 03:23:00 GMT</pubDate><category>Area=World Football</category><category>Section=National Teams</category><category>Kind=News</category></item><item><title><![CDATA[Wahda off the mark]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293296.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>UAE League champions Al Wahda registered their first win of the\xa0season following a 3-1 victory against newcomers Ittihad Kalba, while 2009 winners Al Ahli also had\xa0their first triumph.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/21/43/29/1214329%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 02:45:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Van Bommel named Oranje captain]]></title><link>http://www.fifa.com/worldfootball/news/newsid=1293274.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Bert van Marwijk has named his son-in-law Mark van Bommel as the new Netherlands captain with the Bayern Munich man succeeding Giovanni van Bronckhorst.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/tournament/competition/01/26/68/89/1266889%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 01:03:00 GMT</pubDate><category>Area=World Football</category><category>Section=National Teams</category><category>Kind=News</category></item><item><title><![CDATA[Rio ready to return]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293271.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Manchester United defender Rio Ferdinand is set to return from the knee injury that wrecked his 2010 FIFA World Cup&trade; after emerging unscathed from a reserve team outing.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/19/17/19/1191719%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 00:55:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Ibrahimovic labels Guardiola 'small-time coach']]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293261.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Former Barcelona striker Zlatan Ibrahimovic\xa0has taken another swipe at Pep Guardiola saying the coach\xa0of the\xa0La Liga champions\xa0is a \"small-time coach\".</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/29/01/11/1290111%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Thu, 02 Sep 2010 00:42:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Van der Vaart happy to earn his Spurs]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293204.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Netherlands midfielder Rafael van der Vaart is\xa0in as much of a daze as Tottenham Hotspur fans after his whirlwind move to London on a four-year deal from Real Madrid was given the go-ahead by the Premier League.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/tournament/competition/01/26/95/65/1269565%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 18:38:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Hargreaves included in United squad]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293198.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Manchester United midfielder Owen Hargreaves has been included in Sir Alex Ferguson's 25-man Premier League squad despite his continuing injury woes.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/18/31/20/1183120%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 18:17:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Bruma pens new Chelsea deal]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293196.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Chelsea youngster Jeffery Bruma has today signed a new contract, tying him to the Premier League champions until 2014.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/28/87/84/1288784%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 18:11:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Hleb persuaded by Blues' desire]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293185.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Alexander Hleb claims he turned down offers from Tottenham, Liverpool and Benfica this summer, saying it was Birmingham City's greater desire to secure his services that sealed his move to St Andrews.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/19/10/32/1191032%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 17:41:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Busquets: Spain must start again]]></title><link>http://www.fifa.com/worldfootball/news/newsid=1293180.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Spain midfielder Sergio Busquets is adamant the team must not look beyond Friday's UEFA EURO 2012 qualifier against Liechtenstein.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/tournament/competition/01/27/00/13/1270013%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 17:17:00 GMT</pubDate><category>Area=World Football</category><category>Section=National Teams</category><category>Kind=News</category></item><item><title><![CDATA[Hammers complete Jacobsen signing]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293176.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>West Ham United have completed the signing of Denmark right-back Lars Jacobsen from Blackburn Rovers after the Premier League approved the deal.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/09/58/52/1095852%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 17:08:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Seongnam go top but Seoul shine]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293168.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Seongnam Ilhwa Chunma went top of the K-League following a goalless draw at home to Suwon Bluewings but the headlines belonged to FC Seoul.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/11/43/00/1114300%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 16:55:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Gudjohnsen signs permanent deal]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293152.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Stoke's transfer deadline day coup of landing Eidur Gudjohnsen from Monaco became even bigger today after they converted his loan move into a permanent one-year deal.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/15/54/79/1155479%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 16:09:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Spurs complete Van der Vaart deal]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293149.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Tottenham Hotspur have today confirmed the &pound;8m signing of Rafael van der Vaart from Real Madrid after the Premier League gave them the green light to add the Netherlands midfielder to their squad.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/18/48/40/1184840%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 16:03:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Yobo seals Fenerbahce switch]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293143.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Everton defender Joseph Yobo has completed his move to Turkish side Fenerbahce on a season-long loan.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/89/06/40/890640%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 15:51:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Barcelona confirm Puyol problem]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293141.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Barcelona have confirmed captain Carles Puyol has suffered an injury to his left calf.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/tournament/competition/01/27/06/30/1270630%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 15:49:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Lazzaretti joins UAE's Al Sharjah]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293123.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Al Sharjah have signed Brazilian defender Gustavo Lazzaretti on a one-year loan from Atletico Paranaense.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/28/87/84/1288784%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 15:08:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Crouch out of England double-header]]></title><link>http://www.fifa.com/worldfootball/news/newsid=1293118.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Peter Crouch will miss England's UEFA EURO 2012 qualifiers against Bulgaria and Switzerland due to a back injury.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/tournament/competition/01/24/55/59/1245559%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 15:03:00 GMT</pubDate><category>Area=World Football</category><category>Section=National Teams</category><category>Kind=News</category></item><item><title><![CDATA[Malesani assumes Bologna reins]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293089.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Bologna have installed Alberto Malesani into their hot-seat after sacking Franco Colomba on the eve of their 2010/11 Serie A bow, which resulted in a goalless draw with Inter Milan.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/13/90/12/1139012%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 13:22:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Low: Ballack will remain captain]]></title><link>http://www.fifa.com/worldfootball/news/newsid=1293062.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Michael Ballack will remain as Germany\u2019s first-choice captain, despite Philipp Lahm coveting the armband on a permanent basis. Joachim Low has also confirmed that Manuel Neuer will retain the No1 jersey.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/nationalteams/01/28/91/87/1289187%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 12:58:00 GMT</pubDate><category>Area=World Football</category><category>Section=National Teams</category><category>Kind=News</category></item><item><title><![CDATA[A helping hand for Pakistan]]></title><link>http://www.fifa.com/aboutfifa/federation/insidefifa/news/newsid=1293106.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>The President of the Pakistan FA has met with the FIFA President to discuss the floods that have hit the country and seek help from the football family.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/affederation/insidefifa/01/29/26/90/1292690%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 12:51:00 GMT</pubDate><category>Area=Organisation</category><category>Section=InsideFIFA</category><category>Kind=News</category></item><item><title><![CDATA[Belgium\u2019s babes primed for action]]></title><link>http://www.fifa.com/worldfootball/news/newsid=1293155.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Heading into the UEFA EURO 2012 qualifying competition as outsiders, Belgium are hoping their exciting crop of youngsters can make an instant impact on the international scene.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/nationalteams/01/29/30/09/1293009%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 12:38:00 GMT</pubDate><category>Area=World Football</category><category>Section=National Teams</category><category>Kind=News</category></item><item><title><![CDATA[Mourinho: I'm not Harry Potter]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293041.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Jose Mourinho has insisted he can not mastermind success overnight, downplayed the significance of Real Madrid dropping points in his first game, and discussed communication problems with his German signings.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/28/24/29/1282429%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 12:31:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Racing Santander loan Werder's Rosenberg]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293025.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Werder Bremen have sent Swedish striker Markus Rosenberg, whose goal put the German side into this season's UEFA\xa0Champions League, on loan for the season to Spain's Racing Santander.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/28/94/10/1289410%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 11:13:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Malaga sign Rosenborg's Stadsgaard]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293019.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>La Liga\xa0outfit Malaga have signed Danish international defender Kris Stadsgaard from Norwegian club Rosenborg.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/29/01/22/1290122%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 11:05:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Bertos: We want to emulate Australia]]></title><link>http://www.fifa.com/worldfootball/news/newsid=1292953.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p><strong>FIFA.com</strong> spoke to Leo Bertos about the impact of New Zealand\u2019s success in South Africa and their hopes of qualifying for back-to-back FIFA World Cups, along with the progress of Wellington Phoenix.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/tournament/competition/01/24/57/52/1245752%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 10:37:00 GMT</pubDate><category>Area=World Football</category><category>Section=National Teams</category><category>Kind=News</category></item><item><title><![CDATA[Werder sign Northern Ireland's Boyce]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293003.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Northern Ireland U-21 star Liam Boyce has joined German outfit Werder Bremen on a two-year-deal.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/28/96/51/1289651%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 10:29:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Misimovic moves to Galatasary]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1293000.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Wolfsburg have sold playmaker Zvjezdan Misimovic to Turkish side Galatasaray Istanbul, the Bundesliga club have announced.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/18/28/63/1182863%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 10:21:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Ward joins Phoenix]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1292962.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Nick Ward has ended his two-and-a-half year stint with Melbourne Victory after the 25-year-old joined Wellington Phoenix.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/29/29/52/1292952%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 09:12:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Brigger: A fine line between joy and despair]]></title><link>http://www.fifa.com/newscentre/news/newsid=1293018.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>FIFA.com asked TSG director Jean-Paul Brigger about the 2010 FIFA World Cup and the latest trends in football tactics.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/tournament/technicalstudygroup/01/23/28/62/1232862%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 08:09:00 GMT</pubDate><category>Area=Tournament</category><category>Section=Competition</category><category>Kind=News</category></item><item><title><![CDATA[Rakitic: Expectations are huge]]></title><link>http://www.fifa.com/worldfootball/news/newsid=1293023.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Ivan Rakitic spoke to <strong>FIFA.com</strong> about Croatia\u2019s need to address the mistakes they made in South Africa 2010 qualifying, their bid to reach UEFA EURO 2012 and his belief they can be contenders at major tournaments.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/nationalteams/01/29/20/40/1292040%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 07:54:00 GMT</pubDate><category>Area=World Football</category><category>Section=National Teams</category><category>Kind=News</category></item><item><title><![CDATA[Silverware, sadness and sweet relief]]></title><link>http://www.fifa.com/worldfootball/statisticsandrecords/news/newsid=1292727.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Early-season free-scoring in the Bundesliga and Fluminense\u2019s invincibility feature in this week\u2019s statistical review, along with Atletico Madrid\u2019s latest triumph and Wayne Rooney ending a long drought.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/29/16/06/1291606%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 06:13:00 GMT</pubDate><category>Area=World Football</category><category>Section=Statistics</category><category>Kind=News</category></item><item><title><![CDATA[Oriente map path to second round]]></title><link>http://www.fifa.com/worldfootball/clubfootball/news/newsid=1292919.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p>Oriente Petrolero of Bolivia have eliminated Universidad de Chile to reach the\xa0Copa Sudamericana second stage, while Penarol claimed a first-leg win\xa0at Ecuadorian side Barcelona.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/worldfootball/clubfootball/01/29/29/17/1292917%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 06:09:00 GMT</pubDate><category>Area=World Football</category><category>Section=Club Football</category><category>Kind=News</category></item><item><title><![CDATA[Ayew: Africa will be taken seriously]]></title><link>http://www.fifa.com/worldfootball/news/newsid=1292455.html?cid=rssfeed&amp;att=</link><description><![CDATA[<p><strong>FIFA.com</strong> chatted to Andre Ayew about comparisons with his famous father, Ghana\u2019s South Africa 2010 campaign and their upcoming quest to qualify for the CAF Africa Cup of Nations.</p>]]></description><enclosure length=\"150\" url=\"http://www.fifa.com/mm/photo/tournament/competition/01/24/46/08/1244608%5fsmall.jpg\" type=\"image/jpeg\" /><pubDate>Wed, 01 Sep 2010 05:32:00 GMT</pubDate><category>Area=World Football</category><category>Section=National Teams</category><category>Kind=News</category></item></channel></rss>\n", message:undefined, modified:(new Date(1283438510132)), baseUri:"http://p3k.org/rss/", query:"frameColor=black&textColor=black&_=1213991258812&titleBarColor=lightblue&compact=&fontFace=&align=left&showXmlButton=&maxItems=5&boxFillColor=white&undefined=&titleBarTextColor=black&width=650&url=http://www.fifa.com/rss/index.xml&", param:{textColor:"black", width:"650", align:"left", fontFace:"", url:"http://www.fifa.com/rss/index.xml", compact:"", frameColor:"black", showXmlButton:"", undefined:"", boxFillColor:"white", _:"1213991258812", titleBarColor:"lightblue", maxItems:"5", titleBarTextColor:"black"}, box:"<table class=\"rssBox\" width=\"${width}\" bgcolor=\"${frameColor}\" \n      style=\"table-layout: fixed; overflow: hidden; font-family: ${fontFace};\" \n      align=\"${align}\" cellspacing=\"1\" cellpadding=\"7\" border=\"0\">\n<tr bgcolor=\"${titleBarColor}\">\n<td>\n   ${xmlButton}\n   <strong>${title}</strong>\n   <div>\n      <small style=\"color: ${titleBarTextColor};\">${date}</small>\n   </div>\n</td>\n</tr>\n<tr bgcolor=\"${boxFillColor}\">\n<td class=\"rssBoxContent\" style=\"color: ${textColor};\">\n   ${image}\n   ${items}\n   ${input}\n   <div class=\"rssBoxPromo\" style=\"margin-top: 0px; text-align: left; \n         font: 9px verdana, sans-serif\">\n      RSS box by <a href=\"http://p3k.org/rss\">p3k.org</a>.\n   </div>\n</td>\n</tr>\n</table>\n\n", image:"<a href=\"${link}\"><img src=\"${source}\" width=\"${width}\" height=\"${height}\" \nalt=\"${title}\" title=\"${title}\" align=\"${align}\" valign=\"${valign}\" \nhspace=\"${hspace}\" vspace=\"${vspace}\" border=\"0\" /></a>\n\n", input:"<form method=\"get\" action=\"${link}\">\n${description}\n<input type=\"text\" name=\"${name}\" size=\"15\" /> <input type=\"submit\" \nvalue=\"${title}\" />\n</form>\n\n", item:"<div class=\"rssBoxItemContent\">\n${title}\n${break}\n${description}\n${buttons}\n</div><br />\n\n", date:"${year}-${month}-${day}, ${hours}:${minutes}h\n\n", link:"<a class=\"${class}\" href=\"${link}\" style=\"${style}\">${text}</a>\n", error:"<?xml version=\"1.0\"?>\n<rss version=\"error\">\n   <channel>\n      <title>RSS Box Error</title>\n      <link>${link}</link>\n      <description>This output was automatically generated to report an error \n      that occurred during a request to the JavaScript RSS Box Viewer.</description>\n      <item>\n         <title>Oops, something went wrong...</title>\n         <description>An error occurred while processing the request to the \n         JavaScript RSS Box Viewer.</description>\n      </item>\n      <item>\n         <title>An error message was returned by the server.</title>\n         <description>${message}</description>\n      </item>\n      <item>\n         <description>Most likely, this might have happened because of a \n         non-existent or invalid RSS feed URL. Please check and possibly correct \n         your input, then try again.</description>\n      </item>\n   </channel>\n</rss>\n\n"})};
function debug(str) {
   return document.write('<p><span style="background-color: yellow;">', 
         str, '</span><p>');
}

org.p3k.RssBox = function() {
   var ref;
   var ISOPATTERN = /([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9:]+).*$/;
   
   var data = org.p3k;
   data.defaults = {
      url: "http://blog.p3k.org/rss",
      maxItems: 7,
      width: 200,
      align: "",
      frameColor: "black",
      titleBarColor: "lightblue",
      titleBarTextColor: "black",
      boxFillColor: "white",
      textColor: "black",
      showXmlButton: "",
      compact: ""
   };
   
   var baseUri = data.baseUri;
    
   var getColor = function(str) {
      if (str.length === 6 && parseInt(str, 16) && str.indexOf("#") !== 0) {
         str = "#" + str;
      }
      return str.toLowerCase();
   }

   var value;
   for (var i in data.defaults) {
      value = data.param[i];
      if (!value || value.length === 0) {
         data.param[i] = data.defaults[i];
      } else if (i.indexOf("Color") > 0) {
         data.param[i] = getColor(value);
      }
   }

   // FIXME: Ugly work-around for many boxes using too small width 
   // values because the former version did not show the exact output.
   if (data.param.javascript && data.param.width < 200) {
      data.param.width = 200;
   }
   // Remove obsolete parameters from param and query
   delete data.param.javascript;
   data.query = data.query.replace("javascript=true", "");   

   var NAMESPACES = {
      dc: "http://purl.org/dc/elements/1.1/",
      rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   };

   var getUrl = function(url) {
      url = baseUri + "proxy.r?" + encodeURIComponent(url);
   
      var HttpRequest = function() {
         return (typeof XMLHttpRequest !== "undefined") ?
            new XMLHttpRequest() : new ActiveXObject("Msxml2.XMLHTTP");
      }
   
      var request = new HttpRequest();
      request.open("GET", url, false);
      request.send(null);   
      if (!request.getResponseHeader("Date")) {
         var cached = request;
         var ifModifiedSince = cached.getResponseHeader("Last-Modified") || 
               new Date(0); // January 1, 1970
         request = new HttpRequest();
         request.open("GET", url, false);
         request.setRequestHeader("If-Modified-Since", ifModifiedSince);
         request.send("");
         if (request.status === 304) {
            request = cached; 
         }
      }
      return request;
   }
   
   var getDocument = function(source) {
      if (source) {
         if (document.implementation.createDocument) {
            var parser = new DOMParser();
            var doc = parser.parseFromString(source, "text/xml");
            return doc;
         } else if (window.ActiveXObject) {
            var doc = new ActiveXObject("Microsoft.XMLDOM");
            doc.async = "false";
            doc.loadXML(source);
            return doc;
         }
      }
      return null;
   }
   
   var getError = function() {
      var msg = null, root;
      if (!xml || data.message) {
         msg = data.message || "Unknown error.";
      } else if (xml.parseError && xml.parseError.errorCode) {
         msg = xml.parseError.reason; // IExplore
      } else if (root = xml.documentElement) {
         var errorNode;
         if (root.nodeName === "parsererror") {
            msg = xml.documentElement.textContent; // Mozilla
         } else if ((errorNode = root.childNodes[0]) && 
               errorNode.nodeName === "parsererror") {
            msg = errorNode.textContent; // Safari
         } else if (!/rss|rdf|scriptingNews/i.test(xml.documentElement.nodeName)) {
            msg = "Incompatible data format. Are you sure this is an RSS feed?";
         }
      }
      return msg;
   }
   
   var getNode = function(parent, name, namespace) {
      if (namespace) {
         if (typeof parent.getElementsByTagNameNS === "undefined") {
            var elements = parent.getElementsByTagName(namespace + ":" + name);
         } else {
            var elements = parent.getElementsByTagNameNS(NAMESPACES[namespace], name);
         }
      } else {
         var elements = parent.getElementsByTagName(name);
      }
      if (elements && elements[0]) {
         return elements[0];
      }
      return null;
   }
   
   var getText = function(node) {
      if (node && node.childNodes && node.childNodes.length > 0) {
         return node.childNodes[0].nodeValue || "";
      }
      return "";
   }
   
   var trim = function(str) {
      if (str) {
         return str.replace(/^\s*(\S*)\s*$/, "$1");
      }
      return "";
   }
   
   var padZero = function(n) {
      if (n < 10) {
         return "0" + n
      }
      return n;
   }

   var encodeXml = function(str) {
      if (!str) {
         return "";
      }
      return str.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/&/g, "&amp;");
   }
      
   var render = function(template, param) {
      if (!template || !param) {
         return template;
      }
      template = template.replace(/\$\{([^}]+)\}/g, function() {
         var key = arguments[1];
         return param[key] || "";
      });
      return template;
   }
   
   var renderDate = function(date) {
      if (date.constructor !== Date) {
         var str = String(date);
         var millis = Date.parse(str.replace(ISOPATTERN, "$1/$2/$3 $4"));
         if (millis) {
            date = new Date(millis);
         } else {
            date = new Date;
         }
      }

      return render(data.date, {
         year: date.getFullYear(),
         month: padZero(date.getMonth() + 1),
         day: padZero(date.getDate()),
         hours: padZero(date.getHours()),
         minutes: padZero(date.getMinutes()),
         seconds: padZero(date.getSeconds()),
         timeZone: "" // date.getTimezoneOffset()
      });
   }
   
   var renderButtons = function(enclosure, source) {
      var result = "";
      if (enclosure && enclosure.link) {
         result += render(data.image, {
            source: baseUri + "enclosure.gif",
            title: enclosure.type,
            link: encodeURI(enclosure.link),
            width: 13,
            height: 16
         });
      }
      if (source && source.link) {
         result += render(data.image, {
            source: baseUri + "source.gif",
            title: source.title,
            link: encodeURI(source.link),
            width: 15,
            height: 15
         });
      }
      return result;         
   }
   
   var param = data.param;
   var rss = data.rss = {items: []};
   var xml = getDocument(data.xml);

   rss.error = getError();
   if (rss.error !== null) {
      xml = getDocument(render(data.error, {
         link: baseUri + "?" + encodeXml(data.query),
         message: encodeXml(rss.error)
      }));
      param.compact = 0;
      param.showXmlButton = 1;
   }

   var root = xml.documentElement;
   var type = root.nodeName;

   if (type === "scriptingNews") {
      var channel = getNode(xml, "header");
      rss.format = "Scripting News";
      rss.version = getText(getNode(channel, "scriptingNewsVersion"));
      rss.title = getText(getNode(channel, "channelTitle"));
      rss.description = getText(getNode(channel, "channelDescription"));
      rss.link = getText(getNode(channel, "channelLink"));
      if (ref = getText(getNode(channel, "imageUrl"))) {
         ref = rss.image = {source: ref};
         ref.title = getText(getNode(channel, "imageTitle"));
         ref.link = getText(getNode(channel, "imageLink"));
         ref.width = getText(getNode(channel, "imageWidth"));
         ref.height = getText(getNode(channel, "imageHeight"));
         ref.description = getText(getNode(channel, "imageCaption"));
      }
   } else {
      var channel = getNode(xml, "channel");
      rss.format = "RSS";
      rss.version = (type === "rdf:RDF") ? "1.0" : 
            root.getAttribute("version");
      rss.title = getText(getNode(channel, "title"));
      rss.description = getText(getNode(channel, "description"));
      rss.link = getText(getNode(channel, "link"));
      var image = getNode(xml, "image");
      if (image) {
         ref = rss.image = {};
         ref.source = getText(getNode(image, "url"));
         ref.title = getText(getNode(image, "title"));
         ref.link = getText(getNode(image, "link"));
         ref.width = getText(getNode(image, "width"));
         ref.height = getText(getNode(image, "height"));
         ref.description = getText(getNode(image, "description"));
      }
   }
   
   if (type === "rdf:RDF") {
      rss.date = renderDate(getText(getNode(channel, "date", "dc")) || data.modified);
      rss.rights = getText(getNode(channel, "creator", "dc"));
      var input = getNode(root, "textinput");
      if (input && !getNode(input, "link")) {
         input = root.getElementsByTagName("textinput")[1];
      }
      if (input) {
         ref = rss.input = {};
         ref.link = getText(getNode(input, "link"));
         ref.description = getText(getNode(input, "description"));
         ref.name = getText(getNode(input, "name"));
         ref.title = getText(getNode(input, "title"));
      }
   } else {
      rss.date = renderDate(getText(getNode(channel, "lastBuildDate") || getText(getNode(channel, "pubDate"))) || data.modified);
      rss.rights = getText(getNode(channel, "copyright"));
   }
   
   var item, text, node;
   var items = xml.getElementsByTagName("item");

   for (var i=0; i<Math.min(items.length, param.maxItems); i+=1) {
      item = items[i];

      if (type === "scriptingNews") {
         ref = {title: ""};
         ref.description = getText(getNode(item, "text")).replace(/\n/g, " ");
         ref.link = getText(getNode(item, "link"));
         if (text = trim(getText(getNode(item, "linetext")).replace(/\n/g, " "))) {
            ref.description = ref.description.replace(new RegExp(text), 
                  '<a href="' + getText(getNode(item, "url")) + '">' + text + '</a>');
         }
      } else {
         ref = {
            title: getText(getNode(item, "title")),
            description: getText(getNode(item, "description")),
            link: getText(getNode(item, "link") || getNode(item, "guid"))
         };
     }

     if (node = getNode(item, "source")) {
        ref.source = {
           link: node.getAttribute("url"),
           title: getText(node)
        }
     }
     
     if (node = getNode(item, "enclosure")) {
        ref.enclosure = {
           link: node.getAttribute("url"),
           length: node.getAttribute("length"),
           type: node.getAttribute("type")
        }
     }
     
     if (node = getNode(item, "category")) {
        ref.category = {
           domain: node.getAttribute("domain") || "",
           content: getText(node)
        }
     }
     
     rss.items.push(ref);
   }
   
   var item, items = "";
   for (var i=0; i<rss.items.length; i+=1) {
      item = rss.items[i];
      items += render(data.item, {
         title: new function() {
            var title = (!param.compact ? "<strong>" : "");
            if (item.link) {
               title += render(data.link, {
                  link: encodeURI(item.link),
                  text: item.title,
                  'class': "rssBoxItemTitle"
               });
            } else {
               title += item.title;
            }
            !param.compact && (title += "</strong>");
            return new String(title); // FIXME: Funny, title alone will be rendered as [object]
         }(),
         'break': item.title && item.description ? "<br />" : "",
         description: (!param.compact || !item.title) && item.description,
         buttons: renderButtons(item.enclosure, item.source)
      });
   }
   
   var box = render(data.box, {
      title: rss.link ? render(data.link, {
         link: encodeURI(rss.link),
         text: rss.title,
         'class': "rssBoxTitle",
         style: "color: " + param.titleBarTextColor
      }) : rss.title,
      description: rss.description,
      items: items,

      xmlButton: param.showXmlButton && render(data.image, {
         link: param.url,
         source: baseUri + "rss.png",
         title: rss.format + " " + rss.version,
         width: 16,
         height: 16,
         align: "right",
         hspace: 3
      }),
      
      image: !param.compact && rss.image && render(data.image, {
         link: encodeURI(rss.image.link),
         source: rss.image.source,
         width: rss.image.width,
         height: rss.image.height,
         title: rss.image.title,
         align: "right",
         valign: "baseline",
         hspace: 5,
         vspace: 5
      }),
      
      input: !param.compact && rss.input && render(data.input, {
         link: encodeURI(rss.input.link),
         description: rss.input.description,
         name: rss.input.name,
         title: rss.input.title
      }),
      
      date: rss.date,
      width: param.width,
      frameColor: param.frameColor,
      fontFace: param.fontFace,
      align: param.align,
      titleBarColor: param.titleBarColor,
      titleBarTextColor: param.titleBarTextColor,
      boxFillColor: param.boxFillColor,
      textColor: param.textColor
   });

   if (!window.rssBoxSetup) {
      document.write(box);
   }
   
   return box;
};

org.p3k.RssBox();

