function _PWA_Init(c){var d=new _IG_Prefs(c);function v(){var a=d.getString("user");if(!a||a.indexOf("picasatutorial")==0){a="";var b=_gel("guser");if(b)if(b=b.innerHTML.match(/<b>([^<]+)<\/b>/i))a=b[1]}return a}var n=v(),o=d.getMsg("title_url")+"data/feed/api/user/"+_esc(n);function g(a){this.d=a.summary.$t||a.title.$t;for(var b=0;b<a.link.length;++b)if(a.link[b].rel=="alternate")this.c=a.link[b].href;this.e=a.media$group.media$content[0].url;this.b=parseInt(a.gphoto$timestamp.$t,10)}g.prototype.show=
function(){_gel("picasa_thumbnail"+c).src=this.e+"?imgmax=288";_gel("picasa_img_detail"+c).innerHTML=_hesc(this.d)+" - "+(new Date(this.b)).toLocaleDateString();_gel("picasa_link"+c).href=_hesc(this.c)};var h=[],e=[],i;function p(a){var b=o+"/albumid/"+h[a]+"?kind=photo&alt=json";_IG_FetchContent(b,q,{refreshInterval:300});_IG_FetchContent(b,q);d.set("last_album",h[a])}window["_loadAlbum"+c]=p;function q(a){try{var b=eval("("+a+")").feed.entry;e=[];for(var f=0;f<b.length;++f)e.push(new g(b[f]));k(0)}catch(w){_gel("picasa_img_detail"+
c).innerHTML=a?_hesc(a):d.getMsg("load_error")}}function k(a){if(e.length){i=a;e[a].show();_gel("photoNav"+c).innerHTML=a+1+"/"+e.length;if(g.a){clearTimeout(g.a);g.a=undefined}var b=d.getInt("slideshow_delay");if(b&&e.length>1)g.a=setTimeout(r,b*1000)}}function x(a){var b=_gel("albums"+c),f;try{f=eval("("+a+")").feed.entry}catch(w){s();return}h=[];for(var t=0,l=["<select class=picasa_select"+c+' onchange="_loadAlbum'+c+'(this.selectedIndex)">'],m=0;f&&m<f.length;++m){var j=f[m];if(parseInt(j.gphoto$numphotos.$t,
10)){var u=d.getString("last_album")==j.gphoto$id.$t;if(u)t=h.length;h.push(j.gphoto$id.$t);l.push('<option title="'+_hesc(j.title.$t)+'"'+(u?" selected":"")+">"+_hesc(j.title.$t)+"</option>")}}if(h.length){l.push("</select>");b.innerHTML=l.join("");p(t)}else b.innerHTML=d.getMsg("no_public_album")}window["_prevPhoto"+c]=function(){k(i>0?i-1:e.length-1)};function r(){k(i<e.length-1?i+1:0)}window["_nextPhoto"+c]=r;function s(){_gel("picasa"+c).style.display="none";_gel("picasa_promo"+c).style.display=
"block";_gel("picasa_logo"+c).innerHTML='<img src="/accounts/lh2/picasaweblogo-'+d.getLang()+'.gif" width="206" height="31">'}if(n){var y=o+"?kind=album&alt=json";_IG_FetchContent(y,x,{refreshInterval:300})}else s()}