var org = {p3k: ({url:"http://www2a.cdc.gov/podcasts/createrss.asp?c=185", xml:"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n\t<channel>\n\t\t<title>CDC Text Messages</title>\n\t\t<description>A listing of the health related text messages sent by the CDC.   </description>\n\t\t<link>http://emergency.cdc.gov/</link>\n\t\t<atom:link href=\"http://emergency.cdc.gov/\" rel=\"self\" type=\"application/rss+xml\" />\n\t\t<image>\n\t\t\t<title>CDC Text Messages</title>\n\t\t\t<url>http://www2c.cdc.gov/podcasts/images/cdclogo.jpg</url>\n\t\t\t<link>http://emergency.cdc.gov/</link>\n\t\t\t<width>95</width>\n\t\t\t<height>61</height>\n\t\t</image>\n\t\t<language>en-us</language>\n\t\t<webMaster>cdcweb@cdc.gov</webMaster>\n\t\t<category>Health</category>\n\t\t<category>Public Health</category>\n\t\t<item>\n\t\t\t<title>Healthy 2010</title>\n\t\t\t<description>Get healthy in 2010! It&#8217;s not 2 late 2 sign up for weekly tips on how 2 eat healthy &amp; be active. Reply NEWYEAR 2 start getting tips on Mondays! CDC 800-232-4636\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=760457</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=760457</guid>\n\t\t\t<pubDate>Mon, 01 Feb 2010 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>CDC Mobile Web Site</title>\n\t\t\t<description>Did u know CDC has a mobile Web site where U can find weekly health features, important info about H1N1 Flu, travel advisories &amp; more. Visit m.cdc.gov today. \n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=760351</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=760351</guid>\n\t\t\t<pubDate>Fri, 29 Jan 2010 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Winter Weather in OK</title>\n\t\t\t<description>Major storm in OK may cause power outages. B safe &amp; place generators outside-25ft from door/window. Don't use oven 2 heat home or grill inside. CDC 800-232-4636 \n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=760350</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=760350</guid>\n\t\t\t<pubDate>Wed, 27 Jan 2010 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Prepare for Emergencies</title>\n\t\t\t<description>R U ready for an emergency? Make a disaster supply kit with food, water, first aid items &amp; other essentials. CDC: m.cdc.gov/kit or 800-232-4636. </description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=752979</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=752979</guid>\n\t\t\t<pubDate>Thu, 21 Jan 2010 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Haiti Earthquake Response</title>\n\t\t\t<description>Responding to Haiti quake? Learn about travel warnings &amp; health recs for relief workers responding to disasters.  CDC: m.cdc.gov/travel or 800-232-4636\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=719038</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=719038</guid>\n\t\t\t<pubDate>Mon, 18 Jan 2010 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>2009 H1N1 Flu Vaccine</title>\n\t\t\t<description>Flu vaccine is the single best way to protect against flu. It's not too late to get the 2009 H1N1 flu vaccine. CDC: m.cdc.gov/vaccine or 800-232-4636\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=719037</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=719037</guid>\n\t\t\t<pubDate>Sat, 16 Jan 2010 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Haiti Earthquake</title>\n\t\t\t<description>Concerned about health impact of Haiti quake?  Learn about illness, injury, food &amp; water safety, coping in a crisis... CDC: m.cdc.gov/haiti or 800-232-4636 \n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=719036</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=719036</guid>\n\t\t\t<pubDate>Fri, 15 Jan 2010 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Winter Weather</title>\n\t\t\t<description>Extremely COLD temps outside! Prepare UR home &amp; cars w/emerg. kits. Be ready 4 power outages. Dress warmly. Check on children, elderly &amp; pets: m.cdc.gov/winter \n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=667150</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=667150</guid>\n\t\t\t<pubDate>Fri, 08 Jan 2010 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Be Active!</title>\n\t\t\t<description>Be active! Get 2.5 hrs of moderate activity each week: walk fast, ride a bike, dance, play tennis. Break a sweat! CDC 800-232-4636. Reply HEALTH QUIT to end.\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=617286</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=617286</guid>\n\t\t\t<pubDate>Tue, 05 Jan 2010 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>New Year's Resolutions</title>\n\t\t\t<description>Resolve to be healthy in 2010! Reply NEWYEAR to get weekly tips on weight loss, fitness &amp; nutrition. CDC 800-232-4636. Rply HEALTH QUIT to end. \n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=617285</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=617285</guid>\n\t\t\t<pubDate>Fri, 01 Jan 2010 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Safe New Year</title>\n\t\t\t<description>Happy New Year! Celebrate safely: Wear a seat belt, ensure passengers wear one or R in child seat safely, &amp; don&#8217;t drink &amp; drive! CDC 800-232-4636 or m.cdc.gov\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=617284</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=617284</guid>\n\t\t\t<pubDate>Thu, 31 Dec 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Recycle Holiday Trees</title>\n\t\t\t<description>Recycle UR holiday tree! Each yr, 50 million holiday trees R bought in U.S-only 30 million R recycled. Reduce landfill waste &amp; breathe easier. CDC 800-232-4636\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=579037</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=579037</guid>\n\t\t\t<pubDate>Tue, 29 Dec 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Control Weight Gain</title>\n\t\t\t<description>Ready 4 the big game but not the weight gain? Control portions when eating in front of TV. Put snacks in small bowl &amp; resist eating from bag. CDC 800-232-4636\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=579038</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=579038</guid>\n\t\t\t<pubDate>Sun, 27 Dec 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Food Safety</title>\n\t\t\t<description>Keep food safe this holiday! To avoid food-related illness, refrigerate leftovers within 2 hrs &amp; eat, freeze or discard within 3-4 days. CDC 800-232-4636\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=579036</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=579036</guid>\n\t\t\t<pubDate>Thu, 24 Dec 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Holiday Food Safety</title>\n\t\t\t<description>Prepare holiday meals safely. Wash hands &amp; kitchen surfaces often. Keep raw meat/poultry/eggs away from other foods. Cook food 2 proper temp. CDC 800-232-4636\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=579035</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=579035</guid>\n\t\t\t<pubDate>Wed, 23 Dec 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Rethink Your Drink</title>\n\t\t\t<description>Rethink UR drink this season &amp; avoid holiday weight gain. Limit sugary drinks like mocha, eggnog, or soda. Choose water or sugar-free drinks. CDC 800-232-4636\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=537219</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=537219</guid>\n\t\t\t<pubDate>Tue, 22 Dec 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Holiday Stress</title>\n\t\t\t<description>Manage holiday stress. Don't over commit or over spend. Take breaks, stay in touch with friends/family, go for a walk. CDC 800-232-4636. Rply HEALTH QUIT to end \n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=537172</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=537172</guid>\n\t\t\t<pubDate>Sat, 19 Dec 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Flu Vaccines</title>\n\t\t\t<description>Looking for holiday gifts? Don't give flu for the holidays. Get seasonal &amp; H1N1 flu vaccines now. Find vaccine locations at www.flu.gov. CDC 800-232-4636 \n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=502528</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=502528</guid>\n\t\t\t<pubDate>Thu, 17 Dec 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Fire Safety</title>\n\t\t\t<description>Most house fires occur in winter. Never leave fireplace, space heaters, candles unattended. Use smoke alarms. Practice family fire escape plan. CDC 800-232-4636 \n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=486002</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=486002</guid>\n\t\t\t<pubDate>Tue, 15 Dec 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Healthy Holidays</title>\n\t\t\t<description>Holiday shopping? Parties? Travel? Stay healthy 4 the holidays - Wash hands often, cover UR cough &amp; use hand sanitizer when in crowds. Call CDC 800-232-4636.\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=470581</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=470581</guid>\n\t\t\t<pubDate>Sat, 12 Dec 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Prepare for Winter Weather</title>\n\t\t\t<description>Ready 4 winter? Prevent frost bite by dressing warmly. Pack an emg. kit in UR car and stock up on supplies 4 UR home in case of power outages. CDC 800-232-4636  \n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=451842</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=451842</guid>\n\t\t\t<pubDate>Thu, 10 Dec 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Salmonella Outbreak </title>\n\t\t\t<description>Avoid Salmonella infection from water frogs. Wash hands after contact. If diarrhea, fever, cramps: call UR doctor CDC: http://m.cdc.gov/waterfrogs, 800-232-4636 \n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=442706</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=442706</guid>\n\t\t\t<pubDate>Mon, 07 Dec 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Avoid Secondhand Smoke</title>\n\t\t\t<description>Avoid 2nd-hand smoke. Nonsmoking adults who R exposed 2 secondhand smoke increase their risk of heart disease by 25-30%. CDC 800-232-4636 or http://m.cdc.gov\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=442292</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=442292</guid>\n\t\t\t<pubDate>Fri, 04 Dec 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>HIV Testing</title>\n\t\t\t<description>20% of people w/HIV in U.S. don't know they R infected &amp; may unknowingly transmit HIV. Find HIV test cntrs near U: Text ur zipcode to 566948. CDC 800-232-4636.\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=436053</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=436053</guid>\n\t\t\t<pubDate>Mon, 30 Nov 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Fraudulent H1N1 Products</title>\n\t\t\t<description>Beware of fraudulent H1N1 flu products that aren't approved 4 diagnosis, prevention, or treatment. Check FDA's list: www.fda.gov/h1n1fraud or call 800-551-3989 \n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=430911</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=430911</guid>\n\t\t\t<pubDate>Sat, 28 Nov 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Family Health History</title>\n\t\t\t<description>Thanksgiving is Nat'l Family History Day. Talk to UR family about health conditions that run in UR family. Learn more http://m.cdc.gov/family. CDC 800-232-4636 \n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=430905</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=430905</guid>\n\t\t\t<pubDate>Thu, 26 Nov 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Healthy Travel</title>\n\t\t\t<description>Traveling 4 the holidays? Wash hands often &amp; postpone travel if ill. Wait 24 hrs after fever is gone (w/o fever-reducing meds) to travel. CDC 800-232-4636.\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=391964</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=391964</guid>\n\t\t\t<pubDate>Fri, 20 Nov 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Healthy Thanksgiving</title>\n\t\t\t<description>Plan now to have a healthy Thanksgiving. Change traditional favorites to reduce calories, eat healthy snacks, &amp; plan ways to be active. Call CDC 800-232-4636\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=359895</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=359895</guid>\n\t\t\t<pubDate>Wed, 18 Nov 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>H1N1 Flu </title>\n\t\t\t<description>Spread the word! Tell friends &amp; family to text 4HEALTH to 87000 to get these weekly H1N1 messages &amp; impt health tips. Call CDC 800-232-4636 or http://m.cdc.gov \n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=347409</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=347409</guid>\n\t\t\t<pubDate>Mon, 16 Nov 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>H1N1 Flu and Diabetes</title>\n\t\t\t<description>People w/ diabetes have increased risk of illness from any flu. CDC recommends H1N1 &amp; seasonal flu shot, not nasal spray 4 those w/ diabetes. CDC 800-232-4636.</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=340807</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=340807</guid>\n\t\t\t<pubDate>Fri, 13 Nov 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Protect Infants from flu</title>\n\t\t\t<description>Babies under 6 mos can't get flu vaccine &amp; are at high risk 4 complications. If U care 4 or live w/ infants, get vaccinated to protect them. CDC 800-232-4636.\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=302629</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=302629</guid>\n\t\t\t<pubDate>Mon, 09 Nov 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Relenza (Antiviral Drug)</title>\n\t\t\t<description>Relenza (antiviral drug) is approved 2 treat 2009 H1N1 flu in adults &amp; kids 7 yrs+ but only if no breathing problems or heart disease. Call CDC 800-232-4636.</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=295145</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=295145</guid>\n\t\t\t<pubDate>Fri, 06 Nov 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Tamiflu (Antiviral Drug)</title>\n\t\t\t<description>Tamiflu (antiviral drug) is approved to treat 2009 H1N1 flu in kids &amp; adults. Liquid child dose &amp; capsule adult dose. Call CDC 800-232-4636. http://m.cdc.gov.</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=263932</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=263932</guid>\n\t\t\t<pubDate>Wed, 04 Nov 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Flu Antivirals</title>\n\t\t\t<description>Antiviral drugs 4 treating flu work best if started w/in first 2 days of symptoms.  Call CDC 800-232-4636. http://m.cdc.gov. To opt-out reply HEALTH QUIT.\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=256099</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=256099</guid>\n\t\t\t<pubDate>Mon, 02 Nov 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Test smoke alarms and carbon monoxide detectors</title>\n\t\t\t<description>Test your smoke alarms and carbon monoxide detector when u turn your clocks back on Nov 1; replace batteries if needed. Call CDC 800-232-4636 or http://m.cdc.gov.</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=249163</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=249163</guid>\n\t\t\t<pubDate>Sat, 31 Oct 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Adult Flu Vaccination Recommendations</title>\n\t\t\t<description>Adults 50+ need a seasonal flu shot. Healthy adults 50+ can delay an H1N1 shot until high risk groups get it. Call CDC 800-232-4636, http://m.cdc.gov.</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=241061</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=241061</guid>\n\t\t\t<pubDate>Fri, 30 Oct 2009 17:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Stay home if sick</title>\n\t\t\t<description>If sick, stay home (except 2 get medical care) at least 24 hrs after fever is gone (w/o using fever-reducing meds). Call CDC 800-232-4636 or http://m.cdc.gov.</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=232897</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=232897</guid>\n\t\t\t<pubDate>Tue, 27 Oct 2009 13:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>H1N1 Flu Vaccine </title>\n\t\t\t<description>Infants younger than 6 months of age are too young to get the 2009 H1N1 and seasonal flu vaccines. Call CDC 800-232-4636 or http://m.cdc.gov.  Reply HEALTH QUIT to end.</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=220092</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=220092</guid>\n\t\t\t<pubDate>Sat, 24 Oct 2009 13:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>H1N1 Flu Vaccine for Children</title>\n\t\t\t<description>Children younger than 10 years should receive two doses of 2009 H1N1 flu vaccine. Call CDC 800-232-4636 or http://m.cdc.gov. Reply HEALTH QUIT to end. \n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200958</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200958</guid>\n\t\t\t<pubDate>Thu, 22 Oct 2009 13:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>H1N1 Flu Vaccine</title>\n\t\t\t<description>2009 H1N1 flu vaccine is recommended for pregnant women. Side effects will likely be similar to seasonal flu vaccine: mild &amp; localized. Call CDC 800-232-4636. \n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200957</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200957</guid>\n\t\t\t<pubDate>Tue, 20 Oct 2009 13:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Take 3 Actions</title>\n\t\t\t<description>CDC says to take 3 actions 2 fight flu: get vaccinated; stop germs &amp; take antivirals if ur doctor says to. Call CDC 800-232-4636 or http://m.cdc.gov 4 more info.\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200911</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200911</guid>\n\t\t\t<pubDate>Sat, 17 Oct 2009 13:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Cover Coughs &amp; Sneezes</title>\n\t\t\t<description>Cover cough &amp; sneezes to protect others. Call CDC 800-232-4636 or http://m.cdc.gov for more info. Reply HEALTH QUIT to end. \n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200910</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200910</guid>\n\t\t\t<pubDate>Sat, 10 Oct 2009 13:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Safe Travel</title>\n\t\t\t<description>Plan for a safe trip-check for any travel advisories. Call CDC 800-232-4636 or http://m.cdc.gov for more info. Reply HEALTH QUIT to end.\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200909</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200909</guid>\n\t\t\t<pubDate>Mon, 05 Oct 2009 13:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Flu Symptoms</title>\n\t\t\t<description>Learn about flu symptoms-stay home if you are sick; call CDC 800-232-4636 or http://m.cdc.gov for more info. Reply HEALTH QUIT to end. \n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200908</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200908</guid>\n\t\t\t<pubDate>Fri, 02 Oct 2009 13:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Seasonal Flu Shot</title>\n\t\t\t<description>Encourage friends &amp; family to get seasonal flu vaccine shot asap. Call CDC 800-232-4636 or http://m.cdc.gov for more info. Reply HEALTH QUIT to end\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200907</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200907</guid>\n\t\t\t<pubDate>Wed, 30 Sep 2009 13:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>H1N1 Flu Activity</title>\n\t\t\t<description>Flu activity is increasing in parts of U.S. So far, most flu is 2009 H1N1 flu. Call CDC 800-232-4636 or http://m.cdc.gov for more info. Reply HEALTH QUIT to end \n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200906</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200906</guid>\n\t\t\t<pubDate>Mon, 28 Sep 2009 13:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Seasonal Flu </title>\n\t\t\t<description>Encourage friends &amp; family to get seasonal flu vaccine as soon as available. Call CDC 800-232-4636 or http://m.cdc.gov for more info. Reply HEALTH QUIT to end.\n</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200905</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200905</guid>\n\t\t\t<pubDate>Fri, 25 Sep 2009 13:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Seasonal Flu Vaccine</title>\n\t\t\t<description>Get your seasonal flu vaccine now or as soon as it is available in your community. Call CDC 800-232-4636 or http://m.cdc.gov for more info. - CDC</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200857</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200857</guid>\n\t\t\t<pubDate>Wed, 23 Sep 2009 13:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Get plenty of sleep</title>\n\t\t\t<description>Get plenty of sleep to stay healthy. Call CDC 800-232-4636 or http://m.cdc.gov for more info. Reply HEALTH QUIT to end. - CDC</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200903</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200903</guid>\n\t\t\t<pubDate>Mon, 21 Sep 2009 13:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>H1N1 Flu</title>\n\t\t\t<description>Share 2009 H1N1 flu info from CDC with friends &amp; family. Call CDC 800-232-4636 or http://m.cdc.gov for more info. Reply HEALTH QUIT to end. - CDC</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200904</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=200904</guid>\n\t\t\t<pubDate>Sat, 19 Sep 2009 13:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Seasonal Flu</title>\n\t\t\t<description>Remember to get your seasonal flu vaccine; learn more at flu.gov. Call CDC 800-232-4636 or http://m.cdc.gov for more info. Reply HEALTH QUIT to end.\n- CDC</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=15590</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=15590</guid>\n\t\t\t<pubDate>Thu, 17 Sep 2009 13:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Flu.gov</title>\n\t\t\t<description>Get the latest science-based flu information at http://www.flu.gov. Call CDC 800-232-4636 or http://m.cdc.gov for more info. Reply HEALTH QUIT to end.\n- CDC</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=14991</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=14991</guid>\n\t\t\t<pubDate>Tue, 15 Sep 2009 13:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Salmonella</title>\n\t\t\t<description>US GOV/HHS Health Alert: Check salmonella-related peanut butter recalls from FDA at http://www.fda.gov/oc/opacom/hottopics/salmonellatyph.html. More info CDC 800-232-4636 or http://m.cdc.gov</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=10962</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=10962</guid>\n\t\t\t<pubDate>Mon, 23 Feb 2009 13:07:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Clean-up</title>\n\t\t\t<description>US GOV/HHS Health Alert: Never mix bleach and ammonia to clean; the fumes can kill you. More info CDC 800-232-4636 or http://m.cdc.gov</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=10142</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=10142</guid>\n\t\t\t<pubDate>Fri, 10 Oct 2008 10:36:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Mold Clean-up</title>\n\t\t\t<description>US GOV/HHS Health Alert: See or smell mold? Clean it with 1 cup household liquid bleach per 1 gallon water. More info CDC 800-232-4636 or http://m.cdc.gov</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=10141</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=10141</guid>\n\t\t\t<pubDate>Fri, 10 Oct 2008 10:35:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Candle Safety</title>\n\t\t\t<description>US GOV/HHS Health Alert: If candles are all you have, place them in safe holders away from things that can burn. More info CDC 800-232-4636 or http://m.cdc.gov</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=10140</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=10140</guid>\n\t\t\t<pubDate>Fri, 10 Oct 2008 10:34:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Carbon Monoxide Symptoms</title>\n\t\t\t<description>US GOV/HHS Health Alert: Carbon monoxide can cause headaches dizziness nausea and death. If concerned seek help. More info CDC 800-232-4636 or http://m.cdc.gov</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=10139</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=10139</guid>\n\t\t\t<pubDate>Fri, 10 Oct 2008 10:34:00 EST</pubDate>\n\t\t</item>\n\t\t<item>\n\t\t\t<title>Carbon Monoxide Warning</title>\n\t\t\t<description>URGENT safety alert from US Gov: Don't use generators/grills inside home, garage, carport. Carbon monoxide gas can kill! Call CDC 800-232-4636 for health info</description>\n\t\t\t<link>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=10138</link>\n\t\t\t<guid>http://www2c.cdc.gov/podcasts/download.asp?af=h&amp;f=10138</guid>\n\t\t\t<pubDate>Fri, 10 Oct 2008 10:32:00 EST</pubDate>\n\t\t</item>\n\t</channel>\n</rss>\n", message:undefined, modified:(new Date(1265732816125)), baseUri:"http://p3k.org/rss/", query:"frameColor=#669966&textColor=black&_=1241127844180&titleBarColor=#b28000&compact=true&fontFace=&align=&showXmlButton=true&maxItems=5&boxFillColor=white&titleBarTextColor=black&width=590&url=http://www2a.cdc.gov/podcasts/createrss.asp?c=185", param:{textColor:"black", width:"590", align:"", fontFace:"", url:"http://www2a.cdc.gov/podcasts/createrss.asp?c=185", compact:"true", frameColor:"#669966", showXmlButton:"true", boxFillColor:"white", _:"1241127844180", titleBarColor:"#b28000", 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();

