var org = {p3k: ({url:"http://www.patriots.com/rss/public/index.cfm?ac=rss&rssid=NQ==", xml:"<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n\t    <rss version=\"2.0\">\n\t        <channel>\n\t            <link>http://www.patriots.com</link>\n\t            <title>New England Patriots News Feed</title>\n\t            <description></description>\n\t            <language>en-us</language>\n\t\t\t\t<pubDate>Mon, 06 Sep 2010 02:03:01 GMT</pubDate>\n\t\t\t\t<lastBuildDate>Mon, 06 Sep 2010 02:03:01 GMT</lastBuildDate>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Patriots make two trades; Claim rookie OL Maneri;Release LB McKenzie</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44332&amp;pcid=47&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;The New England Patriots acquired S Jarrad Page in a trade with the Kansas City Chiefs for undisclosed draft considerations and LB Tracy White in a trade with the Philadelphia Eagles for undisclosed draft considerations.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Sun, 05 Sep 2010 20:00:00 GMT</pubDate>\n\t\t\t\t\t<category>News - Press Release</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44332&amp;pcid=47&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Pats make final cuts</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=generalnewsdetail&amp;pid=44327&amp;pcid=41&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;Derrick Burgess was among the Patriots final cuts as the team also made two minor trades to get down to the 53-man roster limit.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Sat, 04 Sep 2010 23:30:00 GMT</pubDate>\n\t\t\t\t\t<category>News - General</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=generalnewsdetail&amp;pid=44327&amp;pcid=41&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>PFW Blog: Analysis of final cuts, trades</title>\n\t\t\t\t\t<link>http://blog.pfwonline.com/?p=3554</link>\n\t\t\t\t\t<description>&lt;p&gt;More stunners - some milder than others - from Bill Belichick and his staff of coaches and scouts. And another blow to the already suffering Patriots defense, as final cuts were announced late today.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Sat, 04 Sep 2010 23:30:00 GMT</pubDate>\n\t\t\t\t\t<category>News - General</category>\n\t\t\t\t\t<guid>http://blog.pfwonline.com/?p=3554</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Patriots Release 20 Players; McGowan to IR</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44325&amp;pcid=47&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;The New England Patriots released 20 players today and placed S Brandon McGowan on injured reserve with a chest injury.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Sat, 04 Sep 2010 23:10:00 GMT</pubDate>\n\t\t\t\t\t<category>News - Press Release</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44325&amp;pcid=47&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Can Maroney remain &apos;one of the guys?&apos; Fri. Notes</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=generalnewsdetail&amp;pid=44322&amp;pcid=41&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;The Patriots running back discusses his status with New England. Plus, news and notes following the team&apos;s preseason finale.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Fri, 03 Sep 2010 21:00:00 GMT</pubDate>\n\t\t\t\t\t<category>News - General</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=generalnewsdetail&amp;pid=44322&amp;pcid=41&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Patriots waive two veteran players</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44320&amp;pcid=47&amp;rss=1</link>\n\t\t\t\t\t<description>In anticipation of tomorrow&apos;s NFL-mandatory cut to a 53-man roster, the New England Patriots announced that OL Eric Ghiaciuc and DL Damione Lewis have been released.</description>\n\t\t\t\t\t<pubDate>Fri, 03 Sep 2010 20:45:00 GMT</pubDate>\n\t\t\t\t\t<category>News - Press Release</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44320&amp;pcid=47&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Play Fantasy Forecast and Win Patriots Gear!</title>\n\t\t\t\t\t<link>http://www.facebook.com/newenglandpatriots?v=app_258060125202</link>\n\t\t\t\t\t<description>&lt;p&gt;The ultimate Patriots prediction game Fantasy Forecast is back and better than ever. Play every week during the regular season to win awesome Patriots merchandise and earn points towards the end-of-season Grand Prize -- a pair of 2011 Season Tickets!&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Fri, 03 Sep 2010 13:30:00 GMT</pubDate>\n\t\t\t\t\t<category>News - General</category>\n\t\t\t\t\t<guid>http://www.facebook.com/newenglandpatriots?v=app_258060125202</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Show your NFL spirit with Back to Football Friday</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=nfldetail&amp;pid=44317&amp;pcid=43&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;Schools nationwide are encouraged to show their NFL team pride on Friday, September 10 and submit 3 essays, each in 100 words or less, and 3-6 photos on NFLRUSH.com. The 34 winning schools will be named NFL PLAY 60 Super Schools and receive a visit from an NFL player and a $10,000 NFL PLAY 60 health and wellness grant.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Fri, 03 Sep 2010 13:00:00 GMT</pubDate>\n\t\t\t\t\t<category>News - NFL</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=nfldetail&amp;pid=44317&amp;pcid=43&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Patriots Postgame Quotes - 9/2/2010</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44313&amp;pcid=47&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;New England Patriots players comment on their 20-17 preseason loss to the New York Giants at New Meadowlands Stadium on Thursday, September 2, 2010.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Fri, 03 Sep 2010 03:59:00 GMT</pubDate>\n\t\t\t\t\t<category>News - Press Release</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44313&amp;pcid=47&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Giants Postgame Quotes - 9/2/2010</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44314&amp;pcid=47&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;New York Giants players comment on their 20-17 victory over the New England Patriots at New Meadowlands Stadium on Thursday, September 2, 2010.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Fri, 03 Sep 2010 03:55:00 GMT</pubDate>\n\t\t\t\t\t<category>News - Press Release</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44314&amp;pcid=47&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Analysis: Last chance to impress, improve</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=generalnewsdetail&amp;pid=44315&amp;pcid=41&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;Who helped and who hurt their chances of making the Patriots roster in the preseason finale.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Fri, 03 Sep 2010 03:00:00 GMT</pubDate>\n\t\t\t\t\t<category>News - General</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=generalnewsdetail&amp;pid=44315&amp;pcid=41&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Manning, Brady solid in finale tuneup</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=generalnewsdetail&amp;pid=44310&amp;pcid=41&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;Eli Manning and Tom Brady were solid in their final tuneups as the Giants rallied for a 20-17 victory over the New England Patriots on Thursday night.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Fri, 03 Sep 2010 02:15:00 GMT</pubDate>\n\t\t\t\t\t<category>News - General</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=generalnewsdetail&amp;pid=44310&amp;pcid=41&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Game Notes: Patriots at Giants</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44309&amp;pcid=47&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;New England closed the preseason with a 20-17 loss to the New York Giants at New Meadowlands Stadium on Thursday, September 2, 2010. The following are notes from the game.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Fri, 03 Sep 2010 02:10:00 GMT</pubDate>\n\t\t\t\t\t<category>News - Press Release</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44309&amp;pcid=47&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Wilfork quotes from Charitable Foundation Kickoff Gala</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44298&amp;pcid=47&amp;rss=1</link>\n\t\t\t\t\t<description>The Patriots Charitable Foundation held its annual Kickoff Gala in the Fidelity Investments Clubhouse at Gillette Stadium on Tuesday night. As part of the program, Robert Kraft presented the eighth annual Ron Burton Community Service Award to nose tackle Vince Wilfork for his charitable work. Wilfork gave an emotional acceptance speech to the 600 attendees.</description>\n\t\t\t\t\t<pubDate>Wed, 01 Sep 2010 17:00:00 GMT</pubDate>\n\t\t\t\t\t<category>News - Press Release</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44298&amp;pcid=47&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Wilfork receives Ron Burton Community Service Award</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44294&amp;pcid=47&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;Patriots nose tackle Vince Wilfork was recognized as the 2010 New England Patriots Ron Burton Community Service Award winner at the New England Patriots Charitable Foundation&apos;s Annual Kickoff Gala on Tuesday evening in the Fidelity Investments Clubhouse at Gillette Stadium.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Wed, 01 Sep 2010 00:30:00 GMT</pubDate>\n\t\t\t\t\t<category>News - Press Release</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44294&amp;pcid=47&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Patriots place four on IR; Release one</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44290&amp;pcid=47&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;The New England Patriots made a series of roster moves to get down to the NFL Mandatory 75-man limit today. The Patriots placed S Josh Barrett (shoulder), CB Leigh Bodden (shoulder), DB Brett Lockett (chest) and DL Darryl Richard (foot) on injured reserve and released DB Terrence Johnson.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Tue, 31 Aug 2010 23:00:00 GMT</pubDate>\n\t\t\t\t\t<category>News - Press Release</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44290&amp;pcid=47&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>PFW Blog: Bodden done for the year</title>\n\t\t\t\t\t<link>http://blog.pfwonline.com/?p=3543</link>\n\t\t\t\t\t<description>&lt;p&gt;The Patriots released their roster moves a short time ago and among them was a stunner: cornerback Leigh Bodden was place on injured reserve with a shoulder injury and therefore is out for the 2010 season. I&apos;m not sure where the shoulder problem cropped up but it must have occurred during the Patriots 36-35 loss to the Rams in the third preseason game last week.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Tue, 31 Aug 2010 22:45:00 GMT</pubDate>\n\t\t\t\t\t<category>News - General</category>\n\t\t\t\t\t<guid>http://blog.pfwonline.com/?p=3543</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Roster moves precede preseason finale; Tue. notes</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=generalnewsdetail&amp;pid=44287&amp;pcid=41&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;The Patriots must get down to 75 players on their active roster today. Plus, news and notes from Tuesday&apos;s practice.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Tue, 31 Aug 2010 20:00:00 GMT</pubDate>\n\t\t\t\t\t<category>News - General</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=generalnewsdetail&amp;pid=44287&amp;pcid=41&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Ask PFW: Cutting to the chase</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=generalnewsdetail&amp;pid=44278&amp;pcid=41&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;The final preseason game is just two days away as it&apos;s the worst time of year for both players and coaches&amp;nbsp;-- cutdowns. As guys continue to battle for the final few roster spots and playing time, Ask PFW is back with insight on how the 2010 Patriots are coming together and what lies ahead with the regular season opener just off on the horizon.&lt;br /&gt;\n&amp;nbsp;&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Tue, 31 Aug 2010 15:10:00 GMT</pubDate>\n\t\t\t\t\t<category>News - General</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=generalnewsdetail&amp;pid=44278&amp;pcid=41&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>It&apos;s complicated: How to get to the final 53</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=nfldetail&amp;pid=44277&amp;pcid=43&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;NFL.com Senior Analyst Michael Lombardi offers a glimpse into how teams cut to the final 53.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Tue, 31 Aug 2010 13:50:00 GMT</pubDate>\n\t\t\t\t\t<category>News - NFL</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=nfldetail&amp;pid=44277&amp;pcid=43&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Better Tate than never; Mon. notes</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=generalnewsdetail&amp;pid=44270&amp;pcid=41&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;The wide receiver/return specialist is have a strong start to his second NFL season. Plus, news and notes from Monsday&apos;s practice.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Mon, 30 Aug 2010 18:00:00 GMT</pubDate>\n\t\t\t\t\t<category>News - General</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=generalnewsdetail&amp;pid=44270&amp;pcid=41&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Patriots close the preseason against the Giants</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44237&amp;pcid=47&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;The New England Patriots will close out the preseason against the New York Giants for the sixth straight season when they travel to face the Giants in the New Meadowlands Stadium.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Sun, 29 Aug 2010 22:25:00 GMT</pubDate>\n\t\t\t\t\t<category>News - Press Release</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44237&amp;pcid=47&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Patriots re-sign DB Terrence Johnson; Release OL Simmons</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44236&amp;pcid=47&amp;rss=1</link>\n\t\t\t\t\t<description>The New England Patriots re-signed DB Terrence Johnson and released OL Brian Simmons today.</description>\n\t\t\t\t\t<pubDate>Sun, 29 Aug 2010 13:00:00 GMT</pubDate>\n\t\t\t\t\t<category>News - Press Release</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44236&amp;pcid=47&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Grateful Gostkowski nails long deal; Fri notes</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=generalnewsdetail&amp;pid=44224&amp;pcid=41&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;The Patriots kicker expresses gratitude for his four-year contract extension.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Fri, 27 Aug 2010 14:00:00 GMT</pubDate>\n\t\t\t\t\t<category>News - General</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=generalnewsdetail&amp;pid=44224&amp;pcid=41&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<item>\n\t\t\t\t\n\t\t\t\t\t<title>Patriots Postgame Quotes - 8/26/2010</title>\n\t\t\t\t\t<link>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44213&amp;pcid=47&amp;rss=1</link>\n\t\t\t\t\t<description>&lt;p&gt;New England Patriots players comment on their preseason game against the St. Louis Rams at Gillette Stadium on Thursday, August 26, 2010.&lt;/p&gt;</description>\n\t\t\t\t\t<pubDate>Fri, 27 Aug 2010 03:30:00 GMT</pubDate>\n\t\t\t\t\t<category>News - Press Release</category>\n\t\t\t\t\t<guid>http://www.patriots.com/news/index.cfm?ac=pressreleasesdetail&amp;pid=44213&amp;pcid=47&amp;rss=1</guid>\n\t\t\t\t\t\n\t\t\t\t</item>\n\t\t\t\t\n\n\n\t\t\t</channel>\n\t\t</rss> \n", message:undefined, modified:(new Date(1283743791591)), baseUri:"http://p3k.org/rss/", query:"frameColor=black&textColor=black&_=1206500898255&titleBarColor=lightblue&compact=&fontFace=&align=&showXmlButton=&maxItems=7&boxFillColor=white&undefined=&titleBarTextColor=black&width=330&url=http://www.patriots.com/rss/public/index.cfm?ac=rss&rssid=NQ==&", param:{textColor:"black", width:"330", align:"", fontFace:"", url:"http://www.patriots.com/rss/public/index.cfm?ac=rss&rssid=NQ==", compact:"", frameColor:"black", showXmlButton:"", undefined:"", boxFillColor:"white", _:"1206500898255", titleBarColor:"lightblue", maxItems:"7", 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();

