
            function initializeBR() {
                        }

			/**
			 * printf() for Javascript
			 */
			function sprintf() {
                if( sprintf.arguments.length < 2 ) {
                    return;
                }     	 
                var data = sprintf.arguments[ 0 ]; 	 
                for( var k=1; k<sprintf.arguments.length; ++k ) {
                    switch( typeof( sprintf.arguments[ k ] ) ){
                        case 'string':
                            data = data.replace( /%s/, sprintf.arguments[ k ] );
                            break;
                        case 'number':
                            data = data.replace( /%d/, sprintf.arguments[ k ] );
                            break;
                        case 'boolean':
                            data = data.replace( /%b/, sprintf.arguments[ k ] ? 'true' : 'false' );
                            break;
                            default:
                           /// function | object | undefined
                        break;
                    }
                }
                return(data);
            }

            if( !String.sprintf ) {
            String.sprintf = sprintf;
            }            


            /**
             * generate text showing the age of the bookmark's latest post
             */
            function getAge(days, hours){
                if (days > 1) {
                    var ageMsg = String.sprintf("%d days ago", days);
                } else if (days==1){
                    var ageMsg = "yesterday ";
                } else if (days< 1 && hours > 1) {
                    var ageMsg = String.sprintf("%d hrs ago", hours);
                } else if (days< 1 && hours == 1) {
                    var ageMsg = "in the last hour";
                } else if (days < 1 && hours < 1) {
                    var ageMsg="just recently";
                }
                return ageMsg;
            }
            /* switch visibility of div-element*/
            function divSwitcher(elementId){
                var div = document.getElementById(elementId);
                if(div.style.display == "block"){
                    div.style.display = "none";
                } else {
                    div.style.display = "block";
                }
            }
            /* add jQuery-oberserver to enable mouse-clicks*/
            function addObserver(link, wrapper, preview, feed, name){
                jQuery("#"+link).click(function(){
                    divSwitcher(wrapper);
                    var feedControl = new google.feeds.FeedControl();
                    feedControl.addFeed(feed, name);
                    feedControl.draw(document.getElementById(preview));
                });
                jQuery("#"+wrapper).click(function(){
                    divSwitcher(wrapper);
                });
            }
            /* add age and other info to bookmark*/
            function addAge(entry, bookmark, anchor, divID, previewtoggle, last_posttitle){
                var li = document.getElementById(bookmark);
                var a = document.getElementById(anchor);
                var div = document.getElementById(divID);
                var toggle = document.getElementById(previewtoggle);
                var title = document.getElementById(last_posttitle);
                var now = new Date();
                try {
                    var then = new Date(entry.publishedDate);
                } catch (dateException) {
                    var then = new Date();
                }
                var ageInDays =  Math.floor((now.getTime()-then.getTime())/(1000*60*60*24));
                var ageInHours = Math.floor((now.getTime()-then.getTime())%(1000*60*60*24)/3600000);
                try {
                    a.setAttribute("title", entry.title);
                } catch (titleException) {
                    a.setAttribute("title", "");
                }
				if (!isNaN(then.getTime())){
					// insert age into list-item to allow sorting by age of post
                    li.setAttribute("age", then.getTime());
				} else {
		            /* add "very old" age to bookmarks with no feed-url */
					var randomAge = Math.floor(Math.random()*1000001)
					li.setAttribute("age", randomAge);
				}

                                                return;
            }
            /* add "very old" age to bookmarks with no feed-url */
            function addZeroAge(zeroAgeBookmark){
                var zali = document.getElementById(zeroAgeBookmark);
				var randomAge = Math.floor(Math.random()*1000001)
                if (zali != null )zali.setAttribute("age", randomAge);
                return;
            }

            /*
             *
             */
            function feedreading_automatic_sort() { feedreading_sort('feedreading_blogroll_','desc');	            }

            /* call sort-function every half second */
            var myInterval = window.setInterval(function (){feedreading_automatic_sort(); },500);

            /* stop calling sort-function after 20 seconds */
			window.setTimeout(function (a,b){clearInterval(myInterval);}, 20000);
            
                 