var a,picasaInfoWindow$style=function(b,d,e,c){this.bottomImage_=b;this.bottomImageSize_=d;this.styleClass_=e;this.infoWindowOffsetX_=c;this.browserAdjustment_=0;var f=navigator.userAgent.toLowerCase(),h=5;if(f.indexOf("macintosh")>-1)h=4;if(f.indexOf("msie")>-1&&f.indexOf("opera")<1)h=0;this.browserAdjustment_=h},picasaInfoWindow$window=function(b,d){this.doc_=b;this.style_=d;this.infoWindowWidth_=180;this.isIE_=this.visible_=false;this.autoPanning_=true;this.infoWindowOffset_=new GPoint(0,0);var e=
navigator.userAgent.toLowerCase();this.isIE_=e.indexOf("msie")>-1&&e.indexOf("opera")<1};try{picasaInfoWindow$window.prototype=new GOverlay}catch(err){}a=picasaInfoWindow$window.prototype;a.initialize=function(b){this.map_=b;this.infoWindowDiv_=this.createInfoWindowDiv(this.infoWindowWidth_);this.bottomImageDiv_=this.createInfoWindowDiv(this.style_.bottomImageSize_.width)};
a.createInfoWindowDiv=function(b){var d=this.doc_.createElement("div");d.style.position="absolute";d.style.width=b+"px";this.map_.getPane(G_MAP_FLOAT_SHADOW_PANE).appendChild(d);return d};a.setPosition=function(b,d,e){b.style.left=d+"px";b.style.bottom=e+"px"};a.remove=function(){this.infoWindowDiv_.parentNode.removeChild(this.infoWindowDiv_);this.bottomImageDiv_.parentNode.removeChild(this.bottomImageDiv_);this.visible_=false};a.copy=function(){return new picasaInfoWindow$window(this.doc_,this.style_)};
a.redraw=function(b){if(this.visible_&&b){var d=this.map_.fromLatLngToDivPixel(this.markerPoint_);this.setPosition(this.bottomImageDiv_,d.x+this.infoWindowOffset_.x,-d.y+this.infoWindowOffset_.y-this.style_.browserAdjustment_);this.setPosition(this.infoWindowDiv_,d.x+this.infoWindowOffset_.x+this.style_.infoWindowOffsetX_,-d.y+this.infoWindowOffset_.y+this.style_.bottomImageSize_.height-1);if(this.autoPanning_){d=this.map_.fromLatLngToContainerPixel(this.markerPoint_,this.map_.getZoom());var e=this.map_.getSize(),
c=0,f=0,h=this.infoWindowWidth_+this.style_.infoWindowOffsetX_;if(d.x+h+5>e.width)c=e.width-d.x-h-5;else if(d.x+this.style_.infoWindowOffsetX_<0)c=0-d.x-this.style_.infoWindowOffsetX_+5;var g=this.infoWindowDiv_.offsetHeight,j=this.isIE_?60:120;if(d.y-this.style_.bottomImageSize_.height-g-j<0)f=this.style_.bottomImageSize_.height+g+j-d.y+5;if(c!=0||f!=0)this.map_.panBy(new GSize(c,f))}}};
a.openInfoWindowOnMarker=function(b,d){var e=b.getIcon().iconAnchor,c=b.getIcon().infoWindowAnchor;this.openInfoWindow(b.getPoint(),d,new GPoint(e.x-c.x,e.y-c.y))};
a.openInfoWindow=function(b,d,e){this.infoWindowOffset_=e||new GPoint(0,0);this.markerPoint_=b;var c=[];c.push('<div class="');c.push(this.style_.styleClass_);c.push('"><nobr>');c.push(d);c.push("</nobr></div>");this.infoWindowDiv_.innerHTML=c.join("");c=[];c.push('<img src="');c.push(this.style_.bottomImage_);c.push('" width="');c.push(this.style_.bottomImageSize_.width.toString());c.push('" height="');c.push(this.style_.bottomImageSize_.height.toString());c.push('">');this.bottomImageDiv_.innerHTML=
c.join("");var f=GOverlay.getZIndex(this.markerPoint_.lat());this.infoWindowDiv_.style.zIndex=f;this.bottomImageDiv_.style.zIndex=f+1;this.setShow(true);this.redraw(true)};a.setShow=function(b){this.infoWindowDiv_.style.display=b?"":"none";this.bottomImageDiv_.style.display=b?"":"none";this.visible_=b};a.setAutoPanning=function(b){this.autoPanning_=b};window["picasaInfoWindow.initialize"]=picasaInfoWindow$window.prototype.initialize;window["picasaInfoWindow.remove"]=picasaInfoWindow$window.prototype.remove;
window["picasaInfoWindow.copy"]=picasaInfoWindow$window.prototype.copy;window["picasaInfoWindow.redraw"]=picasaInfoWindow$window.prototype.redraw;window["picasaInfoWindow.setShow"]=picasaInfoWindow$window.prototype.setShow;window["picasaInfoWindow.setAutoPanning"]=picasaInfoWindow$window.prototype.setAutoPanning;var picasa=picasa||{},tcSearchTip="Search for these photos in Picasa",tcEraseButton="Erase location info",tcEraseTip="Erase map coordinates(i.e., GPS information) from these photos",tcCloseTip="Close this window",tcPhotoHere="1 photo here:",tcPhotosHere="%d photos here:",tcMovePhoto="Move photo here?",tcMovePhotos="Move %d photos here?",tcPutPhoto="Put photo here?",tcPutPhotos="Put %d photos here?",tcOk="OK",tcCancel="Cancel",picasa$geoPanelClass=function(b,d,e,c,f){this.map_=b;this.geocoder_=f;this.searchMarkerOptions_=
{icon:e,draggable:true};this.allMarkers_=[];this.regularMarkerOptions_={icon:d,draggable:true};this.panSize_=new GSize(0,0);this.infoWindow_=c};a=picasa$geoPanelClass.prototype;a.searchMarker_=null;a.currBounds_=null;a.pendingScript_="";a.timeoutID_=0;a.panning_=false;a.currNumSelected_=0;picasa.geoPanelData=null;var picasa$markerData=function(b,d,e,c,f){this.checksum_=b;this.index_=d;this.thumburl_=e;this.moved_=c;this.num_photos_=f};picasa$markerData.prototype.original_latlng_=null;
function picasa_initialize(b,d,e,c,f){document.getElementById("errorDiv").innerHTML=d;document.getElementById("searchErrorDiv").innerHTML=e;document.getElementById("addMarker").setAttribute("alt",c);try{try{eval(f)}catch(h){}if(GBrowserIsCompatible()){var g=new GMap2(document.getElementById("map_canvas"));g.addControl(new GSmallZoomControl3D);g.enableScrollWheelZoom();var j=new GIcon,k=new GIcon,i=[];i.push("file://");i.push(b);i.push("mm_20_red.png");j.image=i.join("");i=[];i.push("file://");i.push(b);
i.push("mm_20_shadow.png");j.shadow=i.join("");k.shadow=i.join("");j.iconSize=new GSize(12,20);j.shadowSize=new GSize(22,20);j.iconAnchor=new GPoint(6,20);j.infoWindowAnchor=new GPoint(5,1);i=[];i.push("file://");i.push(b);i.push("mm_20_green.png");k.image=i.join("");k.iconSize=new GSize(12,20);k.shadowSize=new GSize(22,20);k.iconAnchor=new GPoint(6,20);k.infoWindowAnchor=new GPoint(5,1);var m=new GLatLng(40.979898,-98.261719);g.setCenter(m,3);var n=new picasaInfoWindow$style("bottom_image.gif",new GSize(24,
24),"info_window_bottom_image",-50),l=new picasaInfoWindow$window(document,n);g.addOverlay(l);picasa.geoPanelData=new picasa$geoPanelClass(g,j,k,l,new GClientGeocoder);ProcessQueue()}else{document.getElementById("errorDiv").style.display="block";document.getElementById("addMarkerDiv").style.display="none";return false}}catch(o){document.getElementById("errorDiv").style.display="block";document.getElementById("addMarkerDiv").style.display="none";return false}document.getElementById("errorDiv").style.display=
"none";document.getElementById("addMarkerDiv").style.display="block";return true}picasa.unInitialize=function(){try{GUnload()}catch(b){}};
picasa.handleClick=function(){if(this.picasaData)if(this.picasaData.thumburl_.length>0)picasa.openMarkerInfoWindow(this,"","Place photos to this new mark");else{var b=document.getElementById("hiddenDiv");b.setAttribute("checksum",this.picasaData.checksum_.toString());b.setAttribute("latlng",this.getLatLng().toUrlValue());b.setAttribute("markindex",this.picasaData.index_.toString());picasa.notifyPicasa("hiddenDiv")}};
picasa.handleDragStart=function(){picasa.geoPanelData.infoWindow_.setShow(false);this.setImage(picasa.geoPanelData.searchMarkerOptions_.icon.image);if(this.picasaData){this.picasaData.original_latlng_=this.getLatLng();this.picasaData.moved_=true}};
picasa.handleDragEnd=function(){if(this.picasaData)if(this.picasaData.thumburl_.length>0)picasa.openMarkerInfoWindow(this,"","Place photos to this new mark");else{var b=document.getElementById("hiddenDiv");if(b){b.setAttribute("checksum",this.picasaData.checksum_.toString());b.setAttribute("latlng",this.getLatLng().toUrlValue());b.setAttribute("markindex",this.picasaData.index_.toString());picasa.notifyPicasa("hiddenDiv")}}};
picasa.cancelMarker=function(b){picasa.geoPanelData.infoWindow_.setShow(false);if(picasa.geoPanelData.map_&&b!=-1&&b<picasa.geoPanelData.allMarkers_.length){var d=picasa.geoPanelData.allMarkers_[b];if(!(d.picasaData==null||!d.picasaData.moved_)){d.picasaData.moved_=false;d.setImage(picasa.geoPanelData.regularMarkerOptions_.icon.image);d.setLatLng(d.picasaData.original_latlng_);picasa.geoPanelData.map_.panTo(d.picasaData.original_latlng_)}}};
picasa.openMarkerInfoWindow=function(b,d,e){if(!(b==null||b.picasaData==null||b.picasaData.thumburl_.length==0)){var c="";c=b.picasaData.moved_?formatInfoWindowForPlacement(b,d,e):formatInfoWindowForContents(b);picasa.geoPanelData.infoWindow_.openInfoWindowOnMarker(b,c)}};
picasa.beginAddingMarkers=function(){if(picasa.geoPanelData.map_){picasa.geoPanelData.map_.clearOverlays();picasa.geoPanelData.allMarkers_=[];picasa.geoPanelData.infoWindow_&&picasa.geoPanelData.map_.addOverlay(picasa.geoPanelData.infoWindow_);if(picasa.geoPanelData.currBounds_==null)picasa.geoPanelData.currBounds_=new GLatLngBounds}};
picasa.addMarker=function(b,d,e,c){if(picasa.geoPanelData.map_){var f=new GLatLng(b,d);picasa.geoPanelData.currBounds_.extend(f);var h=new GMarker(f,picasa.geoPanelData.regularMarkerOptions_),g=picasa.geoPanelData.allMarkers_.length;h.picasaData=new picasa$markerData(e,g,"",false,c);GEvent.addListener(h,"click",picasa.handleClick);GEvent.addListener(h,"dragstart",picasa.handleDragStart);GEvent.addListener(h,"dragend",picasa.handleDragEnd);picasa.geoPanelData.map_.addOverlay(h);picasa.geoPanelData.allMarkers_[g]=
h}};picasa.endAddingMarkers=function(b){var d=picasa.geoPanelData.allMarkers_.length;if(d){if(b){var e=picasa.geoPanelData.map_.getBoundsZoomLevel(picasa.geoPanelData.currBounds_)-1;if(e<0)e=0;if(e>15)e=15;picasa.geoPanelData.map_.setZoom(e)}var c=picasa.geoPanelData.currBounds_.getCenter();d==1?picasa.geoPanelData.map_.panTo(c):picasa.geoPanelData.map_.setCenter(c)}picasa.geoPanelData.currBounds_=null};
picasa.updateMarker=function(b,d){if(picasa.geoPanelData.map_&&b<picasa.geoPanelData.allMarkers_.length){var e=picasa.geoPanelData.allMarkers_[b];e.picasaData.thumburl_=d;picasa.openMarkerInfoWindow(e,"","Place photos to this new mark")}};picasa.handlePanning=function(){!picasa.geoPanelData.panning_||picasa.geoPanelData.map_==null||picasa.geoPanelData.map_.panBy(picasa.geoPanelData.panSize_)};
picasa.newPlaceMarker=function(b,d){if(picasa.geoPanelData.map_){var e=picasa.geoPanelData.map_.fromContainerPixelToLatLng(new GPoint(50,55));picasa.geoPanelData.searchMarker_=picasa.createSearchMarker(e,d,b,"");if(!(picasa.geoPanelData.searchMarker_==null)){GEvent.addListener(picasa.geoPanelData.map_,"moveend",picasa.handlePanning);picasa.geoPanelData.panning_=false;picasa.geoPanelData.panSize_=new GSize(0,0);var c=GEvent.addListener(picasa.geoPanelData.map_,"mousemove",function(f){picasa.geoPanelData.searchMarker_.setLatLng(f);
var h=picasa.geoPanelData.map_.getSize(),g=0,j=0;if(!(f.lat()>89||f.lat()<-89)){var k=picasa.geoPanelData.map_.fromLatLngToContainerPixel(f,picasa.geoPanelData.map_.getZoom());g=k.x<10?2:h.width-k.x<10?-2:0;j=k.y<10?2:h.height-k.y<10?-2:0;if(g!=0||j!=0){picasa.geoPanelData.panSize_=new GSize(g,j);picasa.geoPanelData.panning_=true;picasa.handlePanning()}else picasa.geoPanelData.panning_=false}});GEvent.addListener(picasa.geoPanelData.map_,"click",function(){GEvent.clearListeners(picasa.geoPanelData.map_,
"moveend");if(c){GEvent.removeListener(c);c=null;picasa.openMarkerInfoWindow(picasa.geoPanelData.searchMarker_,"",b)}})}}};
picasa.createSearchMarker=function(b,d,e,c){if(picasa.geoPanelData.map_){picasa.geoPanelData.searchMarker_&&picasa.geoPanelData.map_.removeOverlay(picasa.geoPanelData.searchMarker_);picasa.geoPanelData.searchMarker_=new GMarker(b,picasa.geoPanelData.searchMarkerOptions_);picasa.geoPanelData.searchMarker_.picasaData=new picasa$markerData(-1,-1,d,true,picasa.geoPanelData.currNumSelected_);GEvent.addListener(picasa.geoPanelData.searchMarker_,"click",function(){picasa.openMarkerInfoWindow(picasa.geoPanelData.searchMarker_,
c,e)});GEvent.addListener(picasa.geoPanelData.searchMarker_,"dragstart",function(){picasa.geoPanelData.infoWindow_.setShow(false)});GEvent.addListener(picasa.geoPanelData.searchMarker_,"dragend",function(){picasa.openMarkerInfoWindow(picasa.geoPanelData.searchMarker_,c,e)});picasa.geoPanelData.map_.addOverlay(picasa.geoPanelData.searchMarker_);return picasa.geoPanelData.searchMarker_}};
picasa.beginDragAndDrop=function(b,d){if(picasa.geoPanelData.map_){var e=picasa.geoPanelData.map_.fromContainerPixelToLatLng(new GPoint(b,d));picasa.createSearchMarker(e,"","","")}};picasa.updateDragAndDrop=function(b,d){if(picasa.geoPanelData.map_&&picasa.geoPanelData.searchMarker_){var e=picasa.geoPanelData.map_.fromContainerPixelToLatLng(new GPoint(b,d));picasa.geoPanelData.searchMarker_.setLatLng(e)}};
picasa.endDragAndDrop=function(b,d,e,c,f){if(picasa.geoPanelData.map_)if(b){if(picasa.geoPanelData.searchMarker_){picasa.geoPanelData.map_.removeOverlay(picasa.geoPanelData.searchMarker_);picasa.geoPanelData.searchMarker_=null}}else if(!(picasa.geoPanelData.searchMarker_==null)){var h=picasa.geoPanelData.map_.fromContainerPixelToLatLng(new GPoint(d,e));picasa.createSearchMarker(h,f,c,"");picasa.openMarkerInfoWindow(picasa.geoPanelData.searchMarker_,"",c)}};
picasa.setMapType=function(b){if(picasa.geoPanelData.map_){var d=[G_NORMAL_MAP,G_SATELLITE_MAP,G_HYBRID_MAP,G_PHYSICAL_MAP];picasa.geoPanelData.map_.setMapType(d[b])}};picasa.setNumSelected=function(b){picasa.geoPanelData.currNumSelected_=b};function ProcessQueue(){if(picasa.geoPanelData.pendingScript_.length){try{eval(picasa.geoPanelData.pendingScript_)}catch(b){}picasa.geoPanelData.pendingScript_=""}picasa.geoPanelData.timeoutID_=setTimeout(ProcessQueue,250)}
function StopQueue(){clearTimeout(picasa.geoPanelData.timeoutID_);picasa.geoPanelData.pendingScript_=""}function SubmitQueue(b){picasa.geoPanelData.pendingScript_=b}picasa.notifyPicasa=function(b){var d=window.WebBrowserPicasaPlugin;if(d)try{d.elementEventNotify(b,"click")}catch(e){alert("An exception occurred calling plugin. Error name: "+e.name+". Error message: "+e.message)}document.getElementById(b).click()};
function formatInfoWindowForContents(b){var d=b.picasaData.checksum_!=-1?'"cleargeotag:'+b.picasaData.checksum_+'"':"",e=b.picasaData.checksum_!=-1?'"showphotos:'+b.picasaData.checksum_+'"':"",c=[];c.push('<table border="0" cellpadding="1" cellspacing="2" width="180">');var f=[];b.picasaData.num_photos_>1?f.push(tcPhotosHere.replace("%d",b.picasaData.num_photos_.toString())):f.push(tcPhotoHere);c.push('<tr><td colspan="3" width="100%" class="info_window_title" nowrap>');c.push('<a href="javascript:picasa.geoPanelData.infoWindow_.setShow(false)">');
c.push('<img width="14" height="13" title="');c.push(tcCloseTip);c.push('" src="close.gif" class="info_window_close"></a>');c.push(f.join(""));c.push("</td></tr>");c.push('<tr><td colspan="3"><div class="info_window_thumb"><a href=');c.push(e);c.push(' title="');c.push(tcSearchTip);c.push('"><img src="');c.push(b.picasaData.thumburl_);if(b.picasaData.thumburl_.substr(0,5)!='data:'){c.push("?");c.push((new Date).getTime());}c.push('"></a></div></td></tr>');c.push("<tr>");var h=[];if(d.length){h.push("<td><a href=");h.push(d);h.push('title="');h.push(tcEraseTip);
h.push('"><div width="60%" class="info_window_footer_button">');h.push(tcEraseButton);h.push("</div></a></td>")}c.push('<td width="20%"></td>');h.length&&c.push(h.join(""));c.push('<td width="20%"></td>');c.push("</tr></table>");return c.join("")}
function formatInfoWindowForPlacement(b,d,e){var c=[],f=b.getLatLng();if(f!=null&&e.length){c.push('"geotag:');c.push(b.picasaData.checksum_.toString());c.push(",");c.push(f.toUrlValue());c.push('"')}var h=b.picasaData.checksum_!=-1?'"showphotos:'+b.picasaData.checksum_+'"':"",g=[];g.push('<table border="0" cellpadding="1" cellspacing="2" width="180">');var j="";j=b.picasaData.index_!=-1?b.picasaData.num_photos_>1?tcMovePhotos:tcMovePhoto:b.picasaData.num_photos_>1?tcPutPhotos:tcPutPhoto;if(b.picasaData.num_photos_>
1)j=j.replace("%d",b.picasaData.num_photos_.toString());g.push('<tr><td colspan="3" width="100%" class="info_window_title" nowrap>');g.push(j);g.push("</td></tr>");if(h.length){g.push('<tr><td colspan="3"><div class="info_window_thumb"><a href=');g.push(h);g.push(' title="');g.push(tcSearchTip);g.push('"><img src="');g.push(b.picasaData.thumburl_);g.push("?");g.push((new Date).getTime());g.push('"></a></div></td></tr>')}else{g.push('<tr><td colspan="3"><div class="info_window_thumb"><img src="');
g.push(b.picasaData.thumburl_);g.push("?");g.push((new Date).getTime());g.push('"></div></td></tr>')}var k=[],i=[];if(c.length){k.push('<td width="40%"><a href=');k.push(c.join(""));k.push('><div class="info_window_footer_button">');k.push(tcOk);k.push("</div></a></td>")}i.push('<td width="40%">');i.push('<a href="javascript:picasa.cancelMarker(');i.push(b.picasaData.index_.toString());i.push(');">');i.push('<div class="info_window_footer_button">');i.push(tcCancel);i.push("</div></a></td>");g.push(k.join(""));
g.push(i.join(""));g.push("</tr></table>");return g.join("")}
picasa.search=function(b,d,e){picasa.geoPanelData.map_&&picasa.geoPanelData.geocoder_&&picasa.geoPanelData.geocoder_.getLocations(b,function(c){if(!c||c.Status.code!=200)document.getElementById("searchErrorDiv").style.display="block";else{var f=c.Placemark[0],h=new GLatLng(f.Point.coordinates[1],f.Point.coordinates[0]);picasa.geoPanelData.infoWindow_.setAutoPanning(false);picasa.geoPanelData.map_.setCenter(h,13);picasa.createSearchMarker(h,e,d,f);if(!(picasa.geoPanelData.searchMarker_==null)){picasa.openMarkerInfoWindow(picasa.geoPanelData.searchMarker_,
f,d);setTimeout("picasa.geoPanelData.infoWindow_.setAutoPanning(true);",2000)}}})};window.picasa=picasa;window.initialize=picasa_initialize;window.unInitialize=picasa.unInitialize;window.setMapType=picasa.setMapType;window.setNumSelected=picasa.setNumSelected;window.beginAddingMarkers=picasa.beginAddingMarkers;window.addMarker=picasa.addMarker;window.endAddingMarkers=picasa.endAddingMarkers;window.updateMarker=picasa.updateMarker;window.newPlaceMarker=picasa.newPlaceMarker;
window.beginDragAndDrop=picasa.beginDragAndDrop;window.updateDragAndDrop=picasa.updateDragAndDrop;window.endDragAndDrop=picasa.endDragAndDrop;window.notifyPicasa=picasa.notifyPicasa;window.SubmitQueue=SubmitQueue;window.search=picasa.search;window.ProcessQueue=ProcessQueue;window.StopQueue=StopQueue;
