<!--

   function Toggle(item) {
      obj=document.getElementById(item);
      visible=(obj.style.display!="none")
      key=document.getElementById("x" + item);
      if (visible) {
        obj.style.display="none";
        key.innerHTML="<img border='0' src='graphics/down_arrow.gif'>";
      } else {
         obj.style.display="block";
         key.innerHTML="<img border='0' src='graphics/up_arrow.gif'>";
      }
   }
   
   
   // Popup Window
   //function wopen(url, name, w, h)	{
   	function wopen()	{
			// Fudge factors for window decoration space.
 			// In my tests these work well on all platforms & browsers.
			w += 32;
			h += 96;
 			var win = window.open(url,
  		name, 
  		'width=' + w + ', height=' + h + ', ' +
  		'location=no, menubar=no, ' +
  		'status=no, toolbar=no, scrollbars=no, resizable=no');
 			win.resizeTo(w, h);
 			win.focus();
		}

      
   function TimeStampToDate(xmlDate)		{
    	var dt = new Date();
    	var dtS = xmlDate.slice(xmlDate.indexOf('T')+1, xmlDate.indexOf('.'))
    	var TimeArray = dtS.split(":");
    	dt.setUTCHours(TimeArray[0],TimeArray[1],TimeArray[2]);
    	var dtS = xmlDate.slice(0, xmlDate.indexOf('T'))
    	TimeArray = dtS.split("-");
    	dt.setUTCFullYear(TimeArray[0],TimeArray[1]-1,TimeArray[2]);
    	return dt;
    		
		}	
		
		function initialize() {
			var feed = new google.feeds.Feed("http://picasaweb.google.com/data/feed/api/user/bostonnatural.org?kind=album");
			feed.setResultFormat(google.feeds.Feed.XML_FORMAT);
			feed.load(function(result) {
  			var containerheader = document.getElementById("feed_header");
  			var containerfooter = document.getElementById("feed_footer");
  			if (!result.error) {
    			var entries = google.feeds.getElementsByTagNameNS(result.xmlDocument, "http://www.w3.org/2005/Atom", "entry");
    			for (var i = 0; i < entries.length; i++) {
      
      				var idElement = google.feeds.getElementsByTagNameNS(entries[i], "http://www.w3.org/2005/Atom", "id")[0];
      				var albumid = idElement.firstChild.nodeValue;
      				      
      				if (albumid.substr(albumid.length-19,19) == '5330537916518146385') {
      					var titleElement = google.feeds.getElementsByTagNameNS(entries[i], "http://www.w3.org/2005/Atom", "title")[0];
      					var title = titleElement.firstChild.nodeValue;
      
      					var summaryElement = google.feeds.getElementsByTagNameNS(entries[i], "http://www.w3.org/2005/Atom", "summary")[0];
      					var summary = summaryElement.firstChild.nodeValue;
      					
      					var pubdateElement = google.feeds.getElementsByTagNameNS(entries[i], "http://www.w3.org/2005/Atom", "published")[0];
     						var pubdate = pubdateElement.firstChild.nodeValue;
     						var pub_format_date = TimeStampToDate(pubdate);
      					
      					var divheader = document.createElement("div");
      					divheader.innerHTML="<h3>" + title + "</h3>";
      					containerheader.appendChild(divheader);
      					
      					var divfooter = document.createElement("div");
      					divfooter.innerHTML= "<p><b>Description:</b> " + summary + "</p><p><b>Slideshow published on:</b> " + pub_format_date + ".</p>";
      					containerfooter.appendChild(divfooter);
      			      				      					
    					}
          }
  			}
			});
    }
		
//-->

