/* prototype lite minified */

var Class={create:function(){return function(){this.initialize.apply(this,arguments);}}}
Object.extend=function(destination,source){for(property in source)destination[property]=source[property];return destination;}
Function.prototype.bind=function(object){var __method=this;return function(){return __method.apply(object,arguments);}}
Function.prototype.bindAsEventListener=function(object){var __method=this;return function(event){__method.call(object,event||window.event);}}
function $(){if(arguments.length==1)return get$(arguments[0]);var elements=[];$c(arguments).each(function(el){elements.push(get$(el));});return elements;function get$(el){if(typeof el=='string')el=document.getElementById(el);return el;}}
if(!window.Element)var Element=new Object();Object.extend(Element,{remove:function(element){element=$(element);element.parentNode.removeChild(element);},hasClassName:function(element,className){element=$(element);if(!element)return;var hasClass=false;element.className.split(' ').each(function(cn){if(cn==className)hasClass=true;});return hasClass;},addClassName:function(element,className){element=$(element);Element.removeClassName(element,className);element.className+=' '+className;},removeClassName:function(element,className){element=$(element);if(!element)return;var newClassName='';element.className.split(' ').each(function(cn,i){if(cn!=className){if(i>0)newClassName+=' ';newClassName+=cn;}});element.className=newClassName;},cleanWhitespace:function(element){element=$(element);$c(element.childNodes).each(function(node){if(node.nodeType==3&&!/\S/.test(node.nodeValue))Element.remove(node);});},find:function(element,what){element=$(element)[what];while(element.nodeType!=1)element=element[what];return element;}});var Position={cumulativeOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;}while(element);return[valueL,valueT];}};document.getElementsByClassName=function(className){var children=document.getElementsByTagName('*')||document.all;var elements=[];$c(children).each(function(child){if(Element.hasClassName(child,className))elements.push(child);});return elements;}
Array.prototype.each=function(func){for(var i=0;ob=this[i];i++)func(ob,i);}
function $c(array){var nArray=[];for(i=0;el=array[i];i++)nArray.push(el);return nArray;}var rssBoxNarFeedUrl = "http://www.tcdailyplanet.net/rss_widget";

var rssBoxNarFeed = {"title":"Stories from Your Planet Today","items":[{"title":"May Day Cafe","link":"http:\/\/www.tcdailyplanet.net\/attractions\/may-day-cafe"},{"title":"Arts Orbit Radar 9\/9\/10","link":"http:\/\/www.tcdailyplanet.net\/news\/2010\/09\/07\/arts-orbit-radar-9910"},{"title":"Supporting reporting from California to Minnesota: Spot.Us has a new idea","link":"http:\/\/www.tcdailyplanet.net\/news\/2010\/09\/07\/supporting-reporting-spotus-has-new-idea"},{"title":"School advocates say anti-bullying laws needed, Emmer says no","link":"http:\/\/www.tcdailyplanet.net\/news\/2010\/09\/08\/school-advocates-say-anti-bullying-laws-needed-emmer-says-no"},{"title":"AGR\u2019s 2nd Annual African Arts Festival: A step in the right direction","link":"http:\/\/www.tcdailyplanet.net\/news\/2010\/09\/08\/agr%E2%80%99s-2nd-annual-african-arts-festival-step-right-direction"},{"title":"zAmya Theater looks at panhandling in Minneapolis","link":"http:\/\/www.tcdailyplanet.net\/news\/2010\/09\/04\/how-do-you-respond-when-asked-money"},{"title":"U set to formally drop Met Council lawsuit ","link":"http:\/\/www.tcdailyplanet.net\/news\/2010\/09\/07\/u-set-formally-drop-met-council-lawsuit"},{"title":"DreamHaven Books for your science fiction, fantasy, and horror needs ","link":"http:\/\/www.tcdailyplanet.net\/news\/2010\/09\/06\/dreamhaven-books-your-science-fiction-fantasy-and-horror-needs"},{"title":"Big League dreams come true","link":"http:\/\/www.tcdailyplanet.net\/news\/2010\/09\/04\/big-league-dreams-come-true"},{"title":"Daily Planet Deal Twitter feed","link":"http:\/\/www.tcdailyplanet.net\/daily-planet-deal-twitter-feed"}]};

/* writes a rss box for tcdailyplanet.net, coding by co-opmedia.org*/

// private variables
if (!rssBoxNarArrow)
	var rssBoxNarArrow = 'http://www.tcdailyplanet.net/sites/tcdailyplanet.net/modules/rss_widget/lib/arrowNormal.gif';

if (!rssBoxNarHomeLink)
	var rssBoxNarHomeLink = 'http://www.tcdailyplanet.net';

if (!rssBoxNarArrowOver)
	var rssBoxNarArrowOver = 'http://www.tcdailyplanet.net/sites/tcdailyplanet.net/modules/rss_widget/lib/arrowOver.gif';

if (!rssBoxNarBackgroundImage)
	var rssBoxNarBackgroundImage =  "http://www.tcdailyplanet.net/sites/tcdailyplanet.net/modules/rss_widget/lib/planetRssBottom.gif";

if (!rssBoxNarHeadline)
	var rssBoxNarHeadline = rssBoxNarFeed['title'];

if (!rssBoxNarHeadlineColor)
	var rssBoxNarHeadlineColor = "#4085c3";


if (!rssBoxNarBorderColor)
	var rssBoxNarBorderColor = "#4085c3";

if (!rssBoxNarBackgroundColor)
	var rssBoxNarBackgroundColor = "#fff";


if (!rssBoxNarItemColor)
	var rssBoxNarItemColor = "#000";

if (!rssBoxNarItemColorOver)
	var rssBoxNarItemColorOver = "#DA1920";


if (!rssBoxNarWidth)
	var rssBoxNarWidth = 160;

var rssBoxNarMaxHeight = 190;
if (rssBoxNarWidth <= 160){
	rssBoxNarMaxHeight = 175;
}

with(document){
	write('<div style=" height: 250px; width: '+rssBoxNarWidth+'px; border: 1px solid '+rssBoxNarBorderColor+'; background: '+rssBoxNarBackgroundColor+' url(\''+rssBoxNarBackgroundImage+'\') no-repeat bottom center; text-align: left; font: bold 12px/10px Arial, Helvetica, sans-serif; padding: 0px; overflow:hidden;" id="rssBoxNarFeedBox">');


	write('\t <h2 style="padding: 0px; margin: 3px 0px 0px 5px; text-align: left; font: bold 16px/18px Arial, Helvetica, sans-serif; width:'+rssBoxNarWidth+'px; color: '+rssBoxNarHeadlineColor+'; height:auto; background-image: none;">'+rssBoxNarHeadline+'</h2>');
	write('\t <div id="rssBoxNarNewsBox" style="width:'+(rssBoxNarWidth-10)+'px; height: 0px; overflow: hidden; margin: 5px 0px 0px 5px; float: left;">');
	write('<style type="text/css" media="screen">');
	write('ul#rssBoxNarFeedList li{ list-style: none outside url('+rssBoxNarArrow+'); margin-bottom: 8px; }');
	write('ul#rssBoxNarFeedList li:hover{ list-style: none outside url('+rssBoxNarArrowOver+'); }');
	write('ul#rssBoxNarFeedList li a{ color: '+rssBoxNarItemColor+'; text-decoration: none; background-image: none;}');
	write('ul#rssBoxNarFeedList li a:hover{ color: '+rssBoxNarItemColorOver+'; }' );
	write('</style>');
	write('\t <ul id="rssBoxNarFeedList" style="margin: 0px; padding: 0px 0px 0px 17px; line-height: 14.2px; text-align: left; font: bold 12px/14px Arial, Helvetica, sans-serif; list-style: none outside url('+rssBoxNarArrow+'); background-image: none;">');
}
for (var iCount=0; iCount < rssBoxNarFeed.items.length; iCount++) {
	document.write('\t\t <li class="rssBoxNarNewsItem" style="font: bold 12px/14px Arial, Helvetica, sans-serif;padding:0;marign:0; margin-bottom: 5px; background-image: none;"><a href="'+ rssBoxNarFeed.items[iCount].link +'" style=" font: bold 12px/14px Arial, Helvetica, sans-serif;color:#000;padding:0;marign:0px; background-image: none;">'+ rssBoxNarFeed.items[iCount].title + '</a></li>');
};

with(document){
	write('\t </ul>');
	write('\t </div>');
	write('<a href="'+ rssBoxNarHomeLink +'" style="border:0; height: 55px; width: 100%; display: none;margin-top:180px;" id="rssBoxNarRssLink"></a>');
	write('</div>');
}
var rssBoxNarLis = document.getElementsByClassName('rssBoxNarNewsItem');
var rssBoxNarHeight = 0;
rssBoxNarLis.each(function(rssBoxNarLi){
rssBoxNarHeight += rssBoxNarLi.scrollHeight+8;
if (rssBoxNarHeight >rssBoxNarMaxHeight){
	rssBoxNarLi.style.display="none";
}
});
$('rssBoxNarNewsBox').style.height= rssBoxNarMaxHeight+"px";
$('rssBoxNarRssLink').style.display= "block";
