// Feedo Style
// ----------------------------------------------------
// Feedo Style code version: X.5
// More info available at http://http://www.feedostyle.com/
// ----------------------------------------------------
// Copyright 2007 Myzan Ltd. All rights reserved.





if (!window.FeedoStyle){  FeedoStyle =
 {  
   _feedUrls :[],
  
   _digests :[],
  
   _engines :[],
  
   _timers :[],
     
      clearTimer :function(timerId){      
       if (FeedoStyle._timers[timerId]){    window.clearTimeout(FeedoStyle._timers[timerId]);  }   FeedoStyle._timers[timerId]=null;     },
  
   DigestFormats :{       STATIC :'static',
       VERTICAL_MARQUEE :'vertical_marquee',
       FADING_TAPE :'fading_tape',
       ROLLING :'rolling',
       FULL_PAGE :'full_page'
  },
  
      ElementNames :{      
       FEEDO_STYLE_SCRIPT :'feedostyle_engine',
       FEEDO_STYLE_FEED_REQUEST :'feedostyle_feed_request',
       FEEDO_STYLE_THEME :'feedostyle_theme',
       FEEDO_STYLE_DOM_HOOK :'feedostyle',
      
       DIGEST_CONTAINER :'feedostyle_digest_container',
       DIGEST_BODY :'feedostyle_digest_body',
          DIGEST_HEADER :'feedostyle_digest_header', 
          DIGEST_FOOTER :'feedostyle_digest_footer', 
          DIGEST_ENTRY_AREA :'feedostyle_digest_entry_area', 
          DIGEST_ENTRY_LIST :'feedostyle_digest_entry_list', 
          DIGEST_TITLE :'feedostyle_digest_title', 
          DIGEST_SUBTITLE :'feedostyle_digest_subtitle',
          DIGEST_SOURCE :'feedostyle_digest_source',
          DIGEST_SOURCE_URL :'feedostyle_digest_source_url',
          DIGEST_ENTRY :'feedostyle_digest_entry',   
          DIGEST_ENTRY_TITLE :'feedostyle_digest_entry_title',
          DIGEST_ENTRY_TITLE_LINK :'feedostyle_digest_entry_title_link',
          DIGEST_ENTRY_DATE_TIME :'feedostyle_digest_entry_date_time',
          DIGEST_ENTRY_DATE :'feedostyle_digest_entry_date',
          DIGEST_ENTRY_TIME :'feedostyle_digest_entry_time',
          DIGEST_SUMMARY :'feedostyle_digest_summary',
          DIGEST_MEDIA :'feedostyle_digest_media', 
          DIGEST_ICON :'feedostyle_digest_icon',   
          DIGEST_LOGO :'feedostyle_digest_logo',  
          DIGEST_COPYRIGHT :'feedostyle_digest_copyright', 
          DIGEST_AUTHOR :'feedostyle_digest_author',     
          DIGEST_COLLAPSE :'feedostyle_digest_collapse',      
      
       PRELOADER :'feedostyle_preload',
       PRELOADER_TEXT :'feedostyle_preload_text',
       PRELOADER_BAR :'feedostyle_preload_bar',
      
       EDIT_CONTAINER :'feedostyle_edit_container',
       EDIT_PROPERTY :'feedostyle_edit_property',
       EDIT_VALUE :'feedostyle_edit_value',
      
          SCRAPER_CONTAINER :'feedostyle_scraper_container',
          SCRAPER_HEADER :'feedostyle_scraper_header',
          SCRAPER_TITLE:'feedostyle_scraper_title',
          SCRAPER_FIELDS:'feedostyle_scraper_fields',
          SCRAPER_URL_FIELD :'feedostyle_scraper_url',
          SCRAPER_GO_FIELD :'feedostyle_scraper_go',
          SCRAPER_TIMEOUT :'feedostyle_scraper_timeout',
          SCRAPER_TOGGLE_OPEN :'feedostyle_scraper_toggle_open',
          SCRAPER_TOGGLE_CLOSE :'feedostyle_scraper_toggle_close',
          SCRAPER_FEEDS :'feedostyle_scraper_feeds',
          SCRAPER_FEEDS_LIST :'feedostyle_scraper_feeds_list',
         
          MESSAGE_AREA :'feedostyle_message_area',
          MESSAGE_IDLE :'feedostyle_message_idle',
          MESSAGE_LOADING :'feedostyle_message_loading',
          MESSAGE_WARNING :'feedostyle_message_warning',
          MESSAGE_ERROR :'feedostyle_message_error'
     },
      
      Strings :{       CONTACT_DETAILS :'\n Please contact the FeedoStyle Staff (http://www.feedostyle.com/contact.aspx) for support.',
       SETTINGS_ERROR:'Error 106: Please provide the correct Feedo Style digest Id along with the script tag.',
          UNABLE_TO_CREATE_ERROR:'Error 107: Feedo Style was unable to create the Digest.\n Be sure to have placed the script code in the BODY of the page.',
          RENDERING_ENGINE_UNAVAILABLE_ERROR :'Error 108: Feedo Style was unable to render the Digest.',
          SCRIPT_PLACEMENT_ERROR :'Error 109: The Feedo Style script should be placed inside the BODY tag of the current page.',
          REDRAW_MISSING_ID_ERROR :'Error 110: To redraw a Feedo Style Digest you must specify the correct ID.',
          DESTROY_MISSING_ID_ERROR :'Error 111: To destroy a Feedo Style Digest you must specify the correct ID.',
          INVALID_DIGEST_ID_ERROR :'Error 112: The provided Digest ID is invalid.',
          NO_ENTRIES_FOUND :'<p>No entries found for the digest.</p>',
          SCRAPER_TITLE :'Feed scraper',
          ENTER_FEED_URL :'Enter the address of a website or feed:',
          INVALID_URL :'Please insert the address of a feed or website in the text box.',
          NO_FEEDS_FOUND :'The address entered doesn\'t contain valid feeds.',
          DEFAULT_FEED_URL :'www.cnn.com',
          SCRAPER_TOGGLE_CLOSE :'\u2227',
          SCRAPER_TOGGLE_OPEN :'\u2228',
          DIGEST_COLLAPSE :'more',
          SCRAPER_GO_BUTTON :'Go!',
          FEEDOSTYLE_AREA_MISSING :'Feedo Style wasn\'t initialized properly. A reference to the area where the Feedo Style should be rendered (\'FEEDOSTYLE_AREA\') is missing.',
          LOADING_UNKNOWN_FEED :'Looking for feeds from',
          LOADING_KNOWN_FEED :'Loading feed from',
          LOADING_DIGEST :'Loading digest',
          PLEASE_WAIT :'Please wait...',
          PRELOADING :'Loading graphics...'        
     },
     
      Constants :{      
       ERROR_MSG :1,
       INFO_MSG :2,
       WARNING_MSG :4,
       LOADING_MSG :8,
      
      
       ROUNDED_CORNER_SIZE :10,
       ROUNDED_CORNER_PREFIX :'frame_',
      
      
       TRUNCATE_LENGTH :50,
      
       RETRY_DELAY :100, 
       RETRY_COUNT :15, 
      
       FAKE_LINK_HREF :'#',
       POPUP_SETTINGS :'resizable=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,menubar=yes',
       SCRIPTS_URL :'http://digest.feedostyle.com/',
       NEWS_URL :'http://news.feedostyle.com/', 
       SCRIPTS_PATH :'',
       FEED_REQUEST_SCRIPT :'feeds',
       THEME_PATH :'themes/',
       DEFAULT_THEME :'gold'
     } };};FeedoStyle.CreateFeedoStyle =function(settings){ 
  if (window.feedostyle_no_render){   return; } 
  if (!window.feedostyle_id &&(!settings ||!settings.id)) {  
   throw  new  Error(FeedoStyle.Strings.SETTINGS_ERROR
   +FeedoStyle.Strings.CONTACT_DETAILS); } 
 
  if (!settings){   settings ={}; } 
  var  pageSettings ={};  if (window.feedostyle_id){   pageSettings.id =FeedoStyle.parseId(window.feedostyle_id); }  if (!settings ||!settings.format){   pageSettings.format =FeedoStyle.evaluateDigestFormat(window.feedostyle_format); }  pageSettings.showTitle =window.feedostyle_show_title;  pageSettings.showCaption =window.feedostyle_show_caption;  pageSettings.title =window.feedostyle_title;  pageSettings.subtitle =window.feedostyle_subtitle;  pageSettings.theme =window.feedostyle_theme;  pageSettings.parentElement =window.feedostyle_parent_element;  pageSettings.showFeedScraper =window.feedostyle_show_scraper;  pageSettings.showDate =window.feedostyle_show_date;  pageSettings.showTime =window.feedostyle_show_time;  pageSettings.showSummary =window.feedostyle_show_summary;  pageSettings.showAuthor =window.feedostyle_show_author;  pageSettings.showCopyright =window.feedostyle_show_copyright;  pageSettings.showSource =window.feedostyle_show_source;  pageSettings.newWindowLinks =window.feedostyle_new_window_links;  pageSettings.stripTags =window.feedostyle_strip_tags;  pageSettings.fontSize =window.feedostyle_font_size;  pageSettings.roundedCorners =window.feedostyle_rounded_corners;  pageSettings.pauseTime =window.feedostyle_pause_time;  pageSettings.summaryLength =window.feedostyle_summary_length;  pageSettings.defaultFeedUrl =window.feedostyle_default_feed_url; 
 
  pageSettings.captionTitleColor =window.feedostyle_caption_title_color;  pageSettings.captionSubtitleColor =window.feedostyle_caption_subtitle_color;  pageSettings.foregroundColor =window.feedostyle_foreground_color;  pageSettings.linkColor =window.feedostyle_foreground_color;  pageSettings.backgroundColor =window.feedostyle_background_color;  pageSettings.borderColor =window.feedostyle_border_color;  pageSettings.pageBackgroundColor =window.feedostyle_page_background_color; 
  pageSettings.height =window.feedostyle_height;  pageSettings.width =window.feedostyle_width;  pageSettings.entrySpacing =window.feedostyle_entry_spacing;  pageSettings.entryCount =window.feedostyle_entry_count;  pageSettings.collapseOverflow =window.feedostyle_collapse_overflow; 
 
  settings =FeedoStyle.__mergeSettings(pageSettings,settings); 
     if (!window.feedostyle_settings){   window.feedostyle_settings =[]; }  window.feedostyle_settings[settings.id]=settings; 
    
     this.loadTheme(settings.id,settings.theme); 
 
 
  this.__createDomHook(settings.id,settings.parentElement); 
 
  FeedoStyle.__createDigest(settings); 
 
  if (settings.defaultFeedUrl){      FeedoStyle.__loadFeed(settings.id,FeedoStyle.formatFeedURL(settings.defaultFeedUrl),false); }else {      FeedoStyle.fetchFeeds(settings.id); 
 }};FeedoStyle.loadDigest =function(id,digest){  id =FeedoStyle.parseId(id);  if (!this._digests[id]){   return; } 
  var  m =FeedoStyle.$(this.ElementNames.MESSAGE_AREA +id);  FeedoStyle.clearChildren(m,true);  this._digests[id].load(digest);};FeedoStyle.getDigest =function(id){  id =FeedoStyle.parseId(id);  if (!this._digests[id]){   return  null; }  return  this._digests[id]._digest;};FeedoStyle.promptFeeds =function(id,feeds){  id =FeedoStyle.parseId(id);  if (!this._digests[id]){   return; } 
  var  m =FeedoStyle.$(this.ElementNames.MESSAGE_AREA +id);  FeedoStyle.clearChildren(m,true); 
  var  scr =FeedoStyle.$(this.ElementNames.SCRAPER_FEEDS +id);  var  scraper =FeedoStyle.$(this.ElementNames.SCRAPER_CONTAINER +id);  var  list =FeedoStyle.$(this.ElementNames.SCRAPER_FEEDS_LIST +id); 
  scr.style.display ='block';    
  scr.style.top =(scraper.offsetTop +scraper.offsetHeight)+'px';  scr.style.left =scraper.offsetLeft +'px';  scr.style.width =(scraper.offsetWidth -2)+'px';  scr.onclick =function(){   this.style.display ='none'; }; 
  list.innerHTML =''; 
  for (var  i =0;i <feeds.length;i++){   var  feed =feeds[i];   feed.url =decodeURIComponent(feed.url);   feed.title =unescape(feed.title);   feed.title =feed.title.replace(/\+/gi,' ');   var  link =[];   link.push('<li><a href="#" onclick="FeedoStyle.fetchFeed(\'');   link.push(id);   link.push('\',\''); 
   link.push(feed.url);   link.push('\', true);return false;">');   link.push(feed.title);  
   link.push('</a>');   link.push('</li>');   list.innerHTML +=link.join('');        
 } 
};FeedoStyle.evaluateDigestFormat =function(format){ 
  format +='';format =format.toLowerCase();format =FeedoStyle.trim(format); 
  if (FeedoStyle.contains(FeedoStyle.DigestFormats,format)){   return  format; }else {  return  FeedoStyle.DigestFormats.VERTICAL_MARQUEE; }};FeedoStyle.parseId =function(rawId){  if (!rawId ||typeof  rawId !='string'){   throw  new  Error(FeedoStyle.Strings.INVALID_DIGEST_ID_ERROR
   +FeedoStyle.Strings.CONTACT_DETAILS); } 
  rawId =FeedoStyle.trim(rawId);  rawId =rawId.replace(/[^\dA-F]+/gi,'');  rawId =rawId.toLowerCase(); 
  if (rawId.length ==0){   throw  new  Error(FeedoStyle.Strings.INVALID_DIGEST_ID_ERROR
   +FeedoStyle.Strings.CONTACT_DETAILS); } 
  return  rawId;};FeedoStyle.fetchFeeds =function(id){  id =FeedoStyle.parseId(id);var  query =[];query.push('id=');query.push(id);query.push('&seed=');query.push(FeedoStyle.generateId());query.push('&ref=');query.push(window.location.hostname);var  buffer =[];buffer.push('<p>');buffer.push(this.Strings.LOADING_DIGEST);buffer.push('<br \/>');buffer.push(this.Strings.PLEASE_WAIT);buffer.push('</p>');this.displayMessage(id,FeedoStyle.Constants.LOADING_MSG,buffer.join('')); 
     FeedoStyle.__loadScript(this.Constants.FEED_REQUEST_SCRIPT,id,query.join(''));};FeedoStyle.__createDigest =function(settings){ 
  if (!FeedoStyle.Digests){  throw  new  Error(FeedoStyle.Strings.RENDERING_ENGINE_UNAVAILABLE_ERROR
      +FeedoStyle.Strings.CONTACT_DETAILS); 
 } 
 
    
     switch (settings.format){  case  this.DigestFormats.STATIC:
          this._digests[settings.id]=new  FeedoStyle.Digests.Static(settings); 
          this._digests[settings.id].format =this.DigestFormats.STATIC;   break; 
         case  this.DigestFormats.ROLLING:
          this._digests[settings.id]=new  FeedoStyle.Digests.Rolling(settings);  
          this._digests[settings.id].format =this.DigestFormats.ROLLING;   break; 
         case  this.DigestFormats.FULL_PAGE:
          this._digests[settings.id]=new  FeedoStyle.Digests.FullPage(settings);  
          this._digests[settings.id].format =this.DigestFormats.FULL_PAGE;   break; 
         default:
          this._digests[settings.id]=new  FeedoStyle.Digests.VerticalMarquee(settings); 
          this._digests[settings.id].format =this.DigestFormats.VERTICAL_MARQUEE;   break;}};FeedoStyle.updateStyles =function(id,settings){  if (!id){   throw  new  Error(FeedoStyle.Strings.REDRAW_MISSING_ID_ERROR
      +FeedoStyle.Strings.CONTACT_DETAILS); }  if (!settings){   return; }  id =FeedoStyle.parseId(id); 
  settings =FeedoStyle.__mergeSettings(this._digests[id].settings,settings);  settings.id =id; 
  this._digests[id].settings =settings;  this._digests[id].updateStyles();};FeedoStyle.__mergeSettings =function(oldSettings,newSettings){  if (!oldSettings){   return  newSettings; }  for (var  setting  in  oldSettings){   if (typeof  newSettings[setting]=='undefined'){    newSettings[setting]=oldSettings[setting];  } }  return  newSettings; 
};FeedoStyle.redraw =function(id,settings){  if (!id){   throw  new  Error(FeedoStyle.Strings.REDRAW_MISSING_ID_ERROR
      +FeedoStyle.Strings.CONTACT_DETAILS); }  id =FeedoStyle.parseId(id);  FeedoStyle.destroyDigest(id);  if (window.feedostyle_settings &&window.feedostyle_settings[id]&&!window.demo_page){   settings =FeedoStyle.__mergeSettings(settings,window.feedostyle_settings[id]); }else {   settings =FeedoStyle.__mergeSettings(this._digests[id].settings,settings); } 
  settings.id =id;  settings.format =FeedoStyle.evaluateDigestFormat(settings.format); 
 
 
  if (this._digests[id].theme !=settings.theme){   FeedoStyle.loadTheme(id,settings.theme); } 
  if (this._digests[id].format !=settings.format){   var  oldDigest =this._digests[id]._digest;   FeedoStyle.__createDigest(settings);   this._digests[id].load(oldDigest); }else {   this._digests[id].init(settings); }  if (this._digests[id].entries){   var  m =FeedoStyle.$(this.ElementNames.MESSAGE_AREA +id);   m.style.display ='none'; }};FeedoStyle.destroyDigest =function(id){  if (!id){   throw  new  Error(FeedoStyle.Strings.DESTROY_MISSING_ID_ERROR
      +FeedoStyle.Strings.CONTACT_DETAILS); }  id =FeedoStyle.parseId(id); 
  if (!this._digests[id]){   throw  new  Error(FeedoStyle.Strings.INVALID_DIGEST_ID_ERROR
      +FeedoStyle.Strings.CONTACT_DETAILS); }  this._digests[id].destroyDigest(); 
  FeedoStyle.clearChildren(this.ElementNames.FEEDO_STYLE_DOM_HOOK +id);};FeedoStyle.__loadFeed =function(id,url,isKnownFeed){var  query =[];query.push('url=');query.push(escape(url));if (id){query.push('&id=');query.push(id);};query.push('&referer=');query.push(window.location.hostname);query.push('&seed=');query.push(FeedoStyle.generateId());  if (!isKnownFeed){  query.push('&src=q'); };FeedoStyle.__loadScript(this.Constants.FEED_REQUEST_SCRIPT,id,query.join(''));};FeedoStyle.__loadScript =function(name,id,query){  var  s =document.createElement('script');  s.id =name +'_' +id;  s.type ='text/javascript'; 
  s.src =this.Constants.SCRIPTS_URL +this.Constants.SCRIPTS_PATH +name +'.js?' +query;  this.__appendToHead(s);};FeedoStyle.loadTheme =function(id,theme){  var  css =FeedoStyle.$(this.ElementNames.FEEDO_STYLE_THEME +'_' +id);  
 
  if (!theme){   theme =FeedoStyle.Constants.DEFAULT_THEME; }  
 
 
  theme =theme.toLowerCase().replace(/[^\w_]+/gi,''); 
 
 
     css =document.createElement("link");css.id =this.ElementNames.FEEDO_STYLE_THEME +'_' +id;  css.rel ="stylesheet";  css.type ="text/css";  css.href =this.Constants.SCRIPTS_URL +theme +'.css?id=' +id; 
 
 
  this.__appendToHead(css);};FeedoStyle.handleClick =function(id,url){var  digest =FeedoStyle._digests[id];if (digest.settings &&digest.settings.newWindowLinks){window.open(url,'_feedoStyle',FeedoStyle.Constants.POPUP_SETTINGS);}else {window.location.href =url;}};FeedoStyle.purge =function(el){var  a =el.attributes,i,l,n;if (a){l =a.length;for (i =0;i <l;i +=1){n =a[i].name;if (typeof  el[n]==='function'){el[n]=null;}}};a =el.childNodes;if (a){l =a.length;for (i =0;i <l;i +=1){this.purge(el.childNodes[i]);}}};FeedoStyle.fetchFeed =function(id,url,isKnownFeed){url =FeedoStyle.formatFeedURL(url);if (!this.__isValidURI(url)){return;};var  digest =this._digests[id];if (!digest){return;};var  buffer =[];buffer.push('<p>');if (isKnownFeed){  buffer.push(this.Strings.LOADING_KNOWN_FEED);}else {  buffer.push(this.Strings.LOADING_UNKNOWN_FEED);};buffer.push('<br \/>');buffer.push('<strong>');buffer.push(url);buffer.push('</strong>');buffer.push('<br \/>');buffer.push(this.Strings.PLEASE_WAIT);buffer.push('</p>');this.displayMessage(id,FeedoStyle.Constants.LOADING_MSG,buffer.join(''));FeedoStyle.clearChildren(this._digests[id].getEntryList()); 
  this.__loadFeed(id,url,isKnownFeed); 
};FeedoStyle.fetchTextboxFeed =function(id,isKnownFeed){var  field =FeedoStyle.$(this.ElementNames.SCRAPER_URL_FIELD +id);if (!field){return;};var  url =FeedoStyle.formatFeedURL(field.value);if (!FeedoStyle.__isValidURI(url)){this.displayMessage(id,FeedoStyle.Constants.ERROR_MSG,this.Strings.INVALID_URL);return;};field.value =url;this.fetchFeed(id,url,isKnownFeed);};FeedoStyle.displayMessage =function(id,type,message){ 
  var  m =FeedoStyle.$(this.ElementNames.MESSAGE_AREA +id);  m.style.display ='block';  FeedoStyle.clearChildren(m,true);switch(type){  case  FeedoStyle.Constants.ERROR_MSG:
       m.className =this.ElementNames.MESSAGE_ERROR;   break;  case  FeedoStyle.Constants.INFO_MSG:
       m.className =this.ElementNames.MESSAGE_IDLE;   break;  case  FeedoStyle.Constants.WARNING_MSG:
       m.className =this.ElementNames.MESSAGE_WARNING;   break;  case  FeedoStyle.Constants.LOADING_MSG:
       m.className =this.ElementNames.MESSAGE_LOADING;   break;  default:
       m.className ='';   break;};if (typeof  message =='string'){  m.innerHTML =message;}else {m.appendChild(message);}};FeedoStyle.displayError =function(id,message){  this.displayMessage(id,FeedoStyle.Constants.ERROR_MSG,message);};FeedoStyle.displayNotice =function(id,message){  this.displayMessage(id,FeedoStyle.Constants.INFO_MSG,message);};FeedoStyle.__appendToHead =function(element){  if (!element){   return; }  try {  
  
      if (document.documentElement &&document.documentElement.childNodes){       var  head =document.documentElement.childNodes[0];      
      
      
          if (element.id &&head.childNodes){              for (var  i =0;i <head.childNodes.length;i++){                  if (head.childNodes[i].id ==element.id){ 
                      head.removeChild(head.childNodes[i]);                 }             }         }          head.appendChild(element);     }      else {       var  head =document.getElementsByTagName('head');       if (head.length >0){        head[0].appendChild(element);      }else {        document.getElementsByTagName('body')[0].appendChild(element);      }     } }catch(ex){   alert(ex); }};FeedoStyle.toggleFeedScraper =function(id){  var  scraper =FeedoStyle.$(this.ElementNames.SCRAPER_CONTAINER +id);  var  toggleOpen =FeedoStyle.$(this.ElementNames.SCRAPER_TOGGLE_OPEN +id);  var  digest =this._digests[id];  
     if (!scraper){  return;};if (!digest.scraperIsOpen){toggleOpen.style.display ='none';  scraper.style.display ='block';  if (digest.preferences){      digest.preferences.set('showScraper',true); }}else {  scraper.style.display ='none';toggleOpen.style.display ='block';  if (digest.preferences){      digest.preferences.set('showScraper',false); }}  digest.scraperIsOpen =!digest.scraperIsOpen;};FeedoStyle.toggleCollapse =function(id){  id =FeedoStyle.parseId(id);  this._digests[id].toggleCollapse();};FeedoStyle.keyboardTrap =function(event,id){if (window.event &&window.event.keyCode ==13){   this.fetchTextboxFeed(id);return  false;}else  if (event &&event.keyCode==13){   this.fetchTextboxFeed(id);event.returnValue =false;return  false;};return  true;};FeedoStyle.__isValidURI =function(uri){ 
 
  if (!uri ||uri.length <10){   return  false; };var  urlRegex =/^http:\/\/([\w\d-_]+\.?)+(\/.*)*$/i;if (!urlRegex.test(uri)){return  false;};if (uri.indexOf('.')==-1){return  false;};return  true;};FeedoStyle.formatFeedURL =function(uri){if (!uri){return  null;};uri =uri.replace(/^\s*(\S*(\s+\S+)*)\s*$/,'$1');if (uri.indexOf('://')==-1){uri ='http://' +uri;};if (uri.indexOf('feed://')!=-1){  uri =uri.replace(/feed:/gi,'http:');};return  uri;};FeedoStyle.setDigestTitle =function(id,title){  id =FeedoStyle.parseId(id);  var  el =FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_TITLE +id);  if (el){   el.innerHTML =title; }};FeedoStyle.setDigestSubtitle =function(id,subtitle){  id =FeedoStyle.parseId(id);  var  el =FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_SUBTITLE +id);  if (el){   el.innerHTML =subtitle; }};FeedoStyle.__createDomHook =function(id,parentElement){ 
  parentElement =FeedoStyle.$(parentElement); 
 
  if (parentElement){   var  hook =FeedoStyle.$(this.ElementNames.FEEDO_STYLE_DOM_HOOK +id);   if (!hook){    var  hook =document.createElement('div');    hook.id =this.ElementNames.FEEDO_STYLE_DOM_HOOK +id;  }   hook.innerHTML ='';   parentElement.appendChild(hook); }else {   var  hook =FeedoStyle.$(this.ElementNames.FEEDO_STYLE_DOM_HOOK +id);   if (hook){    hook.innerHTML ='';    return;  }      var  buffer =[];     
     
      buffer.push('<div id="');      buffer.push(this.ElementNames.FEEDO_STYLE_DOM_HOOK);      buffer.push(id);      buffer.push('"><\/div>');     
     
      document.write(buffer.join(''));      document.close();     
     
     
     
      var  el =FeedoStyle.$(this.ElementNames.FEEDO_STYLE_DOM_HOOK +id);      if (!el){    throw  new  Error(FeedoStyle.Strings.SCRIPT_PLACEMENT_ERROR
    +FeedoStyle.Strings.CONTACT_DETAILS);     } }};FeedoStyle.Preloader =function(id){  this.id =id;  this._images =[];  this._imagesCount =0;  var  imagesLoaded =0;  var  imageCurrent =0;  var  preloadWidth =0;  var  progressBar =null;  this._completeHandler =null;  var  renderElements =function(){   var  box =document.createElement('div');   box.className =ElementNames.PRELOADER;   var  content =document.createElement('div');   var  text =document.createElement('p');   text.className =ElementNames.PRELOADER_TEXT;   text.appendChild(document.createTextNode(Strings.PRELOADING));   content.appendChild(text);   progressBar =document.createElement('div');   progressBar.className =  ElementNames.PRELOADER_BAR;   content.appendChild(progressBar);   box.appendChild(content);  
   var  hook =FeedoStyle.$(ElementNames.FEEDO_STYLE_DOM_HOOK +this.id);   hook.appendChild(box); };  var  onloadHandler =function(){  
   this.onload =null;   imagesLoaded++;   if (imagesLoaded <this._imagesCount){    updateProgress();    window.setTimeout(loadNext,20);   
  }else {    window.setTimeout(preloadComplete,20);  } };  var  updateProgress =function(){   var  percentage =imagesLoaded/this._imagesCount;   var  currentWidth =percentage *preloadWidth;   progressBar.style.width =currentWidth +'px'; }; 
    var  preloadComplete =function(){   if (this.preloadCompleteHandler)   this.preloadCompleteHandler(); }; 
    var  PreloadImage =function(src){      var  path =src;      var  image =new  Image();      this.startLoad =function(){       image.onload =onloadHandler;       image.src =path;     } };};FeedoStyle.Preloader.prototype.__loadNext =function(){  this._images[imageCurrent++].startLoad();};FeedoStyle.Preloader.prototype.addImages =function(){  for (var  i =0;i <arguments.length;i++){   this._images.push(new  PreloadImage(arguments[i]));   this._imagesCount++; }};FeedoStyle.Preloader.prototype.start =function(){  this.__loadNext();};FeedoStyle.Preloader.prototype.setCompleteHandler =function(completeHandler){  if (completeHandler){   this._completeHandler =completeHandler; }};FeedoStyle.$ =function(){  var  results =[],element;  for (var  i =0;i <arguments.length;i++){  element =arguments[i];  if (typeof  element =='string'){  element =document.getElementById(element); }  results.push(element); }  return  results.length <2 ?results[0]:results;};FeedoStyle.getElementsByClassName =function(className,parentElement){  var  children =(FeedoStyle.$(parentElement)||document.body).getElementsByTagName('*');  var  elements =[];  for (var  i =0;i <children.length;i++){  if (children[i].className.match(new  RegExp("(^|\\s)" +className +"(\\s|$)"))){    elements.push(children[i]); } }  return  elements;};FeedoStyle.getAlphaShade =function(foreground,background,alpha){  if (foreground.indexOf('#')!=-1){   foreground =foreground.substr(1); }  if (background.indexOf('#')!=-1){   background =background.substr(1); }  if (!alpha) {   alpha =0.5; } 
  var  redFore =parseInt(foreground.substr(0,2),16);  var  greenFore =parseInt(foreground.substr(2,2),16);  var  blueFore =parseInt(foreground.substr(4,2),16);  var  redBack =parseInt(background.substr(0,2),16);  var  greenBack =parseInt(background.substr(2,2),16);  var  blueBack =parseInt(background.substr(4,2),16); 
  redFore =redFore *alpha +redBack *(1 -alpha);  greenFore =greenFore *alpha +greenBack *(1 -alpha);  blueFore =blueFore *alpha +blueBack *(1 -alpha); 
  redFore =Math.min(redFore,255);  greenFore =Math.min(greenFore,255);  blueFore =Math.min(blueFore,255); 
  redFore =FeedoStyle.numberToColorPart(redFore);  greenFore =FeedoStyle.numberToColorPart(greenFore);  blueFore =FeedoStyle.numberToColorPart(blueFore); 
  return '#' +redFore +greenFore +blueFore;};FeedoStyle.generateId =function(){var  id =['fs'];for(var  i =0;i <20;i++){   id.push(Math.floor(Math.random()*0xF).toString(0xF));};return  id.join('');};FeedoStyle.stripTags =function(value){  return  value.replace(/<\/?[^>]+>/gi,'');};FeedoStyle.clearChildren =function(el,clearClass){el =FeedoStyle.$(el);if (!el){return;};this.purge(el);if (clearClass){el.className ='';};while(el.hasChildNodes()){el.removeChild(el.childNodes[0]);}};FeedoStyle.addEvent =function(el,type,fn){  el =FeedoStyle.$(el);  if (el.addEventListener){   el.addEventListener(type,fn,false); }  else  if (el.attachEvent) {   el["e" +type +fn]=fn;   el[type +fn]=function(){    el["e" +type +fn](window.event);  };   el.attachEvent("on" +type,el[type +fn]); }};FeedoStyle.removeEvent =function(el,type,fn){  el =FeedoStyle.$(el);  if (el.removeEventListener){   el.removeEventListener(type,fn,false); }  else  if (el.detachEvent) {   el.detachEvent("on" +type,el[type +fn]);   el[type +fn]=null;   el["e" +type +fn]=null; }};if (typeof  Array.prototype.push =='undefined'){  Array.prototype.push =function(){   for (i =0;i <arguments.length;i++){    this[this.length]=arguments[i];  }   return  this.length; }};FeedoStyle.isAbsoluteUnit =function(value){  value =FeedoStyle.parseUnit(value);  if (typeof  value =='undefined'){   return  false; }  if (value ==0){   return  true; } 
  if (typeof  value =='string' &&value.indexOf('px')!=-1){   return  true; }else {   return  false; }};FeedoStyle.parseUnit =function(value){  if (typeof  value =='undefined' ||isNaN(parseInt(value))) {   return  value; } 
  if (parseInt(value)==0){   return  0; } 
  if (typeof  value =='string' &&
    (value.indexOf('%')!=-1 
  ||value.indexOf('em')!=-1 
  ||value.indexOf('pt')!=-1
  ||value.indexOf('px')!=-1
  ||value.indexOf('auto')!=-1)) {   return  value; }else {   return  FeedoStyle.numberToPixels(value); }};FeedoStyle.contains =function(object,value){  for(var  id  in  object){   if (value ==object[id])    return  true; }  return  false;};FeedoStyle.numberToColorPart =function(number){  number =parseInt(number);  var  digits =number.toString(16);  if (number <16){   return '0' +digits; }  return  digits;};FeedoStyle.numberToPixels =function(number){  number =parseInt(number);  if (isNaN(number)){   return  0; }else {   return  Math.floor(number)+'px'; }};FeedoStyle.trim =function(string){  return  string.replace(/^\s+/,'').replace(/\s+$/,'');};FeedoStyle.arrayToRgbColor =function(array){  if (array.length <3)   return ''; 
  var  buffer =[];  buffer.push('rgb(');  buffer.push(Math.floor(parseInt(array[0])));  buffer.push(',');  buffer.push(Math.floor(parseInt(array[1])));  buffer.push(',');  buffer.push(Math.floor(parseInt(array[2])));  buffer.push(')'); 
  return  buffer.join('');};FeedoStyle.arrayToHexColor =function(array){  if (array.length <3)   return ''; 
  var  color ='#';  for (var  i =0;i <3;i++){   color +=FeedoStyle.numberToColorPart(parseInt(array[i])); } 
  return  color;};FeedoStyle.stringToHexColor =function(value){  if (!value){   return  null; }  var  color ='#';  value =FeedoStyle.trim(value); 
  if (value.slice(0,4)=='rgb(') {   var  cols =value.replace(/[^\d,]+/gi,'').split(',');   for (var  i =0;i <3;i++){    color +=FeedoStyle.numberToColorPart(parseInt(cols[i]));  } }  else  if (value.slice(0,1)=='#'){   if(value.length ==4){    for(var  i =1;i <4;i++){     color +=(value.charAt(i)+value.charAt(i));   }  }   if(value.length ==7){    color =value;  } }  else  if (value.length ==6){   color +=value; }  return(color.length ==7 ?color.toUpperCase():arguments[0]);};FeedoStyle.stringToRgbColor =function(value){  if (!value){   return  null; } 
  var  color =value.replace(/[^\dA-F]+/gi,''); 
  if (color.length !=6){   return (arguments[0]); } 
  var  buffer =[];  buffer.push('rgb(');  buffer.push(parseInt(color.substr(0,2),16));  buffer.push(',');  buffer.push(parseInt(color.substr(2,2),16));  buffer.push(',');  buffer.push(parseInt(color.substr(4,2),16));  buffer.push(')'); 
  return  buffer.join('');};FeedoStyle.stringToColorArray =function(value){  if (!value){   return  null; } 
  var  color =FeedoStyle.stringToHexColor(value);  if (color.length !=7)   return  null; 
  var  colors =[];  colors.push(parseInt(color.substr(1,2),16));  colors.push(parseInt(color.substr(3,2),16));  colors.push(parseInt(color.substr(5,2),16)); 
  return  colors;};FeedoStyle.makeRoundedCorners =function(el,theme,backgroundColor){  el =FeedoStyle.$(el);  if (!el) {   return; } 
  if (!backgroundColor ||backgroundColor =='auto'){   backgroundColor ='#FFF'; } 
  var  imagePath =FeedoStyle.Constants.SCRIPTS_URL +
   FeedoStyle.Constants.THEME_PATH +
   theme +'/' +FeedoStyle.Constants.ROUNDED_CORNER_PREFIX;  var  borderSize =FeedoStyle.numberToPixels(FeedoStyle.Constants.ROUNDED_CORNER_SIZE); 
  var  CornerType ={   TOP_RIGHT :0,
   TOP_LEFT :1,
   BOTTOM_LEFT :2,
   BOTTOM_RIGHT :4
 };  var  BorderType ={   TOP :0,
   RIGHT :1,
   BOTTOM :2,
   LEFT :4
 }; 
  var  borders =[   new  Border('t.gif',BorderType.TOP),
   new  Border('b.gif',BorderType.BOTTOM),
   new  Border('r.gif',BorderType.RIGHT),
   new  Border('l.gif',BorderType.LEFT) ];  var  corners =[   new  Corner('tr.gif',CornerType.TOP_RIGHT),
   new  Corner('br.gif',CornerType.BOTTOM_RIGHT),
   new  Corner('bl.gif',CornerType.BOTTOM_LEFT),
   new  Corner('tl.gif',CornerType.TOP_LEFT) ];  
 
 
  el.style.border ='none';  el.style.position ='relative'; 
  var  firstChild =el.childNodes[0];  for (var  i =0;i <4;i++){   el.insertBefore(borders[i].border,firstChild); }  for (var  i =0;i <4;i++){   el.insertBefore(corners[i].corner,firstChild); } 
  function  Corner(url,position){   this.corner =document.createElement('div');   var  div =this.corner;   div.className ='feedostyle_frame_element';   div.style.position ='absolute';   div.style.backgroundImage ='url(' +imagePath +url +')';   if (backgroundColor){    div.style.backgroundColor =backgroundColor;  }   div.style.width =borderSize;   div.style.height =borderSize;   div.style.overflow ='hidden';   div.style.margin =0;   div.style.padding =0;   div.style.zIndex =100;  
   switch (position){    case  CornerType.TOP_LEFT:
     div.style.top =0;     div.style.left =0;     break;    case  CornerType.TOP_RIGHT:
     div.style.top =0;     div.style.right =0;     break;    case  CornerType.BOTTOM_LEFT:
     div.style.bottom =0;     div.style.left =0;     break;    case  CornerType.BOTTOM_RIGHT:
     div.style.bottom =0;     div.style.right =0;     break;  } }; 
  function  Border(url,position){   this.border =document.createElement('div');   var  div =this.border;   div.className ='feedostyle_frame_element';   div.style.position ='absolute';   div.style.backgroundImage ='url(' +imagePath +url +')';   div.style.margin =0;   div.style.padding =0;   div.style.overflow ='hidden';   div.style.border ='none';   div.style.zIndex =100;   switch (position){    case  BorderType.TOP:
     div.style.width ='100%';     div.style.height =borderSize;     div.style.right =0;     div.style.top =0;     div.style.backgroundRepeat ='repeat-x';     break;    case  BorderType.RIGHT:
     div.style.height ='100%';     div.style.width =borderSize;     div.style.right =0;     div.style.top =0;     div.style.backgroundRepeat ='repeat-y';     break;    case  BorderType.BOTTOM:
     var  image =document.createElement('img');     image.className ='feedostyle_frame_element';     image.src =imagePath +url;     image.style.width =borderSize;     image.style.height =borderSize;     image.style.margin =0;     image.style.padding =0;     image.style.border ='none';     div.appendChild(image);     div.style.width ='100%';     div.style.height =borderSize;     div.style.bottom =0;     div.style.backgroundRepeat ='repeat-x';     div.style.backgroundPositionY ='bottom';     break;    case  BorderType.LEFT:
     div.style.height ='100%';     div.style.width =borderSize;     div.style.left =0;     div.style.top =0;     div.style.backgroundRepeat ='repeat-y';     break;  } };};if (typeof  FeedoStyle =='undefined')  var  FeedoStyle ={};FeedoStyle.Animation =function(duration,steps,initialDelay){this._duration =duration;this._steps =steps;this._initialDelay =initialDelay;this._animationFunctions =[];this._startHandler =null;this._endHandler =null;this._timer =null;};FeedoStyle.Animation.prototype.addColorChange =function(el,attribute,start,end){  var  animationFunction =function(weight){  var  colors =[0,0,0];  for (var  i =0;i <3;++i){  
         colors[i]=(1.0 -weight)*start[i]+weight *end[i]; }  FeedoStyle.$(el).style[attribute]=FeedoStyle.arrayToRgbColor(colors); };  this.addAnimationFunction(animationFunction);};FeedoStyle.Animation.prototype.addMovement =function(el,attribute,start,end){var  animationFunction =function(weight){  var  pixels =(1.0 -weight)*parseInt(start)+weight *parseInt(end);FeedoStyle.$(el).style[attribute]=FeedoStyle.numberToPixels(pixels);};this.addAnimationFunction(animationFunction);};FeedoStyle.Animation.prototype.addAnimationFunction =function(animationFunction){  if (animationFunction){   this._animationFunctions.push(animationFunction); }};FeedoStyle.Animation.prototype.setStartHandler =function(startHandler){  if (startHandler){   this._startHandler =startHandler; }};FeedoStyle.Animation.prototype.setEndHandler =function(endHandler){  if (endHandler){   this._endHandler =endHandler; }};FeedoStyle.Animation.prototype._callAnimationFunctions =function(weight){  for(var  i =0;i <this._animationFunctions.length;i++){   this._animationFunctions[i](weight); }};FeedoStyle.Animation.prototype.start =function(){  var  self =this; 
  var  nextStep =0;  var  startTime =0;  var  animationLoop =function(){  var  currentStep =nextStep++;     
     
      var  factor =90 *Math.PI /  180;      var  currentWeight =Math.sin((currentStep /  self._steps)*factor);      var  nextWeight =Math.sin((nextStep /  self._steps)*factor);     
      if (currentStep <=self._steps){       self._callAnimationFunctions(currentWeight);   
   
         

          var  curTime =new  Date().getTime();          var  nextTime =startTime +Math.floor(self._duration *nextWeight);          var  delay =Math.max(0,nextTime -curTime);  self._timer =window.setTimeout(animationLoop,delay); }else {   self._timer =null;    if (self._endHandler){     try {      self._endHandler();    }catch(ex){}   }  } };  var  beginAnimation =function(){   if (self._startHandler){    try {     self._startHandler();   }catch(ex){}  }   startTime =new  Date().getTime();   animationLoop(); };  self._timer =window.setTimeout(beginAnimation,self._initialDelay);};FeedoStyle.Animation.prototype.stop =function(){  if (this._timer){   window.clearTimeout(this._timer); }};FeedoStyle.Effects ={  highlight :function(el,highlightColor,attribute){var  beginAnim =new  FeedoStyle.Animation(50,20,0);el =FeedoStyle.$(el);switch (attribute){  case 'color':
           attribute ='color';   break;  default:
           attribute ='backgroundColor';   break
        };var  endColor =[255,255,210];var  startColor =[255,255,255];var  currentColor =el.style[attribute];if (currentColor)  startColor =FeedoStyle.stringToColorArray(currentColor); 
         if (highlightColor)  endColor =FeedoStyle.stringToColorArray(highlightColor);beginAnim.addColorChange(el,attribute,startColor,endColor);var  endTransition =function(){          try {              var  endAnim =new  FeedoStyle.Animation(50,20,0);              endAnim.addColorChange(el,attribute,endColor,startColor);              endAnim.start();         }catch(ex){              alert(ex);         }     };     
         beginAnim.setEndHandler(endTransition);beginAnim.start(); },
  resizeTo :function(element,width,height){   var  anim =new  FeedoStyle.Animation(150,20,0);   var  targets =[];   if (typeof  element =='object')  {    for (var  i =0;i <element.length;i++){     targets.push(element[i]);   }  }else {    targets.push(element);  }  
   for (var  i =0;i <targets.length;i++){          var  el =FeedoStyle.$(targets[i]);          var  startWidth =el.offsetWidth;          var  startHeight =el.offsetHeight;          if (width){           anim.addMovement(el,'width',startWidth,width);         }          if (height){           anim.addMovement(el,'height',startHeight,height);         }  }   anim.start(); },
  moveBy :function(element,distance,direction){   var  anim =new  FeedoStyle.Animation(150,5,0);   var  targets =[];   if (typeof  element =='object')  {    for (var  i =0;i <element.length;i++){     targets.push(element[i]);   }  }else {    targets.push(element);  }  
   distance =parseInt(distance);   var  attribute ='';   switch (direction){    case 'left':
     attribute ='left';     distance *=-1;     break;    case 'right':
     attribute ='left';     break;   
    case 'up':
     attribute ='top';     distance *=-1;     break;    case 'down':
     attribute ='top';     break;    default:
     return;  }  
   for (var  i =0;i <targets.length;i++){    var  el =FeedoStyle.$(targets[i]);    var  startPosition =0;    switch (direction){     case 'left':
     case 'right':
      startPosition =parseInt(el.offsetLeft);      if (el.style[attribute]){       startPosition =parseInt(el.style[attribute]);     }      break;   
     case 'up':
     case 'down':
      startPosition =parseInt(el.offsetTop);      if (el.style[attribute]){       startPosition =parseInt(el.style[attribute]);     }      break;   }    var  end =startPosition +distance;    anim.addMovement(el,attribute,startPosition,end);  };anim.start(); }};FeedoStyle.Preferences =function(id){this.id =id;this.digestTitle ='';this.digestSubtitle ='';this.showTitle =true;this.showSubtitle =true;this.showEntryTitle =false;this.showEntrySummary =false;this.showEntryContent =false;this.showEntryDate =false;this.showEntryTime =false;this.showFeedScraper =false;this.newWindowLinks =true;this.showCopyright =true;this.showEmbeddedImages =false;this.showEmbeddedThumbnails =false;this.showCategory =false;this.collapseOverflow =true;this.entryFlow =FeedoStyle.FlowFormat.BLOCK;this.entryCount =15; 
  this.titleBackground ='none';  this.subtitleBackground ='none';  this.entryBoxBackground ='none';  this.entryBackground ='none'; 
     this.rescaleImages =true;this.rescaleWidth =100;this.rescaleHeight =100;this.titleForeColor ='3a3ac2';this.titleBackColor ='3a3ac2';this.subtitleForeColor ='3a3ac2';this.subtitleBackColor ='3a3ac2';this.entryForeColor ='3a3ac2';this.entryHoverForeColor ='3a3ac2';this.entryBackColor ='FFF';this.entryHoverBackColor ='FFF';this.digestBorder ={  top:'2px solid #CCC',
      bottom:'2px solid #CCC',
      left:'2px solid #CCC',
      right:'2px solid #CCC'
    };this.titleBorder ={  top:'2px solid #CCC',
      bottom:'2px solid #CCC',
      left:'2px solid #CCC',
      right:'2px solid #CCC'
    };this.subtitleBorder ={  top:'2px solid #CCC',
      bottom:'2px solid #CCC',
      left:'2px solid #CCC',
      right:'2px solid #CCC'
    };this.entryBoxBorder ={  top:'2px solid #CCC',
      bottom:'2px solid #CCC',
      left:'2px solid #CCC',
      right:'2px solid #CCC'
    };this.entryBorder ={  top:'2px solid #CCC',
      bottom:'2px solid #CCC',
      left:'2px solid #CCC',
      right:'2px solid #CCC'
    };this.digestPadding ='0';this.titlePadding ='0';this.subtitlePadding ='0';this.entryBoxPadding ='0';this.entryPadding ='0';this.imagePadding ='0';this.titleFontFamily ='1.3em';this.subtitleFontFamily ='1.1em';this.entryFontFamily ='1em';this.titleFontSize ='1.3em';this.subtitleFontSize ='1.1em';this.entryTitleFontSize ='1.1em';this.entryContentFontSize ='1em';this.categoryFontSize ='0.9em';this.titleTextAlign ='center';this.subtitleTextAlign ='left';this.entryTextAlign ='left';this.titleVerticalTextAlign ='middle';this.subtitleVerticalTextAlign ='middle';this.entryVerticalTextAlign ='middle';this.titleTrasform ='uppercase';this.subtitleTrasform ='uppercase';this.entryTrasform =null;this.titleDecoration ='none';this.subtitleDecoration ='none';this.entryDecoration ='none';this.titleDirection =null;this.subtitleDirection =null;this.entryDirection =null;this.digestHeight ='230px';this.digestWidth ='auto';this.titleWidth ='auto';this.titleHeight ='auto';this.subtitleWidth ='auto';this.subtitleHeight ='auto';this.entryHeight ='auto';this.entryWidth ='auto';this.digestFormat =FeedoStyle.DigestFormats.VERTICAL_MARQUEE;};FeedoStyle.Preferences.prototype.getString =function(name){var  value =this.__getPref(name);if (value)return  value +'';else 
         return  null;};FeedoStyle.Preferences.prototype.getInt =function(name){var  value =this.__getPref(name);value =parseInt(value);if (isNaN(value))return  null;else 
         return  value;};FeedoStyle.Preferences.prototype.getBool =function(name){var  value =this.__getPref(name);if (value){value =value.toLowerCase();if (value =='true')return  true;if (value =='false')return  false;};return  null;};FeedoStyle.Preferences.prototype.set =function(name,value){  var  today =new  Date();  today.setTime(today.getTime()); 
  var  expires =1000 *60 *60 *24;  var  expires_date =new  Date(today.getTime()+(expires));  document.cookie =name+"="+escape(value)+
  ";expires=" +expires_date.toGMTString();};FeedoStyle.Preferences.prototype.__getPref =function(name){  var  start =document.cookie.indexOf(name +"=" );  var  len =start +name.length +1;  if ((!start)&&(name !=document.cookie.substring(0,name.length))){   return  null; }  if (start ==-1)   return  null;  var  end =document.cookie.indexOf(";" ,len);  if (end ==-1)   end =document.cookie.length;  return  unescape(document.cookie.substring(len,end));};FeedoStyle.Preferences.prototype.__delPref =function(name){  if (this.__getPref(name))   document.cookie =name +"=" +
   ";expires=Thu, 01-Jan-1970 00:00:01 GMT";};FeedoStyle.Preferences.prototype.toString =function(){var  buffer =new  Array();return  buffer.join('');};if (typeof  FeedoStyle.Digests =='undefined'){FeedoStyle.Digests ={};};FeedoStyle.Digests.BaseDigest =function(){this._id =''; 
   this._entries =null;  this.settings =null; 
    
     this.scraperIsOpen =true; 
   this.digestTitle ='';  this.digestSubtitle ='';this._isAnimating =false;};FeedoStyle.Digests.BaseDigest.prototype.render =function(){ 
    
  var  id =this._id; 
 
 
     var  hook =FeedoStyle.$(FeedoStyle.ElementNames.FEEDO_STYLE_DOM_HOOK +id);  var  buffer =[]; 
 
  buffer.push('<div class="');buffer.push(FeedoStyle.ElementNames.DIGEST_CONTAINER);buffer.push('" id="');buffer.push(FeedoStyle.ElementNames.DIGEST_CONTAINER);buffer.push(id);buffer.push('"');  buffer.push(' style="position:relative;'); 
     if (this.settings.width ||this.settings.height ||this.settings.fontSize){  var  width =FeedoStyle.parseUnit(this.settings.width);  var  height =FeedoStyle.parseUnit(this.settings.height);  var  fontSize =FeedoStyle.parseUnit(this.settings.fontSize); 
      if (typeof  width !='undefined'){   buffer.push('width:');   buffer.push(width);   buffer.push(';'); }  if (typeof  height !='undefined'){   buffer.push('height:');   buffer.push(height);   buffer.push(';'); }  if (typeof  fontSize !='undefined'){   buffer.push('font-size:');   buffer.push(fontSize);   buffer.push(';'); }};buffer.push('">');buffer.push('<div class="');buffer.push(FeedoStyle.ElementNames.DIGEST_BODY);buffer.push('" id="');buffer.push(FeedoStyle.ElementNames.DIGEST_BODY);buffer.push(id);buffer.push('">');buffer.push('<div class="');buffer.push(FeedoStyle.ElementNames.DIGEST_HEADER);buffer.push('" id="');buffer.push(FeedoStyle.ElementNames.DIGEST_HEADER);buffer.push(id);buffer.push('">');if (typeof  this.settings.showCaption !='undefined' &&this.settings.showCaption){      buffer.push('<p class="');      buffer.push(FeedoStyle.ElementNames.DIGEST_TITLE);      buffer.push('" id="');      buffer.push(FeedoStyle.ElementNames.DIGEST_TITLE);      buffer.push(id);      buffer.push('">');      if (typeof  this.settings.title !='undefined'){       buffer.push(this.settings.title);     }      buffer.push('<\/p>');     
      buffer.push('<p class="');      buffer.push(FeedoStyle.ElementNames.DIGEST_SUBTITLE);      buffer.push('" id="');      buffer.push(FeedoStyle.ElementNames.DIGEST_SUBTITLE);      buffer.push(id);      buffer.push('">');      if (typeof  this.settings.title !='undefined'){       buffer.push(this.settings.subtitle);     }      buffer.push('<\/p>');} 
     if (this.settings.showFeedScraper){ 
      buffer.push('<div class="');      buffer.push(FeedoStyle.ElementNames.SCRAPER_CONTAINER);      buffer.push('" id="');      buffer.push(FeedoStyle.ElementNames.SCRAPER_CONTAINER);      buffer.push(id);      buffer.push('">');     
     
      buffer.push('<div class="');      buffer.push(FeedoStyle.ElementNames.SCRAPER_HEADER);      buffer.push('" id="');      buffer.push(FeedoStyle.ElementNames.SCRAPER_HEADER);      buffer.push(id);      buffer.push('">');     
     
      buffer.push('<span class="');      buffer.push(FeedoStyle.ElementNames.SCRAPER_TITLE);      buffer.push('">');      buffer.push(FeedoStyle.Strings.SCRAPER_TITLE);      buffer.push('</span> <span class="');      buffer.push(FeedoStyle.ElementNames.SCRAPER_TOGGLE_CLOSE);      buffer.push('">');     
      buffer.push('<a href="');      buffer.push(FeedoStyle.Constants.FAKE_LINK_HREF);      buffer.push('" id="');      buffer.push(FeedoStyle.ElementNames.SCRAPER_TOGGLE_CLOSE);      buffer.push(id);      buffer.push('" onclick="');      buffer.push('FeedoStyle.toggleFeedScraper(\'');      buffer.push(id);      buffer.push('\');this.blur();return false;">');      buffer.push(FeedoStyle.Strings.SCRAPER_TOGGLE_CLOSE);      buffer.push('<\/a><\/span>');     
     
      buffer.push('<\/div>');       
    
     
      buffer.push('<p>');      buffer.push(FeedoStyle.Strings.ENTER_FEED_URL);      buffer.push('<\/p>');      buffer.push('<ul class="');      buffer.push(FeedoStyle.ElementNames.SCRAPER_FIELDS);      buffer.push('">');     
      buffer.push('<li>');      buffer.push('<input type="text" class="');      buffer.push(FeedoStyle.ElementNames.SCRAPER_URL_FIELD);      buffer.push('" id="');      buffer.push(FeedoStyle.ElementNames.SCRAPER_URL_FIELD);      buffer.push(id);      buffer.push('" value="');      if (this.settings.defaultFeedUrl)          buffer.push(this.settings.defaultFeedUrl);      else 
          buffer.push(FeedoStyle.Strings.DEFAULT_FEED_URL);     
      buffer.push('" onkeypress="return FeedoStyle.keyboardTrap(event, \'');      buffer.push(id);     
      buffer.push('\');" \/>');     
      buffer.push('<\/li>');     
      buffer.push('<li>');      buffer.push('<a class="');      buffer.push(FeedoStyle.ElementNames.SCRAPER_GO_FIELD);      buffer.push('" href="');     
      buffer.push(FeedoStyle.Constants.FAKE_LINK_HREF);      buffer.push('" onclick="FeedoStyle.fetchTextboxFeed(\'');      buffer.push(id);     
      buffer.push('\');this.blur();return false;">');      buffer.push(FeedoStyle.Strings.SCRAPER_GO_BUTTON);      buffer.push('<\/a><\/li>');     
     
      buffer.push('<\/ul>');     
      buffer.push('<\/div>');  
   buffer.push('<div class="');   buffer.push(FeedoStyle.ElementNames.SCRAPER_TOGGLE_OPEN);   buffer.push('" id="');   buffer.push(FeedoStyle.ElementNames.SCRAPER_TOGGLE_OPEN);   buffer.push(id);  
   buffer.push('" style="display:none;">');  
    
      buffer.push('<a href="');      buffer.push(FeedoStyle.Constants.FAKE_LINK_HREF);      buffer.push('" onclick="');      buffer.push('FeedoStyle.toggleFeedScraper(\'');      buffer.push(id);      buffer.push('\');this.blur();return false;">');      buffer.push(FeedoStyle.Strings.SCRAPER_TOGGLE_OPEN);      buffer.push('<\/a><\/div>');     
     
   buffer.push('<div class="');   buffer.push(FeedoStyle.ElementNames.SCRAPER_FEEDS);   buffer.push('" id="');   buffer.push(FeedoStyle.ElementNames.SCRAPER_FEEDS);   buffer.push(id);  
   buffer.push('" style="display:none;">');      buffer.push('<p>The address you entered contains more than one feed, please select the one you wish to add.</p>');   buffer.push('<ul class="');   buffer.push(FeedoStyle.ElementNames.SCRAPER_FEEDS_LIST);   buffer.push('" id="');   buffer.push(FeedoStyle.ElementNames.SCRAPER_FEEDS_LIST);   buffer.push(id);      buffer.push('" \/>');      buffer.push('<\/ul><\/div>');};buffer.push('<div class="');buffer.push(FeedoStyle.ElementNames.MESSAGE_AREA);buffer.push('" id="');buffer.push(FeedoStyle.ElementNames.MESSAGE_AREA);buffer.push(id);buffer.push('"><\/div>');buffer.push('<\/div>');buffer.push('<div class="');buffer.push(FeedoStyle.ElementNames.DIGEST_ENTRY_AREA);buffer.push('" id="');buffer.push(FeedoStyle.ElementNames.DIGEST_ENTRY_AREA);buffer.push(id);buffer.push('">');buffer.push('<ul class="');buffer.push(FeedoStyle.ElementNames.DIGEST_ENTRY_LIST);buffer.push('" id="');buffer.push(FeedoStyle.ElementNames.DIGEST_ENTRY_LIST);buffer.push(id);buffer.push('"><\/ul>');buffer.push('<\/div>');buffer.push('<\/div>');buffer.push('<div class="');buffer.push(FeedoStyle.ElementNames.DIGEST_FOOTER);buffer.push('" id="');buffer.push(FeedoStyle.ElementNames.DIGEST_FOOTER);buffer.push(id);buffer.push('">');  
  if (!this.settings.hideFooter){  
 };buffer.push('<\/div>');buffer.push('<\/div>'); 
 
  hook.innerHTML =buffer.join('');  
 
 
  this.updateStyles(); 
};FeedoStyle.Digests.BaseDigest.prototype.updateStyles =function(){  var  elements =FeedoStyle.ElementNames;  var  settings =this.settings;  var  id =this._id; 
  if (FeedoStyle.$(elements.DIGEST_TITLE +id)&&
   settings.captionTitleColor){   var  el =FeedoStyle.$(elements.DIGEST_TITLE +id);   if (settings.captionTitleColor !='auto')    el.style.color =settings.captionTitleColor;   else
    el.style.color =''; }  if (FeedoStyle.$(elements.DIGEST_SUBTITLE +id)&&
   settings.captionSubtitleColor){   var  el =FeedoStyle.$(elements.DIGEST_SUBTITLE +id);   if (settings.captionSubtitleColor !='auto')    el.style.color =settings.captionSubtitleColor;   else
    el.style.color ='';   
 }  if (settings.foregroundColor){   var  els =FeedoStyle.getElementsByClassName(elements.DIGEST_SOURCE);   var  fore =settings.foregroundColor;   var  back =settings.backgroundColor;   if (back =='auto')    back ='#FFFFFF';  
   for (var  i =0;i <els.length;i++){    if (settings.foregroundColor !='auto')     els[i].style.color =FeedoStyle.getAlphaShade(fore,back,0.8);    else
     els[i].style.color ='';  }   els =FeedoStyle.getElementsByClassName(elements.DIGEST_ENTRY_DATE);   for (var  i =0;i <els.length;i++){    if (settings.foregroundColor !='auto')     els[i].style.color =FeedoStyle.getAlphaShade(fore,back,0.45);    else
     els[i].style.color ='';  }   els =FeedoStyle.getElementsByClassName(elements.DIGEST_ENTRY_TIME);   for (var  i =0;i <els.length;i++){    if (settings.foregroundColor !='auto')     els[i].style.color =FeedoStyle.getAlphaShade(fore,back,0.45);    else
     els[i].style.color ='';  }   els =FeedoStyle.getElementsByClassName(elements.DIGEST_SUMMARY);   for (var  i =0;i <els.length;i++){    if (settings.foregroundColor !='auto')     els[i].style.color =settings.foregroundColor;    else
     els[i].style.color ='';  } } 
  if (settings.linkColor){  
   var  els =FeedoStyle.getElementsByClassName(elements.DIGEST_ENTRY_TITLE_LINK);   var  back =settings.backgroundColor;   if (back =='auto')    back ='#FFFFFF';  
   for (var  i =0;i <els.length;i++){    if (settings.linkColor !='auto')     els[i].style.color =settings.linkColor;    else 
     els[i].style.color ='';  }   els =this.getEntryList().getElementsByTagName('li');   for (var  i =0;i <els.length;i++){   
    if (settings.linkColor !='auto'){     els[i].onmouseover =function(){         this.className ='';         this.style.backgroundColor =FeedoStyle.getAlphaShade(settings.linkColor,back,0.20);         this.style.cursor ='pointer';       };     els[i].onmouseout =function(){         this.className ='';         this.style.backgroundColor ='';         this.style.cursor ='default';  
       };   }else {     els[i].onmouseover =function(){         this.className ='highlight';    };     els[i].onmouseout =function(){         this.className =''; 
       };   }  } } 
  if (settings.backgroundColor){   var  el =FeedoStyle.$(elements.DIGEST_ENTRY_AREA +id);   if (settings.backgroundColor !='auto')    el.style.backgroundColor =settings.backgroundColor;   else 
    el.style.backgroundColor ='';   
 }  if (settings.borderColor){   var  el =FeedoStyle.$(elements.DIGEST_CONTAINER +id);   if (settings.borderColor !='auto')    el.style.border ='3px solid ' +settings.borderColor;   else 
    el.style.border ='';  
 } 
  if (this.settings.pauseTime){   this.PAUSE_TIMEOUT =parseInt(this.settings.pauseTime); } 
  if (settings.fontSize){  var  fontSize =FeedoStyle.parseUnit(settings.fontSize); 
      if (typeof  fontSize !='undefined'){    var  el =FeedoStyle.$(elements.DIGEST_CONTAINER +id);    el.style.fontSize =fontSize; } }};FeedoStyle.Digests.BaseDigest.prototype.getDigestContainer =function(){return  FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_CONTAINER +this._id);};FeedoStyle.Digests.BaseDigest.prototype.getDigestBody =function(){return  FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_BODY +this._id);};FeedoStyle.Digests.BaseDigest.prototype.getEntriesArea =function(){return  FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_ENTRY_AREA +this._id);};FeedoStyle.Digests.BaseDigest.prototype.getEntryList =function(){return  FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_ENTRY_LIST +this._id);};FeedoStyle.Digests.BaseDigest.prototype.getItems =function(){return  this.getEntryList().getElementsByTagName("li");};FeedoStyle.Digests.BaseDigest.prototype.getLinks =function(){return  this.getEntryList().getElementsByTagName("a");};FeedoStyle.Digests.BaseDigest.prototype.destroyDigest =function(){  if (this._timer){   window.clearTimeout(this._timer);   this._timer =null; }};FeedoStyle.Digests.BaseDigest.prototype.load =function(digest){  if(!digest){   return; }  this._digest =digest; 
  if (!digest.entries){   return; } 
  this._entries =[]; 
  for (var  i =0;i <digest.entries.length;i++){   this._entries.push(digest.entries[i]); 
 }  if (this.getItems().length >0){   this.updateItems(); }else {   this.renderItems(); } 
  if (digest.footer){   FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_FOOTER +this._id).innerHTML =digest.footer; }  
  if (typeof  this.settings.title !='undefined' &&FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_TITLE +this._id)){   FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_TITLE +this._id).innerHTML =this.settings.title; }  if (typeof  this.settings.subtitle !='undefined' &&FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_SUBTITLE +this._id)){   FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_SUBTITLE +this._id).innerHTML =this.settings.subtitle; }};FeedoStyle.Digests.BaseDigest.prototype.__updateList =function(list){  this.getEntryList().parentNode.replaceChild(list,this.getEntryList());};FeedoStyle.Digests.BaseDigest.prototype.renderItems =function(){  if (!this._entries){   return; } 
  var  list =this.__createEntries();  this.__updateList(list);};FeedoStyle.Digests.BaseDigest.prototype.updateItems =function(){};FeedoStyle.Digests.BaseDigest.prototype.__createEntries =function(){  var  _d =document; 
  var  self =this;  var  list =_d.createElement('ul');  list.className =FeedoStyle.ElementNames.DIGEST_ENTRY_LIST;  list.id =FeedoStyle.ElementNames.DIGEST_ENTRY_LIST +this._id; 
  var  buffer =[]; 
  var  entryCount =this._entries.length;  if (this.settings.entryCount){   entryCount =Math.min(entryCount,this.settings.entryCount); } 
  for (var  i =0;i <entryCount;i++){   var  entry =this._entries[i];   buffer.push('<li');   if (this.settings.entrySpacing &&i <entryCount -1){    var  spacing =FeedoStyle.parseUnit(this.settings.entrySpacing);    buffer.push(' style="margin-bottom:');    buffer.push(spacing);    buffer.push('"');  }  
   buffer.push('>');  
  
   buffer.push('<dl class="');   buffer.push(FeedoStyle.ElementNames.DIGEST_ENTRY);   buffer.push('">');  
  
   buffer.push('<dt class="');   buffer.push(FeedoStyle.ElementNames.DIGEST_ENTRY_TITLE);   buffer.push('">');   buffer.push('<a href="');   buffer.push(FeedoStyle.Constants.FAKE_LINK_HREF);  
  
   buffer.push('" onclick="FeedoStyle.handleClick(\'');   buffer.push(self._id);   buffer.push('\', \'');   buffer.push(entry.url);   buffer.push('\');return false;" class="');  
   buffer.push(FeedoStyle.ElementNames.DIGEST_ENTRY_TITLE_LINK);   buffer.push('">');  
   if (this.settings &&this.settings.stripTags){    entry.title =FeedoStyle.stripTags(entry.title);  }   buffer.push(entry.title);   buffer.push('<\/a>');   buffer.push('<\/dt>');  
   if (this.settings.showSource &&(entry.source ||entry.sourceUrl)){    buffer.push('<dd class="');    buffer.push(FeedoStyle.ElementNames.DIGEST_SOURCE);    buffer.push('">');    if (entry.source){     if (this.settings &&this.settings.stripTags){      entry.source =FeedoStyle.stripTags(entry.source);    }     buffer.push(entry.source);   }    if (entry.sourceUrl){     buffer.push(' <span class="');     buffer.push(FeedoStyle.ElementNames.DIGEST_SOURCE_URL);     buffer.push('">(');     buffer.push(entry.sourceUrl);     buffer.push(')<\/span>');   }   
    buffer.push('<\/dd>');  }  
  
   if ((this.settings.showDate &&entry.date)    ||(this.settings.showTime &&entry.date)){   
    buffer.push('<dd class="');    buffer.push(FeedoStyle.ElementNames.DIGEST_ENTRY_DATE_TIME);    buffer.push('">');   
    if (this.settings &&this.settings.showDate &&entry.date){     buffer.push('<span class="');     buffer.push(FeedoStyle.ElementNames.DIGEST_ENTRY_DATE);     buffer.push('">');     var  date =new  Date(entry.date);     buffer.push(date.toLocaleDateString());     buffer.push('<\/span>');   }   
    if (this.settings &&this.settings.showTime &&entry.date){     buffer.push('<span class="');     buffer.push(FeedoStyle.ElementNames.DIGEST_ENTRY_TIME);     buffer.push('">');     var  date =new  Date(entry.date);     buffer.push(date.toLocaleTimeString());     buffer.push('<\/span>');   }    buffer.push('<\/dd>');  }  
   if (this.settings.showAuthor &&entry.author){    buffer.push('<dd class="');    buffer.push(FeedoStyle.ElementNames.DIGEST_AUTHOR);    buffer.push('">');    if (this.settings &&this.settings.stripTags){     entry.author =FeedoStyle.stripTags(entry.author);   }    buffer.push(entry.author);    buffer.push('<\/dd>');  }  
   if (this.settings.showSummary &&entry.summary){    buffer.push('<dd class="');    buffer.push(FeedoStyle.ElementNames.DIGEST_SUMMARY);    buffer.push('">');    if (this.settings.stripTags){     entry.summary =FeedoStyle.stripTags(entry.summary);   }    if (this.settings.summaryLength &&this.settings.summaryLength >0){     entry.summary =FeedoStyle.stripTags(entry.summary);     entry.summary =entry.summary.substring(0,this.settings.summaryLength);   }    buffer.push(entry.summary);    buffer.push('<\/dd>');  }  
   if (this.settings.showMedia &&entry.media){    buffer.push('<dd class="');    buffer.push(FeedoStyle.ElementNames.DIGEST_MEDIA);    buffer.push('">');    buffer.push(entry.media);    buffer.push('<\/dd>');  }  
   if (typeof  this.settings.showCopyright =='undefined'){    this.settings.showCopyright =true;  }   if (this.settings.showCopyright &&entry.copyright){    buffer.push('<dd class="');    buffer.push(FeedoStyle.ElementNames.DIGEST_COPYRIGHT);    buffer.push('">');    if (this.settings.stripTags){     entry.summary =FeedoStyle.stripTags(entry.copyright);   }    buffer.push(entry.copyright);    buffer.push('<\/dd>');  }   
   buffer.push('<\/dl>');   buffer.push('<\/li>'); } 
  list.innerHTML =buffer.join(''); 
  return  list;};FeedoStyle.Digests.Rolling =function(settings){this._id =settings.id;this.settings =settings; 
  this.init();};FeedoStyle.Digests.Rolling.prototype =new  FeedoStyle.Digests.BaseDigest();FeedoStyle.Digests.Rolling.prototype.init =function(){ 
    
    
     this.SHOW_TIME =1500;this.SHOW_STEPS =30;this.SHOW_DELAY =500;this.HIDE_DELAY =1000;this.HEIGHT =this.settings.height ?this.settings.height :220;  this.WIDTH =this.settings.width ?this.settings.width :200;  this.ENTRY_SPACING =this.settings.entrySpacing ?this.settings.entrySpacing :35;this.SHOW_COUNT =2; 
    
     this.BACKGROUND_COLOR =[0,0,0];this.LINK_COLOR =[0,130,226];this.OLD_LINK_COLOR =[180,180,240];this.HIDE_TIME =500;this.HIDE_STEPS =50;this.HIDE_DISTANCE =25;this._replacementList =null;this._discardCount =0;this._animating =false;this._biggestEntry =0; 
     this.render(); 
  var  container =FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_CONTAINER +this._id);  container.className =container.className +' ' +FeedoStyle.DigestFormats.ROLLING;  container.style.width =this.WIDTH;  container.style.height =this.HEIGHT; 
 
  var  digestBody =this.getDigestBody();  digestBody.style.height ='auto'; 
  var  entryArea =this.getEntriesArea();  entryArea.style.position ='relative';  entryArea.style.overflow ='hidden';  entryArea.style.height ='100%';  var  entryList =this.getEntryList();  entryList.style.position ='absolute';  entryList.style.width ='100%';  
 
  if (this._digest){   FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_TITLE +this._id).innerHTML =this._digest.title;   FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_SUBTITLE +this._id).innerHTML =this._digest.subtitle;   this.renderItems(); }};FeedoStyle.Digests.Rolling.prototype.baseRenderItems =FeedoStyle.Digests.BaseDigest.prototype.renderItems;FeedoStyle.Digests.Rolling.prototype.renderItems =function(){this.baseRenderItems();this._prepareList(this.getEntriesArea());this._prepareItems();this._hideCurrent();this.getDigestBody().style.position ='relative';this.getEntriesArea().style.position ='relative';this.getEntriesArea().style.overflow ='hidden';var  headerHeight =FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_HEADER +this._id).offsetHeight;  var  digestBody =this.getDigestBody();  digestBody.style.height =(this.HEIGHT -headerHeight)+'px';};FeedoStyle.Digests.Rolling.prototype._prepareList =function(list){  var  items =list.getElementsByTagName("li");  for(var  i =0;i <items.length;i++){items[i].style.border ='none';items[i].style.position ='relative';items[i].style.height =items[i].offsetHeight +'px';this._biggestEntry =Math.max(items[i].offsetHeight,this._biggestEntry);items[i].style.overflow ='hidden';items[i].style.padding ='0';items[i].style.display ='none';}};FeedoStyle.Digests.Rolling.prototype._prepareItems =function(){var  list =this.getEntryList();var  items =this.getItems();if (!items ||items.length ===0){return;};this.SHOW_COUNT =Math.floor(this.HEIGHT/this._biggestEntry);this.HIDE_DISTANCE =Math.floor(this._biggestEntry/3);var  numItems =this.SHOW_COUNT;numItems =Math.min(numItems,items.length);for (var  i =0;i <numItems;++i){items[i].style.display ="block";}};FeedoStyle.Digests.Rolling.prototype._showNext =function(){ 
 
  if (this._replacementList){   this._replaceList(); }  var  list =this.getEntriesArea();  var  items =this.getItems();  var  links =this.getLinks();  if (!items ||items.length ===0){   return; }  if (items.length >this.SHOW_COUNT){   var  currentItem =items[0];   var  currentLink =links[0];   var  nextItem =items[this.SHOW_COUNT];   var  nextLink =links[this.SHOW_COUNT];  
   var  animation =new  FeedoStyle.Animation(this.SHOW_TIME,this.SHOW_STEPS,this.SHOW_DELAY);   animation.addColorChange(currentItem,"color",this.LINK_COLOR,this.OLD_LINK_COLOR);   animation.addColorChange(currentLink,"color",this.LINK_COLOR,this.OLD_LINK_COLOR);   animation.addColorChange(nextItem,"color",this.BACKGROUND_COLOR,this.LINK_COLOR);   animation.addColorChange(nextLink,"color",this.BACKGROUND_COLOR,this.LINK_COLOR);  
   animation.setStartHandler(function(){    nextItem.style.display ="block";  });  
   var  self =this;   var  done =function(){    self._hideCurrent();  };  
  
   animation.start(); }};FeedoStyle.Digests.Rolling.prototype._hideCurrent =function(){  var  entries =this.getEntriesArea();  var  items =this.getItems();  var  links =this.getLinks();  if (!items ||items.length ===0){   return; }  if (items.length >this.SHOW_COUNT){   this._animating =true;   var  currentItem =items[0];   var  currentLink =links[0];   var  nextItem =items[1];   var  nextLink =links[1];    
   var  animation =new  FeedoStyle.Animation(this.HIDE_TIME,this.HIDE_STEPS,this.HIDE_DELAY);   animation.addColorChange(currentItem,"color",this.OLD_LINK_COLOR,this.BACKGROUND_COLOR);   animation.addColorChange(currentLink,"color",this.OLD_LINK_COLOR,this.BACKGROUND_COLOR);   animation.addMovement(currentItem,"top",0,this.HIDE_DISTANCE +currentItem.offsetHeight);   animation.addMovement(entries,"top",0,-currentItem.offsetHeight);  
   var  self =this;  
   var  done =function(){   
    currentItem.style.top ='';    currentItem.style.display ='none';    entries.style.top ='';   
    var  restoreList =function(){    
    
    
     if (self._discardCount >0){      self.getEntryList().removeChild(currentItem);      self._discardCount--;    }else {      self.getEntryList().appendChild(currentItem);    }   
     self._showNext();   };   
    window.setTimeout(restoreList,0);  
  };   animation.setEndHandler(done);  
   animation.start(); }};FeedoStyle.Digests.Rolling.prototype.updateItems =function(){  if (this._animating){   var  list =this._createList();   this._prepareList(list);     this._replacementList =list; }else {   this.renderItems(); }};FeedoStyle.Digests.Rolling.prototype._replaceList =function(){var  list =this.getEntriesArea();var  items =this.getItems();if (!items ||items.length ===0){return;};var  newItems =this._replacementList.getElementsByTagName("li");while(items.length >this.SHOW_COUNT){list.removeChild(items[this.SHOW_COUNT]);};while(newItems.length >0){list.appendChild(newItems[0]);};this._discardCount =this.SHOW_COUNT;this._replacementList =null;};FeedoStyle.Digests.VerticalMarquee =function(settings){  var  self =this; 
 
     this._id =settings.id;this.settings =settings; 
 
 
  this.init();};FeedoStyle.Digests.VerticalMarquee.prototype =new  FeedoStyle.Digests.BaseDigest();FeedoStyle.Digests.VerticalMarquee.prototype.init =function(settings){  if (settings){  this.settings =settings; } 
     this.render(); 
  this.HEIGHT =this.settings.height ?this.settings.height :220;  this.WIDTH =this.settings.width ?this.settings.width :200;  this.ENTRY_SPACING =this.settings.entrySpacing ?parseInt(this.settings.entrySpacing):50;  this.PAUSE_TIMEOUT =this.settings.pauseTime ?parseInt(this.settings.pauseTime):3000;  this.SPEED =5;  this._steps =50;  this._duration =1000; 
 
  this._position =0; 
  this._totalHeight =0;  this._timer =null;  this._isPaused =false;  this._blockIntervals =[]; 
 
  var  container =FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_CONTAINER +this._id);  container.className =container.className +' ' +FeedoStyle.DigestFormats.VERTICAL_MARQUEE; 
 
  if (this.settings.roundedCorners){   container.style.position ='relative';   FeedoStyle.makeRoundedCorners(container,this.settings.theme,this.settings.pageBackgroundColor); }else {   container.className =container.className +' plainBorder'; } 
 
  var  digestBody =this.getDigestBody();  digestBody.style.height ='auto'; 
  var  entryArea =this.getEntriesArea();  entryArea.style.position ='relative';  entryArea.style.overflow ='hidden';  entryArea.style.height ='100%';  var  entryList =this.getEntryList();  entryList.style.position ='relative';  entryList.style.width ='100%'; 
 
 
     if (!this._entries){   FeedoStyle.displayMessage(this._id,FeedoStyle.Constants.WARNING_MSG,FeedoStyle.Strings.NO_ENTRIES_FOUND);}else {   var  m =FeedoStyle.$(FeedoStyle.ElementNames.MESSAGE_AREA +this._id);   m.style.display ='none';}  if (this._digest){   this.renderItems();  
   if (typeof  this.settings.title !='undefined' &&FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_TITLE +this._id)){    FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_TITLE +this._id).innerHTML =this.settings.title;  }   if (typeof  this.settings.subtitle !='undefined' &&FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_SUBTITLE +this._id)){    FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_SUBTITLE +this._id).innerHTML =this.settings.subtitle;  }  
   if (this._digest.footer &&FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_FOOTER +this._id)){   
    FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_FOOTER +this._id).innerHTML =this._digest.footer;  } }};FeedoStyle.Digests.VerticalMarquee.prototype.baseRenderItems =FeedoStyle.Digests.BaseDigest.prototype.renderItems;FeedoStyle.Digests.VerticalMarquee.prototype.renderItems =function(){this.baseRenderItems();if (!this._entries){   FeedoStyle.displayMessage(this._id,FeedoStyle.Constants.WARNING_MSG,FeedoStyle.Strings.NO_ENTRIES_FOUND);  return;}else {   var  m =FeedoStyle.$(FeedoStyle.ElementNames.MESSAGE_AREA +this._id);   m.style.display ='none';};var  entries =this.getEntryList();  entries.style.position ='relative';  entries.style.top =0; 
  this._prepareList(this.getEntryList()); 
 
  entries.style.height =this._totalHeight +'px'; 
  var  currentIndex =0;  var  start =0;  var  end =0;  var  self =this;  function  animate(){   currentIndex++;  
   end =-self._blockIntervals[currentIndex];   
   var  nextStep =0;   var  startTime =new  Date().getTime();  
   var  animationLoop =function(){  
       var  currentStep =nextStep++;       var  factor =90 *Math.PI /  180;       var  currentWeight =Math.sin((currentStep /  self._steps)*factor);       var  nextWeight =Math.sin((nextStep /  self._steps)*factor);      
       if (currentStep <=self._steps){      
        var  pixels =(1.0 -currentWeight)*parseInt(start)+currentWeight *parseInt(end);           pixels =Math.floor(pixels);           if (!isNaN(pixels)){            self.getEntryList().style.top =pixels +'px';          } 
           var  curTime =new  Date().getTime();           var  nextTime =startTime +Math.floor(self._duration *nextWeight);           var  delay =Math.max(0,nextTime -curTime); 
           FeedoStyle._timers[self._id]=window.setTimeout(animationLoop,delay);      }else {        FeedoStyle.clearTimer(self._id);          start =end;          if (currentIndex ==self._blockIntervals.length -1){           start =parseInt(self.HEIGHT);           currentIndex =-1;      self.getEntryList().style.top =start +'px';           FeedoStyle._timers[self._id]=window.setTimeout(animate,0);         }else {           FeedoStyle._timers[self._id]=window.setTimeout(animate,self.PAUSE_TIMEOUT);         }   }  };   animationLoop(); } 
  FeedoStyle.clearTimer(self._id);  FeedoStyle._timers[self._id]=window.setTimeout(animate,self.PAUSE_TIMEOUT); 
 
 
};FeedoStyle.Digests.VerticalMarquee.prototype.updateItems =function(){ 
  this.renderItems();};FeedoStyle.Digests.VerticalMarquee.prototype._prepareList =function(list){  var  items =list.getElementsByTagName('li');  var  self =this;  this._totalHeight =0;  this._blockIntervals =[]; 
  this._blockIntervals.push(0);  for(var  i =0;i <items.length;i++) {   var  item =items[i];   item.style.position ='relative';   item.style.width ='100%';   item.onmouseover =function(){   self._isPaused =true;   this.className ='highlight'; };  item.onmouseout =function(){   self._isPaused =false;   this.className =''; };  item.onclick =function(){   var  link =this.getElementsByTagName('a')[0];   link.onclick(); };  
   this._totalHeight =this._totalHeight +item.offsetHeight +this.ENTRY_SPACING;  
   this._blockIntervals.push(this._totalHeight); }};FeedoStyle.Digests.FullPage =function(settings){  var  self =this; 
 
     this._id =settings.id;this.settings =settings; 
 
  this.init();};FeedoStyle.Digests.FullPage.prototype =new  FeedoStyle.Digests.BaseDigest();FeedoStyle.Digests.FullPage.prototype.init =function(){ 
     this.render(); 
  this.HEIGHT ='100%';  this.WIDTH ='100%'; 
 
  var  container =FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_CONTAINER +this._id);  container.className =container.className +' ' +FeedoStyle.DigestFormats.FULL_PAGE;  container.style.width =this.WIDTH;  container.style.height =this.HEIGHT; 
  this.ENTRY_SPACING =this.settings.entrySpacing ?this.settings.entrySpacing :50;  
 
  var  digestBody =this.getDigestBody();  digestBody.style.height =this.HEIGHT ;  
 
  if (this._digest){   FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_TITLE +this._id).innerHTML =this._digest.title;   FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_SUBTITLE +this._id).innerHTML =this._digest.subtitle;   this.renderItems(); }};FeedoStyle.Digests.FullPage.prototype.baseRenderItems =FeedoStyle.Digests.BaseDigest.prototype.renderItems;FeedoStyle.Digests.FullPage.prototype.renderItems =function(){this.baseRenderItems();};FeedoStyle.Digests.FullPage.prototype.updateItems =function(){  var  list =this._createList();  this._updateList(list); 
};FeedoStyle.Digests.Static =function(settings){  var  self =this; 
 
     this._id =settings.id;this.settings =settings; 
 
  this.init();};FeedoStyle.Digests.Static.prototype =new  FeedoStyle.Digests.BaseDigest();FeedoStyle.Digests.Static.prototype.init =function(settings){  if (settings){  
      this.settings =settings; } 
     this.render(); 
  this.HEIGHT =this.settings.height ?this.settings.height :220;  this.WIDTH =this.settings.width ?this.settings.width :200;  
 
  var  container =FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_CONTAINER +this._id);  container.className =container.className +' ' +FeedoStyle.DigestFormats.STATIC;  container.style.position ='relative';  if (navigator.userAgent.indexOf('MSIE 5')!=-1 ||navigator.userAgent.indexOf('MSIE 6')!=-1){   container.style.height ='1%'; 
 }else {   container.style.height ='auto'; 
 } 
  if (this.settings.roundedCorners){   FeedoStyle.makeRoundedCorners(container,this.settings.theme,this.settings.pageBackgroundColor); }else {   container.className =container.className +' plainBorder'; } 
  if (this.settings.collapseOverflow &&this.settings.height &&FeedoStyle.isAbsoluteUnit(this.settings.height)){   container.style.height =FeedoStyle.parseUnit(this.settings.height);   container.style.overflow ='hidden';   var  buffer =[];   buffer.push('<div class="');   buffer.push(FeedoStyle.ElementNames.DIGEST_COLLAPSE);   buffer.push('" id="');   buffer.push(FeedoStyle.ElementNames.DIGEST_COLLAPSE +this._id);   buffer.push('"><a href="');      buffer.push(FeedoStyle.Constants.FAKE_LINK_HREF);      buffer.push('" onclick="');      buffer.push('FeedoStyle.toggleCollapse(\'');      buffer.push(this._id);      buffer.push('\');this.blur();return false;">');      buffer.push(FeedoStyle.Strings.DIGEST_COLLAPSE);      buffer.push('<\/a><\/div>');  
   var  footer =FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_FOOTER);   if (footer){    footer.style.position ='absolute';    footer.style.bottom =0;    footer.style.left =0;  } 
  
   container.innerHTML +=buffer.join(''); } 
 
     if (!this._entries){   FeedoStyle.displayMessage(this._id,FeedoStyle.Constants.WARNING_MSG,FeedoStyle.Strings.NO_ENTRIES_FOUND);}else {   var  m =FeedoStyle.$(FeedoStyle.ElementNames.MESSAGE_AREA +this._id);   m.style.display ='none';}  if (this._digest){ 
   this.renderItems();   if (typeof  this.settings.title !='undefined' &&FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_TITLE +this._id)){    FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_TITLE +this._id).innerHTML =this.settings.title;  }   if (typeof  this.settings.subtitle !='undefined' &&FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_SUBTITLE +this._id)){    FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_SUBTITLE +this._id).innerHTML =this.settings.subtitle;  } 
   if (this._digest.footer &&FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_FOOTER +this._id)){    FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_FOOTER +this._id).innerHTML =this._digest.footer;  } }};FeedoStyle.Digests.Static.prototype.baseRenderItems =FeedoStyle.Digests.BaseDigest.prototype.renderItems;FeedoStyle.Digests.Static.prototype.renderItems =function(){this.baseRenderItems();if (!this._entries){   FeedoStyle.displayMessage(this._id,FeedoStyle.Constants.WARNING_MSG,FeedoStyle.Strings.NO_ENTRIES_FOUND);  return;}else {   var  m =FeedoStyle.$(FeedoStyle.ElementNames.MESSAGE_AREA +this._id);   m.style.display ='none';}};FeedoStyle.Digests.Static.prototype.updateItems =function(){  var  list =this.__createEntries();  this.__updateList(list);};FeedoStyle.Digests.Static.prototype.toggleCollapse =function(){  var  id =this._id;  var  element =FeedoStyle.$(FeedoStyle.ElementNames.DIGEST_CONTAINER +id);  var  self =this; 
  var  resizeTo =function(from,to,duration,startHandler,endHandler){   var  nextStep =0;   var  startTime =0;   var  steps =20;   if (!duration){    duration =400;  }  
   if (self._timer){    window.clearTimeout(self._timer);         self._timer =null;  }  
   var  animationLoop =function(){       var  currentStep =nextStep++;       var  factor =90 *Math.PI /  180;       var  currentWeight =Math.sin((currentStep /  steps)*factor);       var  nextWeight =Math.sin((nextStep /  steps)*factor);      
       if (currentStep <=steps){        var  pixels =(1.0 -currentWeight)*parseInt(from)+currentWeight *parseInt(to);          
     element.style.height =pixels +'px'; 
           var  curTime =new  Date().getTime();           var  nextTime =startTime +Math.floor(duration *nextWeight);           var  delay =Math.max(0,nextTime -curTime); 
           self._timer =window.setTimeout(animationLoop,delay);      }else {     window.clearTimeout(self._timer);          self._timer =null; 
     if (endHandler){      try {       endHandler();     }catch(e){}    }   }  }; 
   var  beginAnimation =function(){    if (startHandler){     try {      startHandler();    }catch(e){}   }    startTime =new  Date().getTime();    animationLoop();  }; 
   self._timer =window.setTimeout(beginAnimation,0); }; 
  if (element.offsetHeight <element.scrollHeight){   resizeTo(element.offsetHeight,element.scrollHeight);  
 }else {   resizeTo(element.offsetHeight,this.settings.height); 
 }};FeedoStyle.CreateFeedoStyle();
