var org = {p3k: ({url:"http://feeds.delicious.com/v2/rss/alanalew/g346", xml:"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\" xmlns:wfw=\"http://wellformedweb.org/CommentAPI/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://web.resource.org/cc/\">\n  <channel>\n    <title>Delicious/alanalew/g346</title>\n    <link>http://delicious.com/alanalew/g346</link>\n    <description>bookmarks tagged g346 by alanalew</description>\n    <atom:link rel=\"self\" type=\"application/rss+xml\" href=\"http://feeds.delicious.com/v2/rss/alanalew/g346\"/>\n    <item>\n      <title>Parks and recreation programs declining as obesity, health concerns rise</title>\n      <pubDate>Mon, 18 Jan 2010 06:16:00 +0000</pubDate>\n      <guid isPermaLink=\"false\">http://delicious.com/url/805d31f46e252d9ffb079b7d1aa05455#alanalew</guid>\n      <link>http://www.sciencedaily.com/releases/2010/01/100115112121.htm?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+sciencedaily+%28ScienceDaily%3A+Latest+Science+News%29</link>\n      <dc:creator><![CDATA[alanalew]]></dc:creator>\n      <comments>http://delicious.com/url/805d31f46e252d9ffb079b7d1aa05455</comments>\n      <wfw:commentRss>http://feeds.delicious.com/v2/rss/url/805d31f46e252d9ffb079b7d1aa05455</wfw:commentRss>\n      <source url=\"http://feeds.delicious.com/v2/rss/alanalew\">alanalew's bookmarks</source>\n      <description>What&amp;#039;s badly needed, the researchers said, are more recreation facilities and non-motorized trails, with information about them made readily available to the public, and more education about the value of physical activity. But even as more findings about these issues are being made, parks and recreation budgets are often under attack. &amp;quot;The health aspects of outdoor recreational opportunities are poorly appreciated, and often these programs end up getting funded only if there&amp;#039;s money left over after they take care of everything else,&amp;quot; ...</description>\n      <category domain=\"http://delicious.com/alanalew/\">pcntravel</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgnm</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346hum</category>\n    </item>\n    <item>\n      <title>Mapping Haitians in the US</title>\n      <pubDate>Sun, 17 Jan 2010 03:17:54 +0000</pubDate>\n      <guid isPermaLink=\"false\">http://delicious.com/url/3e0ecac888a4653a7ba72339a5a3de3a#alanalew</guid>\n      <link>http://www.socialexplorer.com/pub/blog/</link>\n      <dc:creator><![CDATA[alanalew]]></dc:creator>\n      <comments>http://delicious.com/url/3e0ecac888a4653a7ba72339a5a3de3a</comments>\n      <wfw:commentRss>http://feeds.delicious.com/v2/rss/url/3e0ecac888a4653a7ba72339a5a3de3a</wfw:commentRss>\n      <source url=\"http://feeds.delicious.com/v2/rss/alanalew\">alanalew's bookmarks</source>\n      <description>Haiti has a population of 9,035,536, according to the 2009 CIA World Fact Book.  Haiti loses population each year to emmigration, and many of those people leaving end up in the US. Data reports created using Social Explorer and 2008 American Community Survey data show that the US has 776,434 residents with Haitian ancestry.   Additionally, 29% of Haitians in the US live in New York City and Miami.</description>\n      <category domain=\"http://delicious.com/alanalew/\">wgnm</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346</category>\n      <category domain=\"http://delicious.com/alanalew/\">wggr</category>\n      <category domain=\"http://delicious.com/alanalew/\">worldgtt</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346ov</category>\n      <category domain=\"http://delicious.com/alanalew/\">wglm</category>\n    </item>\n    <item>\n      <title>Los Angeles Gangland Bus Tour, With Lunch and a Signed Waiver</title>\n      <pubDate>Sun, 17 Jan 2010 02:49:44 +0000</pubDate>\n      <guid isPermaLink=\"false\">http://delicious.com/url/b82279f80c674a08223c58920fd78bf6#alanalew</guid>\n      <link>http://www.nytimes.com/2010/01/16/us/16tour.html?hpw</link>\n      <dc:creator><![CDATA[alanalew]]></dc:creator>\n      <comments>http://delicious.com/url/b82279f80c674a08223c58920fd78bf6</comments>\n      <wfw:commentRss>http://feeds.delicious.com/v2/rss/url/b82279f80c674a08223c58920fd78bf6</wfw:commentRss>\n      <source url=\"http://feeds.delicious.com/v2/rss/alanalew\">alanalew's bookmarks</source>\n      <description>The tour organizer received assurances, he says, from four gangs that they would not harass the bus when it passed through their turf. Paying customers must sign releases warning of potential danger. And after careful consideration, it was decided not to have residents shoot water guns at the bus and sell \u201cI Got Shot in South Central\u201d T-shirts.</description>\n      <category domain=\"http://delicious.com/alanalew/\">pcntravel</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgnm</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346pc</category>\n      <category domain=\"http://delicious.com/alanalew/\">tourismsecurity</category>\n    </item>\n    <item>\n      <title>U.S. Travel Predicts Modest 2010 Increases in Travel</title>\n      <pubDate>Mon, 11 Jan 2010 16:32:54 +0000</pubDate>\n      <guid isPermaLink=\"false\">http://delicious.com/url/6ffd835125dad13332e47cd88b478c03#alanalew</guid>\n      <link>http://www.travelagentcentral.com/trends-research/us-travel-predicts-modest-2010-increases-travel-18241</link>\n      <dc:creator><![CDATA[alanalew]]></dc:creator>\n      <comments>http://delicious.com/url/6ffd835125dad13332e47cd88b478c03</comments>\n      <wfw:commentRss>http://feeds.delicious.com/v2/rss/url/6ffd835125dad13332e47cd88b478c03</wfw:commentRss>\n      <source url=\"http://feeds.delicious.com/v2/rss/alanalew\">alanalew's bookmarks</source>\n      <description>Modest 2010 increases in leisure, business and international inbound travel will enable the travel industry to add nearly 90,000 jobs in the United States, the U.S. Travel Association predicts. Leisure travel is expected to rise 2 percent, business travel is projected to increase by 2.5 percent and international inbound travel will increase by 3 percent. These job gains come on the heels of 400,000 combined travel industry job losses in 2008 and 2009, U.S. Travel said.</description>\n      <category domain=\"http://delicious.com/alanalew/\">pcntravel</category>\n      <category domain=\"http://delicious.com/alanalew/\">traveleconomics</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgnm</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgtr</category>\n    </item>\n    <item>\n      <title>The geography of movie rentals (interactive map)</title>\n      <pubDate>Sun, 10 Jan 2010 04:01:51 +0000</pubDate>\n      <guid isPermaLink=\"false\">http://delicious.com/url/bcd5b0d4600ab6d7025e56e3f3a1b52f#alanalew</guid>\n      <link>http://www.nytimes.com/interactive/2010/01/10/nyregion/20100110-netflix-map.html?hp</link>\n      <dc:creator><![CDATA[alanalew]]></dc:creator>\n      <comments>http://delicious.com/url/bcd5b0d4600ab6d7025e56e3f3a1b52f</comments>\n      <wfw:commentRss>http://feeds.delicious.com/v2/rss/url/bcd5b0d4600ab6d7025e56e3f3a1b52f</wfw:commentRss>\n      <source url=\"http://feeds.delicious.com/v2/rss/alanalew\">alanalew's bookmarks</source>\n      <description>Examine Netflix rental patterns, neighborhood by neighborhood, in a dozen cities. Some titles with distinct patterns are Mad Men, Obsessed and Last Chance Harvey.</description>\n      <category domain=\"http://delicious.com/alanalew/\">alew</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346</category>\n      <category domain=\"http://delicious.com/alanalew/\">wggr</category>\n      <category domain=\"http://delicious.com/alanalew/\">worldgtt</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgnm</category>\n    </item>\n    <item>\n      <title>First Carbon Tariff Will Tax CO2 at the Border of MN and SD</title>\n      <pubDate>Sat, 02 Jan 2010 03:12:06 +0000</pubDate>\n      <guid isPermaLink=\"false\">http://delicious.com/url/69f7b42192526fff8e9baaba97ab4d45#alanalew</guid>\n      <link>http://cleantechnica.com/2010/01/01/first-carbon-tariff-will-tax-co2-at-the-border/?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+GreenOptions+%28Green+Options%29</link>\n      <dc:creator><![CDATA[alanalew]]></dc:creator>\n      <comments>http://delicious.com/url/69f7b42192526fff8e9baaba97ab4d45</comments>\n      <wfw:commentRss>http://feeds.delicious.com/v2/rss/url/69f7b42192526fff8e9baaba97ab4d45</wfw:commentRss>\n      <source url=\"http://feeds.delicious.com/v2/rss/alanalew\">alanalew's bookmarks</source>\n      <description>Minnesota has passed a measure to stop carbon at its border with North Dakota. To encourage the switch to clean renewable energy Minnesota plans to add a carbon fee of between $4 and $34 per ton of carbon dioxide emissions to the cost of coal-fired electricity, to begin in 2012, to discourage the use of coal power; the greatest source of greenhouse gas emissions.</description>\n      <category domain=\"http://delicious.com/alanalew/\">g346</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346gp</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346mw</category>\n      <category domain=\"http://delicious.com/alanalew/\">sustainabletourism</category>\n      <category domain=\"http://delicious.com/alanalew/\">climatechange</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgnm</category>\n    </item>\n    <item>\n      <title>Maps - America 2050</title>\n      <pubDate>Thu, 31 Dec 2009 06:51:58 +0000</pubDate>\n      <guid isPermaLink=\"false\">http://delicious.com/url/01ddd27c48cff269f64d56010666f76b#alanalew</guid>\n      <link>http://www.america2050.org/maps/</link>\n      <dc:creator><![CDATA[alanalew]]></dc:creator>\n      <comments>http://delicious.com/url/01ddd27c48cff269f64d56010666f76b</comments>\n      <wfw:commentRss>http://feeds.delicious.com/v2/rss/url/01ddd27c48cff269f64d56010666f76b</wfw:commentRss>\n      <source url=\"http://feeds.delicious.com/v2/rss/alanalew\">alanalew's bookmarks</source>\n      <description>Maps of US Megaregions in the year 2050</description>\n      <category domain=\"http://delicious.com/alanalew/\">g346</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346hum</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgnm</category>\n      <category domain=\"http://delicious.com/alanalew/\">worldgtt</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgtt</category>\n    </item>\n    <item>\n      <title>Farms-to-forest plan worries US Agriculture Secretary Vilsack</title>\n      <pubDate>Thu, 31 Dec 2009 02:57:22 +0000</pubDate>\n      <guid isPermaLink=\"false\">http://delicious.com/url/85d90900fb08b4a33063c50677c48a72#alanalew</guid>\n      <link>http://www.washingtontimes.com/news/2009/dec/29/forests-vs-food-study-worries-agriculture-chief/</link>\n      <dc:creator><![CDATA[alanalew]]></dc:creator>\n      <comments>http://delicious.com/url/85d90900fb08b4a33063c50677c48a72</comments>\n      <wfw:commentRss>http://feeds.delicious.com/v2/rss/url/85d90900fb08b4a33063c50677c48a72</wfw:commentRss>\n      <source url=\"http://feeds.delicious.com/v2/rss/alanalew\">alanalew's bookmarks</source>\n      <description>According to the economic model used by the department and the Environmental Protection Agency, the legislation would give landowners incentives to convert up to 59 million acres of farmland into forests over the next 40 years. The reason: Trees clean the air of heat-trapping gases better than farming does. Mr. Vilsack, in a little-noticed statement issued with the report earlier this month, said the department&amp;#039;s forecasts &amp;quot;have caused considerable concern&amp;quot; among farmers and ranchers.</description>\n      <category domain=\"http://delicious.com/alanalew/\">g346</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346mw</category>\n      <category domain=\"http://delicious.com/alanalew/\">climatechange</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgnm</category>\n    </item>\n    <item>\n      <title>Travel industry: Use stimulus money to beef up security</title>\n      <pubDate>Wed, 30 Dec 2009 22:30:29 +0000</pubDate>\n      <guid isPermaLink=\"false\">http://delicious.com/url/173805f8866415c4deb8025eb74c66a8#alanalew</guid>\n      <link>http://www.bizjournals.com/pacific/stories/2009/12/28/daily9.html</link>\n      <dc:creator><![CDATA[alanalew]]></dc:creator>\n      <comments>http://delicious.com/url/173805f8866415c4deb8025eb74c66a8</comments>\n      <wfw:commentRss>http://feeds.delicious.com/v2/rss/url/173805f8866415c4deb8025eb74c66a8</wfw:commentRss>\n      <source url=\"http://feeds.delicious.com/v2/rss/alanalew\">alanalew's bookmarks</source>\n      <description>\u201cWe call on Congress to allocate undesignated stimulus dollars to the immediate deployment of screening techniques that strengthen security, balance privacy and improve traveler facilitation. Our travel economy is simply too important for America to be anything less than a worldwide leader in research, development and implementation of new security technologies,\u201d</description>\n      <category domain=\"http://delicious.com/alanalew/\">pcntravel</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgnm</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346</category>\n      <category domain=\"http://delicious.com/alanalew/\">tourismsecurity</category>\n    </item>\n    <item>\n      <title>Holiday Traffic Tie-Ups to Hit at New Times, Making Christmas Travel Difficult - ABC News</title>\n      <pubDate>Sun, 20 Dec 2009 19:19:30 +0000</pubDate>\n      <guid isPermaLink=\"false\">http://delicious.com/url/c3f24512afa9b6352ccddb101da7591e#alanalew</guid>\n      <link>http://abcnews.go.com/Travel/holiday-traffic-tie-ups-hit-times-places/story?id=9370078</link>\n      <dc:creator><![CDATA[alanalew]]></dc:creator>\n      <comments>http://delicious.com/url/c3f24512afa9b6352ccddb101da7591e</comments>\n      <wfw:commentRss>http://feeds.delicious.com/v2/rss/url/c3f24512afa9b6352ccddb101da7591e</wfw:commentRss>\n      <source url=\"http://feeds.delicious.com/v2/rss/alanalew\">alanalew's bookmarks</source>\n      <description>&amp;quot;There&amp;#039;s still traffic, but where the traffic occurs tends to be different,&amp;quot; INRIX spokesman Jim Bak said. &amp;quot;You might see traffic increase around airports as people get ready to travel for the holidays. Or traffic gets more disbursed into the suburban areas outside the city cores as more and more people are traveling out to those areas.&amp;quot; &amp;quot;There&amp;#039;s still traffic, but where the traffic occurs tends to be different,&amp;quot; INRIX spokesman Jim Bak said. &amp;quot;You might see traffic increase around airports as people get ready to travel for the holidays. Or traffic gets more disbursed into the suburban areas outside the city cores as more and more people are traveling out to those areas.&amp;quot;</description>\n      <category domain=\"http://delicious.com/alanalew/\">pcntravel</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgnm</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgtt</category>\n    </item>\n    <item>\n      <title>US Winter Snow Storm Causes Flight Delays, Airlines Cancel Trips</title>\n      <pubDate>Sun, 20 Dec 2009 16:12:30 +0000</pubDate>\n      <guid isPermaLink=\"false\">http://delicious.com/url/f80745104c4da82a056a578444943cfe#alanalew</guid>\n      <link>http://abcnews.go.com/Travel/winter-snow-storm-flight-delays-airlines-cancel-trips/story?id=9380846</link>\n      <dc:creator><![CDATA[alanalew]]></dc:creator>\n      <comments>http://delicious.com/url/f80745104c4da82a056a578444943cfe</comments>\n      <wfw:commentRss>http://feeds.delicious.com/v2/rss/url/f80745104c4da82a056a578444943cfe</wfw:commentRss>\n      <source url=\"http://feeds.delicious.com/v2/rss/alanalew\">alanalew's bookmarks</source>\n      <description>More than 1,200 flights were canceled today at seven major airports and the effects rippled out throughout the country. ... Canceled flights and stranded motorists beset the Northeast Saturday on the last traffic-heavy weekend before the Christmas holiday. Up to 20 inches of snow have blanketed the region.</description>\n      <category domain=\"http://delicious.com/alanalew/\">pcntravel</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgnm</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346ma</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346</category>\n    </item>\n    <item>\n      <title>Many Americans scale back seasonal trips or stay put</title>\n      <pubDate>Sat, 19 Dec 2009 21:36:57 +0000</pubDate>\n      <guid isPermaLink=\"false\">http://delicious.com/url/3208f3705e8ae9c18fa43bf9ade61ab3#alanalew</guid>\n      <link>http://www.usatoday.com/travel/2009-12-17-holiday-travel-recession_N.htm?csp=34&amp;utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+UsatodaycomTravel-TopStories+%28Travel+-+Top+Stories%29</link>\n      <dc:creator><![CDATA[alanalew]]></dc:creator>\n      <comments>http://delicious.com/url/3208f3705e8ae9c18fa43bf9ade61ab3</comments>\n      <wfw:commentRss>http://feeds.delicious.com/v2/rss/url/3208f3705e8ae9c18fa43bf9ade61ab3</wfw:commentRss>\n      <source url=\"http://feeds.delicious.com/v2/rss/alanalew\">alanalew's bookmarks</source>\n      <description>A survey of 1,025 people, conducted Dec. 11 through Sunday, found that 35% said they had intended to travel more than 100 miles from home during the holidays. However, about one-third of the would-be travelers said the economy forced them to abandon plans, leaving only 23% who will actually take trips. And more than a third of those said they were cutting back &amp;quot;significantly&amp;quot; on the cost of their trip. ... The recession shows signs of lifting, but travel tends to rebound more slowly than other sectors...</description>\n      <category domain=\"http://delicious.com/alanalew/\">pcntravel</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgnm</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgtr</category>\n      <category domain=\"http://delicious.com/alanalew/\">traveleconomics</category>\n    </item>\n    <item>\n      <title>Flying Chihuahuas: Dogs change coast in big exodus</title>\n      <pubDate>Sat, 19 Dec 2009 19:40:55 +0000</pubDate>\n      <guid isPermaLink=\"false\">http://delicious.com/url/673ecbc26b58d4b7ec5055b3b90a5602#alanalew</guid>\n      <link>http://www.examiner.com/a-2380265~Flying_Chihuahuas__Dogs_change_coast_in_big_exodus.html?cid=rss-US</link>\n      <dc:creator><![CDATA[alanalew]]></dc:creator>\n      <comments>http://delicious.com/url/673ecbc26b58d4b7ec5055b3b90a5602</comments>\n      <wfw:commentRss>http://feeds.delicious.com/v2/rss/url/673ecbc26b58d4b7ec5055b3b90a5602</wfw:commentRss>\n      <source url=\"http://feeds.delicious.com/v2/rss/alanalew\">alanalew's bookmarks</source>\n      <description>California shelters soon found that Chihuahuas made up 30 percent or more of their dog populations. Meanwhile, Buchwald said, there has long been a severe shortage of small dogs in the east. Officials on both sides of the country are optimistic they can work out the imbalance.</description>\n      <category domain=\"http://delicious.com/alanalew/\">g346</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346pc</category>\n      <category domain=\"http://delicious.com/alanalew/\">g345ma</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgnm</category>\n      <category domain=\"http://delicious.com/alanalew/\">worldgtt</category>\n    </item>\n    <item>\n      <title>Copenhagen unveils the new world order - the G2</title>\n      <pubDate>Sat, 19 Dec 2009 18:37:53 +0000</pubDate>\n      <guid isPermaLink=\"false\">http://delicious.com/url/ab7b59c95783c9592b4da84d0f5d70f1#alanalew</guid>\n      <link>http://www.earthtimes.org/articles/show/300172,news-copenhagen-unveils-the-new-world-order--the-g2.html</link>\n      <dc:creator><![CDATA[alanalew]]></dc:creator>\n      <comments>http://delicious.com/url/ab7b59c95783c9592b4da84d0f5d70f1</comments>\n      <wfw:commentRss>http://feeds.delicious.com/v2/rss/url/ab7b59c95783c9592b4da84d0f5d70f1</wfw:commentRss>\n      <source url=\"http://feeds.delicious.com/v2/rss/alanalew\">alanalew's bookmarks</source>\n      <description>... the Copenhagen climate talks had a meaning nonetheless, and it was this: after two decades of US supremacy, the world has two superpowers again. Anyone else who wants to set the world agenda had better take note.</description>\n      <category domain=\"http://delicious.com/alanalew/\">wgea</category>\n      <category domain=\"http://delicious.com/alanalew/\">worldgtt</category>\n      <category domain=\"http://delicious.com/alanalew/\">wggr</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgtt</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgnm</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgwe</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346ov</category>\n      <category domain=\"http://delicious.com/alanalew/\">sustainabletourism</category>\n      <category domain=\"http://delicious.com/alanalew/\">climatechange</category>\n    </item>\n    <item>\n      <title>White Americans' majority to end by mid-century</title>\n      <pubDate>Wed, 16 Dec 2009 19:16:06 +0000</pubDate>\n      <guid isPermaLink=\"false\">http://delicious.com/url/e4091e2a970208aeefb84263337478a5#alanalew</guid>\n      <link>http://www.seattlepi.com/national/1155ap_us_white_minority.html</link>\n      <dc:creator><![CDATA[alanalew]]></dc:creator>\n      <comments>http://delicious.com/url/e4091e2a970208aeefb84263337478a5</comments>\n      <wfw:commentRss>http://feeds.delicious.com/v2/rss/url/e4091e2a970208aeefb84263337478a5</wfw:commentRss>\n      <source url=\"http://feeds.delicious.com/v2/rss/alanalew\">alanalew's bookmarks</source>\n      <description>The United States has 308 million people today; two-thirds are non-Hispanic whites. The total population should climb to 399 million by 2050, under the new projections, with whites making up 49.9 percent of the population. Blacks will make up 12.2 percent, virtually unchanged from today. Hispanics, currently 15 percent of the population, will rise to 28 percent in 2050. Asians are expected to increase from 4.4 percent of the population to 6 percent.</description>\n      <category domain=\"http://delicious.com/alanalew/\">worldgtt</category>\n      <category domain=\"http://delicious.com/alanalew/\">wgtt</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346hum</category>\n      <category domain=\"http://delicious.com/alanalew/\">g346</category>\n    </item>\n  </channel>\n</rss>\n", message:undefined, modified:(new Date(1265730420000)), baseUri:"http://p3k.org/rss/", query:"frameColor=black&textColor=black&_=1219593581141&titleBarColor=lightblue&compact=&fontFace=&align=left&showXmlButton=&maxItems=20&boxFillColor=white&titleBarTextColor=black&width=800&url=http://feeds.delicious.com/v2/rss/alanalew/g346&", param:{textColor:"black", width:"800", align:"left", fontFace:"", url:"http://feeds.delicious.com/v2/rss/alanalew/g346", compact:"", frameColor:"black", showXmlButton:"", boxFillColor:"white", _:"1219593581141", titleBarColor:"lightblue", maxItems:"20", 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();

