F._corrections_box={created:false,snag:2,show_right_side:true,has_the_map_moved_or_what:false,corrections_box_go_go_go:function(){F.eb_add(this);this.created=true;F.decorate(_ge("one_corrections_close_img"),F._simple_button).button_go_go_go();this.pop_shadow_id=F.make_shadow(this.id,10008).id},show:function(D){if(!_ge("f_div_corrections_box_holder_border").created){F.decorate(_ge("f_div_corrections_box_holder_border"),F._corrections_box).corrections_box_go_go_go();_ge("f_div_corrections_box_holder_border").show(D);return }scrollTo(0,0);F.eb_broadcast("stewart_pause");var E=_find_screen_width();var B=0;var C=724;var A=B+_pi((E-C)/2);A=Math.max(A,1);Y.U.Dom.setStyle(_ge("f_div_corrections_box_holder_border"),"left",A+"px");Y.U.Dom.setStyle(_ge("f_div_corrections_box_holder_border"),"display","block");_ge(_ge("f_div_corrections_box_holder_border").pop_shadow_id).shadow_size_and_place();_ge(_ge("f_div_corrections_box_holder_border").pop_shadow_id).shadow_show();F.decorate(_ge("f_div_corrections_right_side"),F._corrections_box.right_side_holder).right_side_holder_go_go_go(D);if(!F.is_ie){Y.U.Dom.setStyle("div_geo_feedback_list_alternative_locations_list_ul","margin-left","-25px")}else{Y.U.Dom.setStyle("div_geo_feedback_list_alternative_locations_list_ul","margin-left","15px")}if(F.is_safari){Y.U.Dom.setStyle("f_div_corrections_psst_holder","width","200px")}setTimeout("_ge('f_div_corrections_box_holder_border').map_box.show("+D+")",50);F.modal_blocker.show()},hide:function(){_ge(this.pop_shadow_id).shadow_hide();Y.U.Dom.setStyle("div_geo_feedback_finding_locations","display","none");Y.U.Dom.setStyle("div_geo_remove_location_confirm","display","none");Y.U.Dom.setStyle("div_geo_perms","display","none");Y.U.Dom.setStyle("div_geo_feedback_list_locations","display","none");Y.U.Dom.setStyle("div_geo_feedback_saving","display","none");Y.U.Dom.setStyle("div_geo_feedback_finding_alternative_locations","display","none");Y.U.Dom.setStyle("div_geo_feedback_list_alternative_locations","display","none");Y.U.Dom.setStyle("div_geo_removing","display","none");Y.U.Dom.setStyle("div_geo_other_photos","display","none");Y.U.Dom.setStyle("div_geo_saved_success","display","none");Y.U.Dom.setStyle("div_geo_removed_success","display","none");Y.U.Dom.setStyle("div_corrections_search_results_clicked","display","none");Y.U.Dom.setStyle("div_corrections_search_no_results","display","none");Y.U.Dom.setStyle("div_corrections_search_results_clicked","display","none");Y.U.Dom.setStyle("div_corrections_main_form","display","none");Y.U.Dom.setStyle("pp_geo","display","none");Y.U.Dom.setStyle("f_div_corrections_map_holder","display","block");if(Y.U.Dom.getStyle("div_corrections_inside","display")=="block"){Y.U.Dom.setStyle("div_corrections_inside","display","none");Y.U.Dom.setStyle("div_corrections_save_bottom","display","block");Y.U.Dom.setStyle("f_div_extra_options_2","display","block")}Y.U.Dom.setStyle("div_corrections_main_form","display","block");Y.U.Dom.setStyle(this,"display","none");F.modal_blocker.hide();F.eb_broadcast("stewart_play_if_was_playing");return false},window_onresize:function(){var D=window.innerWidth;var B=window.pageXOffset;var C=724;var A=B+_pi((D-C)/2);A=Math.max(A,1);Y.U.Dom.setStyle(_ge("f_div_corrections_box_holder_border"),"left",A+"px");_ge(_ge("f_div_corrections_box_holder_border").pop_shadow_id).shadow_size_and_place()},right_side_holder:{closed:true,loaded_geobookmarks:false,already_loading_js:false,block_size:[],new_map_link:{},two_second_delay_time_started_for_dunstan_because_he_is_picky_like_that:0,saved_responseXML:"",show_box:true,right_side_holder_go_go_go:function(A){if(page_p.video_thumb_src){}else{}_ge("f_div_corrections_psst").innerHTML=F.output.get("corrections_psst",_taken_in);_ge("div_geo_feedback_after_list").innerHTML=F.output.get("corrections_never_mind_2",_taken_in);this.show_box=A;if(A){this.style.display="block";_ge("f_div_corrections_topbar_left").innerHTML=F.output.get("corrections_add_location_2")}else{this.style.display="none";_ge("f_div_corrections_topbar_left").innerHTML=F.output.get("map")+": "+_taken_in}F.decorate(_ge("freeform_geotagging"),this.input_box);F.decorate(_ge("freeform_geotagging_2"),this.input_box);F.decorate(_ge("freeform_geotagging_3"),this.input_box);F.decorate(_ge("freeform_geotagging_4"),this.input_box);F.decorate(_ge("geo_form_save"),this.submit_button);F.decorate(_ge("geo_form_save_2"),this.submit_button);F.decorate(_ge("geo_form_save_3"),this.submit_button);F.decorate(_ge("geo_form_save_geotagged"),this.submit_button_geotagged)},input_box:{do_first_lat_long_auto_insert:true,onkeyup:function(C){if(!C){C=window.event}var A=_get_event_keycode(C);if(A==71&&C.ctrlKey&&C.altKey){this.value="geo:long="}if(A==13){if(this.id=="freeform_geotagging"){_ge("inp_freeform_geotagging_go").onclick()}else{if(this.id=="freeform_geotagging_2"){_ge("inp_freeform_geotagging_go_2").onclick()}else{if(this.id=="freeform_geotagging_3"){_ge("inp_freeform_geotagging_go_3").onclick()}else{_ge("inp_freeform_geotagging_go_4").onclick()}}}return }if(this.do_first_lat_long_auto_insert){var B=new RegExp("^(geo:(lat)=(\\+|\\-)?((\\d+\\.\\d+)|\\d+)([,; ]))$");var D=new RegExp("^(geo:(lon|long)=(\\+|\\-)?((\\d+\\.\\d+)|\\d+)([,; ]))$");if(this.value.toLowerCase().match(B)){this.value=this.value.toLowerCase()+" geo:long=";this.do_first_lat_long_auto_insert=false}if(this.value.toLowerCase().match(D)){this.value=this.value.toLowerCase()+" geo:lat=";this.do_first_lat_long_auto_insert=false}}},onfocus:function(){this.select()}},submit_button:{onclick:function(){if(_ge("freeform_geotagging").value.length>1&&_ge("freeform_geotagging").value.substr(0,1)=="@"){_ge("f_div_corrections_right_side").find_at(_ge("freeform_geotagging").value.substr(1,9999));return }_ge("f_div_corrections_right_side").save_at_center()},validate:function(A,B){if(typeof (A)=="undefined"||typeof (B)=="undefined"||typeof (A)!="number"||typeof (B)!="number"||isNaN(A)||isNaN(B)){return false}if(Math.abs(A)>90||Math.abs(B)>180){return false}return true}},submit_button_geotagged:{onclick:function(){var C=_use_viewgeo;for(var B=0;B<_ge("geo_bookmark_privacy_slct_geotagged").options.length;B++){if(_ge("geo_bookmark_privacy_slct_geotagged").options[B].selected){C=_ge("geo_bookmark_privacy_slct_geotagged").options[B].value;break}}var A={flickr_photos_geo_setPerms_onLoad:function(I,H,E,G){if(I){_use_viewgeo=G.new_viewgeo;if(_use_viewgeo==5){_ge("f_div_corrections_who_can_see").innerHTML='<img width="15" height="15" class="absmiddle" src="/images/icon_private.gif"/> '}else{if(_use_viewgeo==0){_ge("f_div_corrections_who_can_see").innerHTML='<img width="15" height="15" class="absmiddle" src="/images/icon_public.gif"/> '}else{_ge("f_div_corrections_who_can_see").innerHTML='<img width="15" height="15" class="absmiddle" src="/images/icon_a_bit_private.gif"/> '}}_ge("f_div_corrections_who_can_see").innerHTML+=F.output.get("geotag_from_page_who_can_see_2_"+_use_viewgeo)+" ";for(var D=0;D<_ge("geo_bookmark_privacy_slct").options.length;D++){if(_pi(_ge("geo_bookmark_privacy_slct").options[D].value)==_use_viewgeo){_ge("geo_bookmark_privacy_slct").options[D].selected=true}else{_ge("geo_bookmark_privacy_slct").options[D].selected=false}}for(var D=0;D<_ge("geo_bookmark_privacy_slct_geotagged").options.length;D++){if(_pi(_ge("geo_bookmark_privacy_slct_geotagged").options[D].value)==_use_viewgeo){_ge("geo_bookmark_privacy_slct_geotagged").options[D].selected=true}else{_ge("geo_bookmark_privacy_slct_geotagged").options[D].selected=false}}}Y.U.Dom.setStyle("div_geo_saved_success","display","block");Y.U.Dom.setStyle("div_corrections_main_form","display","block");Y.U.Dom.setStyle("div_geo_feedback_saving","display","none");setTimeout("_ge('f_div_corrections_right_side').fade_save_success()",800)}};Y.U.Dom.setStyle("div_corrections_main_form","display","none");Y.U.Dom.setStyle("div_geo_feedback_saving","display","block");if(C==0){F.API.callMethod("flickr.photos.geo.setPerms",{photo_id:page_photo_id,is_public:1,is_friend:0,is_family:0,is_contact:0,new_viewgeo:C},A)}if(C==1){F.API.callMethod("flickr.photos.geo.setPerms",{photo_id:page_photo_id,is_public:0,is_friend:0,is_family:0,is_contact:1,new_viewgeo:C},A)}if(C==2){F.API.callMethod("flickr.photos.geo.setPerms",{photo_id:page_photo_id,is_public:0,is_friend:1,is_family:1,is_contact:0,new_viewgeo:C},A)}if(C==3){F.API.callMethod("flickr.photos.geo.setPerms",{photo_id:page_photo_id,is_public:0,is_friend:1,is_family:0,is_contact:0,new_viewgeo:C},A)}if(C==4){F.API.callMethod("flickr.photos.geo.setPerms",{photo_id:page_photo_id,is_public:0,is_friend:0,is_family:1,is_contact:0,new_viewgeo:C},A)}if(C==5){F.API.callMethod("flickr.photos.geo.setPerms",{photo_id:page_photo_id,is_public:0,is_friend:0,is_family:0,is_contact:0,new_viewgeo:C},A)}}},find_at:function(A){var B={flickr_photos_search_onLoad:function(H,G,D,E){if(H){if(G.documentElement.getElementsByTagName("photo").length==1){photo_id=G.documentElement.getElementsByTagName("photo")[0].getAttribute("id");var C={flickr_photos_getInfo_onLoad:function(O,N,K,M){if(O){if(N.documentElement.getElementsByTagName("location").length==0){var L=N.documentElement.getElementsByTagName("url");var I="";for(var J=0;J<L.length;J++){if(L[J].getAttribute("type")=="photopage"){I=L[J].childNodes[0].nodeValue}}if(I!=""){new_html="<strong>"+F.output.get("global_plus_geo_no_geo_bookmark_data_for_with_path",I,"@"+M.tags)+"</strong>"}else{new_html="<strong>"+F.output.get("global_plus_geo_no_geo_bookmark_data_for","@"+M.tags)+"</strong>"}_ge("a_geotag_toggle").set_failed_search(new_html)}else{latitude=N.documentElement.getElementsByTagName("location")[0].getAttribute("latitude");longitude=N.documentElement.getElementsByTagName("location")[0].getAttribute("longitude");accuracy=N.documentElement.getElementsByTagName("location")[0].getAttribute("accuracy");_geo_perms={geo_ispublic:N.documentElement.getElementsByTagName("geoperms")[0].getAttribute("ispublic"),geo_iscontact:N.documentElement.getElementsByTagName("geoperms")[0].getAttribute("iscontact"),geo_isfriend:N.documentElement.getElementsByTagName("geoperms")[0].getAttribute("isfriend"),geo_isfamily:N.documentElement.getElementsByTagName("geoperms")[0].getAttribute("isfamily")};_ge("f_div_corrections_box_holder_border").map_box.ymap.drawZoomAndCenter(new YGeoPoint(latitude,longitude),Math.min(16,Math.max(0,17-accuracy)));_ge("geo_form_save").click()}}else{}}};F.API.callMethod("flickr.photos.getInfo",{photo_id:photo_id,tags:E.tags},C,null,null,0)}else{}}else{}}};Y.U.Dom.setStyle("div_corrections_main_form","display","none");Y.U.Dom.setStyle("div_geo_feedback_finding_locations","display","block");F.API.callMethod("flickr.photos.search",{user_id:global_nsid,tags:"geo:bookmark="+A,extras:"geo",per_page:1},B,null,null,0)},find_location:function(A){var B={flickr_geocode_translate_onLoad:function(f,U,M,D){if(f){var e=U.documentElement.getElementsByTagName("ResultSet")[0];var Q=U.documentElement.getElementsByTagName("Result");var o=e.getAttribute("fl:source_id");var L=D.location.trim().split(",")[0];var S=[];var V=false;var G=function(i){var r=1;if(i.precision=="GeocodedBuilding"){r=16}if(i.precision=="POI"){r=16}if(i.precision=="GeocodedStreet"){r=15}if(i.precision=="Suburb"){r=11}if(i.precision=="Town"){r=9}if(i.precision=="State"){r=5}if(i.precision=="Country"){r=2}return r};var n=function(s,r){if(r==6){var t='<li id="location_li_more"><a href="#" class="Plain" onclick="_ge(\'f_div_corrections_right_side\').show_other_locations()">More...</a></li><div id="f_div_more_locations" style="display:none"><li>'}else{var t="<li>"}t+='<a href="#" class="Plain" onclick="_ge(\'f_div_corrections_right_side\').jump_to_position(_ge(\'f_div_corrections_right_side\').locations['+r+']); return false">';t+=s.sub_title;t+="</a></li>";return t};var W=0;for(l=0;l<Q.length;l++){try{var m=String(Q[l].getAttribute("precision"))}catch(h){var m=""}try{var N=String(Q[l].getElementsByTagName("woe_specificprobability")[0].firstChild.nodeValue)}catch(h){var N=""}try{var p=String(Q[l].getElementsByTagName("woe_woeid")[0].firstChild.nodeValue)}catch(h){var p=""}var Z=String(Q[l].getElementsByTagName("Latitude")[0].firstChild.nodeValue);var K=String(Q[l].getElementsByTagName("Longitude")[0].firstChild.nodeValue);try{var R=String(Q[l].getElementsByTagName("woe_bbox")[0].firstChild.nodeValue)}catch(h){var R=""}try{var j=String(Q[l].getElementsByTagName("Address")[0].firstChild.nodeValue)}catch(h){var j=""}try{var O=String(Q[l].getElementsByTagName("City")[0].firstChild.nodeValue)}catch(h){var O=""}try{var q=String(Q[l].getElementsByTagName("State")[0].firstChild.nodeValue)}catch(h){var q=""}try{var T=String(Q[l].getElementsByTagName("Zip")[0].firstChild.nodeValue)}catch(h){var T=""}try{var c=String(Q[l].getElementsByTagName("Country")[0].firstChild.nodeValue)}catch(h){var c=""}try{var d=String(Q[l].getElementsByTagName("place_url")[0].firstChild.nodeValue)}catch(h){var d=""}c=(c=="United States")?"US":c;c=(c=="United Kingdom")?"UK":c;var X="";var C="";var E=L.toLowerCase();if(m=="GeocodedBuilding"||m=="POI"){if(j){C=C+", "+j}}if(O){C=C+", "+O}if(q){C=C+", "+q}if(c){C=C+", "+c}if(C.length>2){C=C.substring(2,C.length)}if(m=="County"){X=L.substring(0,1).toUpperCase()+L.substring(1,L.length)+" County"}else{if(m=="GeocodedBuilding"){C=L.split(" ")[0]+" "+C}else{if(m=="POI"){X=L}else{sub_titleA=C.split(", ");if(E==sub_titleA[0].toLowerCase()){if(sub_titleA[0]!=C){X=sub_titleA[0];C=C.replace(sub_titleA[0]+", ","")}}if(X==""){X=L}}}}if(S.length==0||(S.length>0&&(X!=S[S.length-1].title||C!=S[S.length-1].sub_title))){var b=Math.abs(_pf(R.split(",")[0])-_pf(R.split(",")[2]));var I=Math.abs(_pf(R.split(",")[1])-_pf(R.split(",")[3]));var k=new woe_location_obj(p,X,C,N,R,m,Z,K);k.query_string=D.location;V=true;var P=100.035;if((b+I<P||m=="GeocodedBuilding"||m=="POI"||m=="GeocodedStreet")){S.push(k)}else{if(m!="Country"){W++}else{W+=5}}}}if(W>=5){S=[]}if(S.length==0){_ge("div_corrections_search_no_results_display").innerHTML=F.output.get("corrections_no_matches_for_2",D.location)+" "+F.output.get("corrections_search_again");Y.U.Dom.setStyle("div_geo_feedback_finding_locations","display","none");Y.U.Dom.setStyle("div_corrections_search_no_results","display","block");return }else{if(S.length==1&&(S[0].precision=="GeocodedBuilding"||S[0].precision=="POI"||S[0].precision=="GeocodedStreet")){var g=F.output.get("global_plus_geo_one_match")+"<br /><ul class='corrections_list'>";for(var l=0;l<S.length;l++){g+=n(S[l],l)}if(S.length>=6){g+="</div>"}g+="</ul>";Y.U.Dom.setStyle("div_geo_feedback_finding_locations","display","none");_ge("f_div_corrections_right_side").jump_to_position(S[0]);return }else{if(S.length==1){var g=F.output.get("global_plus_geo_one_match")+"<br /><br />";Y.U.Dom.setStyle("div_geo_feedback_finding_locations","display","none");_ge("f_div_corrections_right_side").jump_to_position(S[0]);return }else{if(!F.is_ie){var g=F.output.get("corrections_found_x_matches_2",S.length,D.location)+"<br /><ul style='margin-left:-25px; font-size:11px'>"}else{var g=F.output.get("corrections_found_x_matches_2",S.length,D.location)+"<br /><ul style='margin-left:15px; font-size:11px'>"}}for(var l=0;l<S.length;l++){g+=n(S[l],l)}g+="</ul>"}}_ge("f_div_corrections_right_side").locations=S;_ge("div_geo_feedback_list_locations_list").innerHTML=g;_ge("div_geo_feedback_list_locations").scrollTop=0;Y.U.Dom.setStyle("div_geo_feedback_finding_locations","display","none");Y.U.Dom.setStyle("div_geo_feedback_list_locations","display","block")}else{try{var J=_pi(U.documentElement.getElementsByTagName("err")[0].getAttribute("code"));var a=U.documentElement.getElementsByTagName("err")[0].getAttribute("msg")}catch(h){var H=F.output.get("unknown_err")}_ge("div_geo_feedback_error_msg").innerHTML=H;Y.U.Dom.setStyle("div_geo_feedback_finding_locations","display","none");Y.U.Dom.setStyle("div_geo_feedback_error","display","block")}}};Y.U.Dom.setStyle("div_corrections_main_form","display","none");Y.U.Dom.setStyle("div_corrections_search_results_clicked","display","none");Y.U.Dom.setStyle("div_corrections_search_no_results","display","none");Y.U.Dom.setStyle("div_geo_feedback_list_locations","display","none");Y.U.Dom.setStyle("div_geo_feedback_list_alternative_locations","display","none");_ge("div_geo_feedback_finding_locations").style.display="block";F.API.callMethod("flickr.geocode.translate",{provider_name:(_qs_args.provider_name)?_qs_args.provider_name:"woe",location:A},B,null,null,0)},show_other_locations:function(){Y.U.Dom.setStyle("f_div_more_locations","display","block");Y.U.Dom.setStyle("location_li_more","display","none")},go:function(A){if(A){_ge("freeform_geotagging").value=_ge("freeform_geotagging"+A).value}var C=_ge("freeform_geotagging").value.toLowerCase();var B=this.parse_input(C);if(B.error){if(B.error=="find location"){this.find_location(C)}}else{Y.U.Dom.setStyle("f_img_ch_white","display","none");Y.U.Dom.setStyle("f_img_ch_pink","display","block");_is_editing_geo=true;_ge("f_div_corrections_box_holder_border").map_box.jump_to_lat_lon(B.lat,B.lon);_ge("f_div_corrections_right_side").display_lat_lon(_ge("f_div_corrections_box_holder_border").map_box.ymap.getCenterLatLon());_ge("geo_form_save").disabled=false}},parse_input:function(G){if(G.length>1&&G.substr(0,1)=="@"){this.find_at(G.substr(1,9999));return{error:"doing bookmark"}}var L=new RegExp("^(geo:lat=(\\+|\\-)?((\\d+\\.\\d+)|\\d+)([,; ]+))(geo:(long|lon)=(\\+|\\-)?((\\d+\\.\\d+)|\\d+))");var H=new RegExp("^(geo:(long|lon)=(\\+|\\-)?((\\d+\\.\\d+)|\\d+)([,; ]+))(geo:lat=(\\+|\\-)?((\\d+\\.\\d+)|\\d+))");var I=new RegExp("[a-z:=]","g");var Q=new RegExp("[ ;]","g");var K=new RegExp(",+","g");if(G.match(L)){found_value=G.replace(I,"").replace(Q,",").replace(K,",");var O=_pf(found_value.split(",")[0]);var R=_pf(found_value.split(",")[1])}if(G.match(H)){found_value=G.replace(I,"").replace(Q,",").replace(K,",");var O=_pf(found_value.split(",")[1]);var R=_pf(found_value.split(",")[0])}if(typeof (O)=="undefined"){var E=null;var N=null;var P=null;G=G.replace(String.fromCharCode(8220),'"').replace(String.fromCharCode(8221),'"').replace(String.fromCharCode(8216),"'").replace(String.fromCharCode(8217),"'").replace(String.fromCharCode(176),"*");var B=null;var D=null;if(G.indexOf("n")>0){E=true;B=G.indexOf("n")}if(G.indexOf("s")>0){E=false;B=G.indexOf("s")}if(G.indexOf("e")>0){N=true;D=G.indexOf("e")}if(G.indexOf("w")>0){N=false;D=G.indexOf("w")}if(B!=null&&D!=null&&D<B){this.lon_first=true}if(G.indexOf("*")>0&&G.indexOf("'")>0&&G.indexOf('"')>0){var G=G.replace(new RegExp("[nsew'\"*]"),",").replace(new RegExp(",+")," ").replace(new RegExp(" +")," ");var M=G.split(" ");if(M.length>=6){var O=_pi(M[0]);if(O>=0){O+=(M[1]/60)+(M[2]/6000)}else{O-=((M[1]/60)+(M[2]/6000))}var R=_pi(M[3]);if(R>=0){R+=(M[4]/60)+(M[5]/6000)}else{R-=((M[4]/60)+(M[5]/6000))}}}if(G.indexOf("*")>0&&G.indexOf("'")>0){var G=G.replace(new RegExp("[nsew'\"*]"),",").replace(new RegExp(",+")," ").replace(new RegExp(" +")," ");var M=G.split(" ");if(M.length>=4){var O=_pi(M[0]);if(O>=0){O+=(M[1]/60)}else{O-=(M[1]/60)}var R=_pi(M[2]);if(R>=0){R+=(M[3]/60)}else{R-=(M[3]/60)}}}if(typeof (M)=="undefined"){var G=G.replace(new RegExp("[nsew'\"*]"),",").replace(new RegExp(",+")," ").replace(new RegExp(" +")," ");var M=G.split(" ");if(M.length>=2){var O=_pf(M[0]);var R=_pf(M[1])}}if(P==true){var A=O;O=R;R=A}if(E==true){O=Math.abs(O)}if(E==false){O=-1*Math.abs(O)}if(N==true){R=Math.abs(R)}if(N==false){R=-1*Math.abs(R)}}if(this.validate(O,R)){return{lat:O,lon:R}}else{var J=_ge("freeform_geotagging").value.toLowerCase().replace(new RegExp("[a-z]"),"").replace(new RegExp("[,;*'\" ]"),"");var C=_ge("freeform_geotagging").value.toLowerCase().replace(new RegExp("[0-9]"),"").replace(new RegExp("[,;*'\" ]"),"");if((J.length*0.7)>C.length){return{error:"mangled format"}}else{return{error:"find location"}}}},validate:function(A,B){if(typeof (A)=="undefined"||typeof (B)=="undefined"||typeof (A)!="number"||typeof (B)!="number"||isNaN(A)||isNaN(B)){return false}if(Math.abs(A)>90||Math.abs(B)>180){return false}return true},start_editing:function(){_is_editing_geo=true;Y.U.Dom.setStyle("div_single_marker_holder","display","none");Y.U.Dom.setStyle("f_img_ch_white","display","none");Y.U.Dom.setStyle("f_img_ch_pink","display","block");Y.U.Dom.setStyle("f_div_extra_options","display","none");Y.U.Dom.setStyle("div_corrections_inside","display","none");Y.U.Dom.setStyle("f_div_edit_form","display","block");Y.U.Dom.setStyle("div_corrections_save_bottom","display","block");if(!_is_suggestion){Y.U.Dom.setStyle("f_div_corrections_psst_holder","display","block")}_ge("f_div_corrections_box_holder_border").map_box.get_center_point_label();_ge("f_div_corrections_right_side").display_lat_lon(_ge("f_div_corrections_box_holder_border").map_box.ymap.getCenterLatLon());Y.U.Dom.setStyle("div_corrections_main_form","display","block")},reset_stuff:function(){Y.U.Dom.setStyle("f_img_ch_white","display","none");Y.U.Dom.setStyle("f_img_ch_pink","display","none");_ge("f_div_corrections_box_holder_border").map_box.jump_to_last_saved_position();Y.U.Dom.setStyle("div_single_marker_holder","display","block");_is_editing_geo=false;_ge("f_div_corrections_right_side").display_lat_lon(_ge("f_div_corrections_box_holder_border").map_box.ymap.getCenterLatLon())},stop_editing:function(){Y.U.Dom.setStyle("div_geo_feedback_list_locations","display","none");Y.U.Dom.setStyle("div_corrections_main_form","display","block")},set_perms:function(){var C=-1;for(var B=0;B<document.forms.frm_geo_perms.length;B++){if(document.forms.frm_geo_perms[B].checked){C=document.forms.frm_geo_perms[B].value}}if(C>-1&&C!=_use_viewgeo){var A={flickr_photos_geo_setPerms_onLoad:function(H,G,D,E){if(H){_use_viewgeo=E.new_viewgeo}if(_use_viewgeo==5){_ge("f_div_corrections_who_can_see").innerHTML='<img width="15" height="15" class="absmiddle" src="/images/icon_private.gif"/> '}else{if(_use_viewgeo==0){_ge("f_div_corrections_who_can_see").innerHTML='<img width="15" height="15" class="absmiddle" src="/images/icon_public.gif"/> '}else{_ge("f_div_corrections_who_can_see").innerHTML='<img width="15" height="15" class="absmiddle" src="/images/icon_a_bit_private.gif"/> '}}_ge("f_div_corrections_who_can_see").innerHTML+=F.output.get("geotag_from_page_who_can_see_2_"+_use_viewgeo);Y.U.Dom.setStyle("div_geo_saved_success","display","block");Y.U.Dom.setStyle("div_corrections_main_form","display","block");Y.U.Dom.setStyle("div_geo_feedback_saving","display","none");setTimeout("_ge('f_div_corrections_right_side').fade_save_success()",800)}};Y.U.Dom.setStyle("div_geo_perms","display","none");Y.U.Dom.setStyle("div_geo_feedback_saving","display","block");if(C==0){F.API.callMethod("flickr.photos.geo.setPerms",{photo_id:page_photo_id,is_public:1,is_friend:0,is_family:0,is_contact:0,new_viewgeo:C},A)}if(C==1){F.API.callMethod("flickr.photos.geo.setPerms",{photo_id:page_photo_id,is_public:0,is_friend:0,is_family:0,is_contact:1,new_viewgeo:C},A)}if(C==2){F.API.callMethod("flickr.photos.geo.setPerms",{photo_id:page_photo_id,is_public:0,is_friend:1,is_family:1,is_contact:0,new_viewgeo:C},A)}if(C==3){F.API.callMethod("flickr.photos.geo.setPerms",{photo_id:page_photo_id,is_public:0,is_friend:1,is_family:0,is_contact:0,new_viewgeo:C},A)}if(C==4){F.API.callMethod("flickr.photos.geo.setPerms",{photo_id:page_photo_id,is_public:0,is_friend:0,is_family:1,is_contact:0,new_viewgeo:C},A)}if(C==5){F.API.callMethod("flickr.photos.geo.setPerms",{photo_id:page_photo_id,is_public:0,is_friend:0,is_family:0,is_contact:0,new_viewgeo:C},A)}}},jump_to_position:function(A){this.current_location_obj=A;_ge("f_div_corrections_box_holder_border").map_box.jump_to_position(this.current_location_obj);_ge("f_div_corrections_right_side").display_lat_lon(_ge("f_div_corrections_box_holder_border").map_box.ymap.getCenterLatLon());if(this.current_location_obj.title!=""&&this.current_location_obj.sub_title!=""){if(this.current_location_obj.title.toLowerCase()==this.current_location_obj.sub_title.split(",")[0].toLowerCase()){var B=this.current_location_obj.sub_title.split(",")[0]}else{var B=this.current_location_obj.title+", "+this.current_location_obj.sub_title.split(",")[0]}}else{if(this.current_location_obj.title!=""){if(this.current_location_obj.title.split(",").length==1){var B=this.current_location_obj.title}else{if(this.current_location_obj.title.split(",")[0].toLowerCase()==this.current_location_obj.title.split(",")[1].toLowerCase()){var B=this.current_location_obj.title.split(",")[1]}else{var B=this.current_location_obj.title.split(",")[0]+", "+this.current_location_obj.title.split(",")[1]}}}else{if(this.current_location_obj.sub_title!=""){if(this.current_location_obj.sub_title.split(",").length==1){var B=this.current_location_obj.sub_title}else{if(this.current_location_obj.sub_title.split(",")[0].toLowerCase()==this.current_location_obj.sub_title.split(",")[1]){var B=this.current_location_obj.sub_title.split(",")[1]}else{var B=this.current_location_obj.sub_title.split(",")[0]+", "+this.current_location_obj.sub_title.split(",")[1]}}}else{var B=F.output.get("a_place_with_no_name")}}}_ge("f_div_corrections_search_results_clicked").innerHTML=F.output.get("corrections_heres_a_place",B);_ge("div_corrections_search_no_results_display").innerHTML=F.output.get("corrections_drag_around",B);_ge("f_div_corrections_box_holder_border").map_box.map_moved=0;Y.U.Dom.setStyle("div_geo_feedback_list_locations","display","none");Y.U.Dom.setStyle("div_corrections_search_results_clicked","display","block")},save_at_marker:function(){this.current_location_obj={};this.current_location_obj.query_string="";this.current_location_obj.lat=_ge("f_div_corrections_box_holder_border").map_box.mo.YGeoPoint.Lat;this.current_location_obj.lon=_ge("f_div_corrections_box_holder_border").map_box.mo.YGeoPoint.Lon;this.current_location_obj.acc=Math.min(16,Math.max(0,17-_ge("f_div_corrections_box_holder_border").map_box.ymap.getZoomLevel()));this.save_location()},save_at_center:function(){this.current_location_obj={};this.current_location_obj.query_string="";this.current_location_obj.lat=_ge("f_div_corrections_box_holder_border").map_box.ymap.getCenterLatLon().Lat;this.current_location_obj.lon=_ge("f_div_corrections_box_holder_border").map_box.ymap.getCenterLatLon().Lon;this.current_location_obj.acc=Math.min(16,Math.max(0,17-_ge("f_div_corrections_box_holder_border").map_box.ymap.getZoomLevel()));this.save_location()},flickr_photos_geo_setLocation_onLoad:function(G,E,C,D){if(G){_has_geo=true;_ge("f_div_corrections_right_side").load_new_position(D.accuracy,false)}else{try{var A=_pi(E.documentElement.getElementsByTagName("err")[0].getAttribute("code"));var I=E.documentElement.getElementsByTagName("err")[0].getAttribute("msg");var B=F.output.get("api_err_generic")+" "+I}catch(H){var B=F.output.get("unknown_err")}_ge("div_geo_feedback_error_msg").innerHTML=B;_ge("div_geo_feedback_saving").style.display="none";_ge("div_geo_feedback_error").style.display="block"}},flickr_photos_suggestions_removeSuggestion_onLoad:function(G,E,C,D){if(G){F.API.callMethod("flickr.photos.suggestions.suggestLocation",D.carry_over_obj,_ge("f_div_corrections_right_side"),null,null,0)}else{try{var A=_pi(E.documentElement.getElementsByTagName("err")[0].getAttribute("code"));var I=E.documentElement.getElementsByTagName("err")[0].getAttribute("msg");var B=F.output.get("api_err_generic")+" "+I}catch(H){var B=F.output.get("unknown_err")}}},flickr_photos_suggestions_suggestLocation_onLoad:function(L,J,G,C){if(L){YAHOO.util.Dom.setStyle("li_edit_suggestion","display","block");YAHOO.util.Dom.setStyle("li_add_suggestion","display","none");_has_geo=true;var H=_pf(C.lat);var A=_pf(C.lon);var D=_pf(C.accuracy);_use_4real_location=H+", "+A+", "+D;_suggestion_obj={latitude:H,longitude:A,key:J.documentElement.getElementsByTagName("suggestion")[0].getAttribute("id")};Y.U.Dom.setStyle("f_img_ch_pink","display","none");_ge("f_div_corrections_box_holder_border").map_box.set_splat();_ge("f_div_corrections_right_side").close_saving();Y.U.Dom.setStyle("div_corrections_inside","display","block")}else{try{var E=_pi(J.documentElement.getElementsByTagName("err")[0].getAttribute("code"));var B=J.documentElement.getElementsByTagName("err")[0].getAttribute("msg");var I=F.output.get("api_err_generic")+" "+B}catch(K){var I=F.output.get("unknown_err")}}},save_location:function(){var A=this.current_location_obj.query_string;if(A.length>=2&&A.substr(0,2)==", "){A=A.substr(2,9999)}Y.U.Dom.setStyle("div_corrections_main_form","display","none");Y.U.Dom.setStyle("div_geo_feedback_finding_locations","display","none");Y.U.Dom.setStyle("div_corrections_search_results_clicked","display","none");Y.U.Dom.setStyle("div_corrections_search_no_results","display","none");Y.U.Dom.setStyle("div_geo_feedback_saving","display","block");if(this.current_location_obj.acc==undefined){this.current_location_obj.acc=Math.min(16,Math.max(0,17-_ge("f_div_corrections_box_holder_border").map_box.ymap.getZoomLevel()))}if(_is_suggestion){if(typeof (_suggestion_obj)=="object"&&_suggestion_obj!=null){var B={photo_id:page_photo_id,lat:this.current_location_obj.lat,lon:this.current_location_obj.lon,accuracy:this.current_location_obj.acc};F.API.callMethod("flickr.photos.suggestions.removeSuggestion",{carry_over_obj:B,suggestion_id:_suggestion_obj.key},_ge("f_div_corrections_right_side"),null,null,0)}else{F.API.callMethod("flickr.photos.suggestions.suggestLocation",{photo_id:page_photo_id,lat:this.current_location_obj.lat,lon:this.current_location_obj.lon,accuracy:this.current_location_obj.acc},_ge("f_div_corrections_right_side"),null,null,0)}}else{F.API.callMethod("flickr.photos.geo.setLocation",{photo_id:page_photo_id,lat:this.current_location_obj.lat,lon:this.current_location_obj.lon,accuracy:this.current_location_obj.acc,query:A,provider:"user"},_ge("f_div_corrections_right_side"),null,null,0)}},load_new_position:function(B,C){var A={flickr_photos_geo_getLocation_onLoad:function(M,D,N,U){if(M){if(typeof (_photo_acc)!="undefined"){_photo_acc=_pi(D.documentElement.getElementsByTagName("location")[0].getAttribute("accuracy"))}_has_geo=true;var L=_pf(D.documentElement.getElementsByTagName("location")[0].getAttribute("latitude"));var G=_pf(D.documentElement.getElementsByTagName("location")[0].getAttribute("longitude"));var K=_pf(D.documentElement.getElementsByTagName("location")[0].getAttribute("accuracy"));_use_4real_location=L+", "+G+", "+K;Y.U.Dom.setStyle("div_geo_block","display","block");_ge("div_taken_in").innerHTML=D.documentElement.getElementsByTagName("location")[0].getAttribute("taken_in").replace("&lt;","<").replace("&gt;",">").replace("&#38;lt;","<").replace("&#38;gt;",">");_ge("div_taken_in_links").innerHTML=' (<a class="Plain" onclick="F._corrections_box.show(true); return false" href="#">'+F.output.get("corrections_edit")+'</a> | <a class="Plain" onclick="F._corrections_box.show(false); return false" href="#">'+F.output.get("corrections_map")+"</a>)";var Q=/<a[^>]*>|<\/a>|<b>|<\/b>/ig;var P=D.documentElement.getElementsByTagName("location")[0].getAttribute("taken_in").replace("&lt;","<").replace("&gt;",">").replace("&#38;lt;","<").replace("&#38;gt;",">").replace('""','"').replace("Taken","taken");var E="";for(var T=0;T<D.documentElement.getElementsByTagName("location")[0].childNodes.length;T++){if(D.documentElement.getElementsByTagName("location")[0].childNodes[T].nodeType==1&&D.documentElement.getElementsByTagName("location")[0].childNodes[T].getAttribute("place_id")!=null){var J=D.documentElement.getElementsByTagName("location")[0].childNodes[T].firstChild.nodeValue;if(E==""){E=J}else{if(E.toLowerCase()!=J.toLowerCase()){E+=", "+J;break}}}}_taken_in=E;if(U.check_for_other_photos){_ge("f_div_corrections_drag_around").innerHTML=F.output.get("corrections_now_were_saying_2",_taken_in);_ge("f_div_corrections_drag_around").innerHTML+=' (<a href="#" class="Plain" onclick="_ge(\'f_div_corrections_right_side\').start_editing()">'+F.output.get("corrections_edit")+"</a>)"}else{if(page_p.video_thumb_src){_ge("f_div_corrections_drag_around").innerHTML=F.output.get("corrections_weve_placed_video_2",_taken_in)}else{_ge("f_div_corrections_drag_around").innerHTML=F.output.get("corrections_weve_placed_photo_2",_taken_in)}_ge("f_div_corrections_drag_around").innerHTML+=' (<a href="#" class="Plain" onclick="_ge(\'f_div_corrections_right_side\').start_editing()">'+F.output.get("corrections_edit")+"</a>)"}_ge("f_div_corrections_psst").innerHTML=F.output.get("corrections_psst",_taken_in);_ge("div_geo_feedback_after_list").innerHTML=F.output.get("corrections_never_mind_2",_taken_in);var R=D.documentElement.getElementsByTagName("location")[0].getAttribute("woeid");if(U.check_for_other_photos&&1==1){var I={flickr_photos_geo_photosForLocation_onLoad:function(a,Z,W,X){if(a){if(_pi(Z.documentElement.getElementsByTagName("photos")[0].getAttribute("total"))>1){if(_pi(Z.documentElement.getElementsByTagName("photos")[0].getAttribute("total"))==2){_ge("div_geo_other_photos_number").innerHTML=F.output.get("corrections_other_photo_2","<strong>"+_taken_in+"</strong>")+"<br /><br />"+F.output.get("corrections_other_photo_pt_single_2",1)}else{_ge("div_geo_other_photos_number").innerHTML=F.output.get("corrections_other_photo_2","<strong>"+_taken_in+"</strong>")+"<br /><br />"+F.output.get("corrections_other_photo_pt_plural_2",(_pi(Z.documentElement.getElementsByTagName("photos")[0].getAttribute("total"))-1).pretty_num())}Y.U.Dom.setStyle("div_geo_feedback_saving","display","none");Y.U.Dom.setStyle("div_geo_other_photos","display","block");_ge("pp-source_geo").innerHTML='<ul class="pp-list_geo"></ul><div class="clear"></div><span id="pp-loading_geo"></span>';Y.U.Dom.setStyle("pp_geo","display","block");Y.U.Dom.setStyle("f_div_corrections_map_holder","display","none");_pp_geo.apiData.lastCallParams.lat=X.lat;_pp_geo.apiData.lastCallParams.lon=X.lon;_pp_geo.apiData.lastCallParams.acc=X.accuracy;_pp_geo.apiData.lastCallParams.woe_id=X.woe_id;_pp_geo.apiData.lastCallParams.per_page=X.per_page;_pp_geo.makePhotosList(_pp_geo.parseCollection(Z))}else{if(_geo_perms.geo_ispublic){_ge("f_div_corrections_right_side").save_pre_perms()}else{_ge("f_div_corrections_right_side").close_saving()}}}}};F.API.callMethod("flickr.photos.geo.photosForLocation",{lat:L,lon:G,accuracy:K,per_page:50,woe_id:R},I,null,null,0)}else{if(_geo_perms.geo_ispublic){_ge("f_div_corrections_right_side").save_pre_perms()}else{_ge("f_div_corrections_right_side").close_saving()}}}else{try{var S=_pi(D.documentElement.getElementsByTagName("err")[0].getAttribute("code"));var H=D.documentElement.getElementsByTagName("err")[0].getAttribute("msg");var O=F.output.get("api_err_generic")+H}catch(V){var O=F.output.get("unknown_err")}_ge("div_geo_feedback_error_msg").innerHTML="<strong>"+O+"</strong>";_ge("div_geo_feedback_saving").style.display="none";_ge("div_geo_feedback_error").style.display="block"}}};F.API.callMethod("flickr.photos.geo.getLocation",{photo_id:page_photo_id,accuracy:B,breadcrumb:1,check_for_other_photos:C},A,null,null,0)},load_new_suggestion:function(){},save_pre_perms:function(){var A={flickr_photos_geo_setPerms_onLoad:function(H,G,D,E){if(H){_use_viewgeo=E.new_viewgeo;if(_use_viewgeo==5){_ge("f_div_corrections_who_can_see").innerHTML='<img width="15" height="15" class="absmiddle" src="/images/icon_private.gif"/> '}else{if(_use_viewgeo==0){_ge("f_div_corrections_who_can_see").innerHTML='<img width="15" height="15" class="absmiddle" src="/images/icon_public.gif"/> '}else{_ge("f_div_corrections_who_can_see").innerHTML='<img width="15" height="15" class="absmiddle" src="/images/icon_a_bit_private.gif"/> '}}_ge("f_div_corrections_who_can_see").innerHTML+=F.output.get("geotag_from_page_who_can_see_2_"+_use_viewgeo);for(var C=0;C<document.forms.frm_geo_perms.length;C++){if(_use_viewgeo==document.forms.frm_geo_perms[C].value){document.forms.frm_geo_perms.selected=true}else{document.forms.frm_geo_perms.selected=false}}}_ge("f_div_corrections_right_side").close_saving()}};if(_geo_perms.is_public&&!_geo_perms.is_friend&&!_geo_perms.is_family&&!_geo_perms.is_contact){var B=0}if(!_geo_perms.is_public&&!_geo_perms.is_friend&&!_geo_perms.is_family&&_geo_perms.is_contact){var B=1}if(!_geo_perms.is_public&&_geo_perms.is_friend&&_geo_perms.is_family&&!_geo_perms.is_contact){var B=2}if(!_geo_perms.is_public&&_geo_perms.is_friend&&!_geo_perms.is_family&&!_geo_perms.is_contact){var B=3}if(!_geo_perms.is_public&&!_geo_perms.is_friend&&_geo_perms.is_family&&!_geo_perms.is_contact){var B=4}if(!_geo_perms.is_public&&!_geo_perms.is_friend&&!_geo_perms.is_family&&!_geo_perms.is_contact){var B=5}_geo_perms={};F.API.callMethod("flickr.photos.geo.setPerms",{photo_id:page_photo_id,is_public:_geo_perms.is_public,is_friend:_geo_perms.is_public,is_family:_geo_perms.is_public,is_contact:_geo_perms.is_public,new_viewgeo:B},A)},update_other_locations:function(){var A={flickr_photos_geo_batchCorrectLocation_onLoad:function(E,D,B,C){if(E){}else{}}};F.API.callMethod("flickr.photos.geo.batchCorrectLocation",{lat:_pp_geo.apiData.lastCallParams.lat,lon:_pp_geo.apiData.lastCallParams.lon,accuracy:_pp_geo.apiData.lastCallParams.acc,place_id:_pp_geo.apiData.lastCallParams.woe_id},A,null,null,0);this.close_saving()},close_saving:function(){if(!_is_suggestion){this.reset_stuff()}Y.U.Dom.setStyle("div_geo_feedback_saving","display","none");Y.U.Dom.setStyle("div_geo_other_photos","display","none");Y.U.Dom.setStyle("div_geo_saved_success","display","block");Y.U.Dom.setStyle("f_div_edit_form","display","none");Y.U.Dom.setStyle("div_corrections_save_bottom","display","none");if(!_is_suggestion){Y.U.Dom.setStyle("f_div_extra_options","display","block");Y.U.Dom.setStyle("div_corrections_inside","display","block");Y.U.Dom.setStyle("f_div_corrections_psst_holder","display","block")}Y.U.Dom.setStyle("div_corrections_main_form","display","block");setTimeout("_ge('f_div_corrections_right_side').fade_save_success()",800);if(_ge("pp-source_geo")&&!_is_suggestion){try{_ge("pp-source_geo").scrollTop=0}catch(A){}}_ge("f_div_corrections_map_holder").style.display="block"},pre_fetch_alternatives:function(){_ge("div_geo_feedback_list_alternative_locations_list_ul").innerHTML="";_ge("div_corrections_main_form").style.display="none";_ge("div_geo_feedback_list_alternative_locations").style.display="none";_ge("div_geo_feedback_finding_alternative_locations").style.display="block";this.fetch_alternatives(_use_4real_location.split("|")[0].split(",")[0],_use_4real_location.split("|")[0].split(",")[1],_use_4real_location.split("|")[0].split(",")[2])},alt_fetch_alternatives:function(B,C,A){_ge("li_find_mode").innerHTML=_ge("div_geo_feedback_finding_alternative_locations").innerHTML;this.fetch_alternatives(B,C,A)},fetch_alternatives:function(K,C,E){K=parseFloat(K);C=parseFloat(C);E=parseInt(E);if(E>0){if(E>=1&&E<=2){E=5}if(E>=3&&E<=5){E=4}if(E>=6&&E<=8){E=3}if(E>=9&&E<=11){E=2}if(E>=12&&E<=14){E=1}if(E>=15&&E<=16){E=1}}else{E=E*-1}if(_place_map[E]){var H=_place_map[E].type;var G=_place_map[E].distance}else{if(_place_map[6]){var H=_place_map[6].type;var G=_place_map[6].distance}else{var H=29;var G=1500}}var J=0.056;var L=K-(J*G/8);var I=K+(J*G/8);var B=C-(J*G/8);var M=C+(J*G/8);var D={flickr_photos_geo_placesForBoundingBox_onLoad:function(W,V,S,Q){if(W){var N=V.documentElement.getElementsByTagName("place");var U="";var P=V.documentElement.getElementsByTagName("places")[0].getAttribute("place_type");for(var R=0;R<N.length;R++){var T=N[R].firstChild.nodeValue;if(T.split(",").length>1){T=T.split(",")[0]+", "+T.split(",")[1]}U+='<li><a href="#" class="Plain" onclick="_ge(\'f_div_corrections_right_side\').correct_location(\''+N[R].getAttribute("place_id")+"', "+P+');return false">'+T+"</a></li>"}if(P==22){var O=-2}if(P==7){var O=-3}if(P==9){var O=-4}if(P==8){var O=-5}if(P==12){var O=-6}if(P==29){var O=-7}if(_ge("li_find_mode")){_ge("li_find_mode").parentNode.removeChild(_ge("li_find_mode"))}U+='<li id="li_find_mode"><a href="#" onclick="_ge(\'f_div_corrections_right_side\').alt_fetch_alternatives(\''+Q.pass_params.lat+"','"+Q.pass_params.lon+"','"+O+'\'); return false" class="Plain">'+F.output.get("corrections_more")+"</a></li>";_ge("div_geo_feedback_list_alternative_locations_list_ul").innerHTML+=U;_ge("div_geo_feedback_finding_alternative_locations").style.display="none";_ge("div_geo_feedback_list_alternative_locations").style.display="block"}else{if(_ge("li_find_mode")){_ge("li_find_mode").parentNode.removeChild(_ge("li_find_mode"))}_ge("div_geo_feedback_list_alternative_locations_list_ul").innerHTML+="<li>"+F.output.get("corrections_no_more")+"</li>";_ge("div_geo_feedback_finding_alternative_locations").style.display="none";_ge("div_geo_feedback_list_alternative_locations").style.display="block"}}};var A={lat:K,lon:C,step:(E*-1)};F.API.callMethod("flickr.photos.geo.placesForBoundingBox",{bbox:B+","+L+","+M+","+I,placetype:H,pass_params:A},D,null,null,0)},cancel_alternatives:function(){Y.U.Dom.setStyle("div_corrections_main_form","display","block");Y.U.Dom.setStyle("div_geo_feedback_list_alternative_locations","display","none")},correct_location:function(A,C){var B={flickr_photos_geo_correctLocation_onLoad:function(I,H,E,G){if(I){if(G.place_type==22){var D=16}if(G.place_type==7){var D=14}if(G.place_type==9){var D=11}if(G.place_type==8){var D=8}if(G.place_type==12){var D=5}if(G.place_type==29){var D=2}_ge("f_div_corrections_right_side").load_new_position(D,true)}}};_ge("div_geo_feedback_list_alternative_locations").style.display="none";_ge("div_geo_feedback_saving").style.display="block";F.API.callMethod("flickr.photos.geo.correctLocation",{photo_id:page_photo_id,place_id:A,place_type:C},B,null,null,0)},remove_location:function(){var A={flickr_photos_geo_removeLocation_onLoad:function(G,E,C,D){if(G){Y.U.Dom.setStyle("div_single_marker_holder","display","none");Y.U.Dom.setStyle("f_img_ch_pink","display","block");_is_editing_geo=true;_has_geo=false;_taken_in="";_ge("freeform_geotagging").value="";_ge("freeform_geotagging_2").value="";_ge("freeform_geotagging_3").value="";_ge("freeform_geotagging_4").value="";_ge("geo_form_save").disabled=false;for(var B=0;B<document.forms.frm_geo_perms.length;B++){if(_default_viewgeo==document.forms.frm_geo_perms[B].value){document.forms.frm_geo_perms.selected=true}}Y.U.Dom.setStyle("div_corrections_inside","display","none");Y.U.Dom.setStyle("f_div_corrections_psst_holder","display","none");YAHOO.util.Dom.setStyle("div_geo_removing","display","none");YAHOO.util.Dom.setStyle("div_geo_remove_success","display","block");YAHOO.util.Dom.setStyle("f_div_edit_form","display","block");YAHOO.util.Dom.setStyle("div_corrections_save_bottom","display","block");YAHOO.util.Dom.setStyle("div_corrections_main_form","display","block");_ge("f_div_corrections_box_holder_border").map_box.drag_around_timer_id=setTimeout("_ge('f_div_corrections_box_holder_border').map_box.get_center_point_label()",333);setTimeout("_ge('f_div_corrections_right_side').fade_remove_success()",800);_ge("f_div_corrections_right_side").display_lat_lon(_ge("f_div_corrections_box_holder_border").map_box.ymap.getCenterLatLon());_ge("div_taken_in").innerHTML="";_ge("div_taken_in_links").innerHTML='<a class="Plain" onclick="F._corrections_box.show(true); return false" href="#">'+F.output.get("corrections_add_location_2")+"</a>";YAHOO.util.Dom.setStyle("f_div_extra_options","display","none");YAHOO.util.Dom.setStyle("f_div_extra_options_2","display","none")}else{}},flickr_photos_suggestions_removeSuggestion_onLoad:function(E,D,B,C){if(E){_ge("f_div_corrections_box_holder_border").map_box.hide_splat();Y.U.Dom.setStyle("f_img_ch_pink","display","block");_is_editing_geo=true;_has_geo=false;_ge("freeform_geotagging").value="";_ge("freeform_geotagging_2").value="";_ge("freeform_geotagging_3").value="";_ge("freeform_geotagging_4").value="";_ge("geo_form_save").disabled=false;Y.U.Dom.setStyle("div_corrections_inside","display","none");Y.U.Dom.setStyle("f_div_corrections_psst_holder","display","none");YAHOO.util.Dom.setStyle("div_geo_removing","display","none");YAHOO.util.Dom.setStyle("div_geo_remove_success","display","block");YAHOO.util.Dom.setStyle("f_div_edit_form","display","block");YAHOO.util.Dom.setStyle("div_corrections_save_bottom","display","block");YAHOO.util.Dom.setStyle("div_corrections_main_form","display","block");_ge("f_div_corrections_box_holder_border").map_box.drag_around_timer_id=setTimeout("_ge('f_div_corrections_box_holder_border').map_box.get_center_point_label()",333);setTimeout("_ge('f_div_corrections_right_side').fade_remove_success()",800);_ge("f_div_corrections_right_side").display_lat_lon(_ge("f_div_corrections_box_holder_border").map_box.ymap.getCenterLatLon());YAHOO.util.Dom.setStyle("li_edit_suggestion","display","none");YAHOO.util.Dom.setStyle("li_add_suggestion","display","block");YAHOO.util.Dom.setStyle("f_div_extra_options","display","none");YAHOO.util.Dom.setStyle("f_div_extra_options_2","display","none");_suggestion_obj=null}else{}}};YAHOO.util.Dom.setStyle("div_geo_remove_location_confirm","display","none");YAHOO.util.Dom.setStyle("div_geo_removing","display","block");if(_is_suggestion){F.API.callMethod("flickr.photos.suggestions.removeSuggestion",{suggestion_id:_suggestion_obj.key},A,null,null,0)}else{F.API.callMethod("flickr.photos.geo.removeLocation",{photo_id:page_photo_id},A,null,null,0)}},display_lat_lon:function(A){_ge("f_div_corrections_bottombar_right").innerHTML=this.make_pretty(A.Lat,A.Lon)+"<br />";_ge("f_div_corrections_bottombar_right").innerHTML+="("+(_pi(A.Lat*10000)/10000)+", "+(_pi(A.Lon*10000)/10000)+")";_ge("f_div_corrections_bottombar_right").innerHTML+='<span class="geo" style="display:none"><span class="latitude">'+A.Lat+'</span><span class="longitude">'+A.Lon+"</span></span>"},display_drag_around:function(A){},make_pretty:function(C,D){var B=this.dec_to_dms(C);if(C>0){B.push("N")}else{B.push("S")}var A=this.dec_to_dms(D);if(D>0){A.push("E")}else{A.push("W")}return B[0]+"&#176;"+B[1]+"'"+B[2]+'"'+B[3]+", "+A[0]+"&#176;"+A[1]+"'"+A[2]+'"'+A[3]},fade_remove_success:function(){var A=function(){var C=function(){Y.U.Dom.setStyle("div_geo_remove_success","display","none");Y.U.Dom.setStyle("div_geo_remove_success","height","");Y.U.Dom.setStyle("div_geo_remove_success","opacity","1");var E=new YAHOO.util.Anim(_ge("div_geo_remove_success"),{opacity:{to:1}},0.1,YAHOO.util.Easing.easeOut);E.animate()};var D=new YAHOO.util.Anim(_ge("div_geo_remove_success"),{height:{to:1}},0.333,YAHOO.util.Easing.easeOut);D.onComplete.subscribe(C);D.animate()};var B=new YAHOO.util.Anim(_ge("div_geo_remove_success"),{opacity:{to:0}},0.333,YAHOO.util.Easing.easeOut);B.onComplete.subscribe(A);B.animate()},fade_save_success:function(){var A=function(){var C=function(){Y.U.Dom.setStyle("div_geo_saved_success","display","none");Y.U.Dom.setStyle("div_geo_saved_success","height","");Y.U.Dom.setStyle("div_geo_saved_success","opacity","1");var E=new YAHOO.util.Anim(_ge("div_geo_saved_success"),{opacity:{to:1}},0.1,YAHOO.util.Easing.easeOut);E.animate()};var D=new YAHOO.util.Anim(_ge("div_geo_saved_success"),{height:{to:1}},0.333,YAHOO.util.Easing.easeOut);D.onComplete.subscribe(C);D.animate()};var B=new YAHOO.util.Anim(_ge("div_geo_saved_success"),{opacity:{to:0}},0.333,YAHOO.util.Easing.easeOut);B.onComplete.subscribe(A);B.animate()},dec_to_dms:function(E){E=Math.abs(E);while(E>360){E-=360}var D=Math.floor(E);var G=3600*(E-D);var B=Math.floor(G/60);var A=(G/60)-B;var C=Math.round(60*A);if(C<10){C="0"+C}return new Array(D,B,C)}},map_box:{ymap:null,marker_offset:{x:-27,y:-130},const_map_map:0,const_map_sat:1,const_map_hyb:2,map_mode:0,counter_id:null,drag_around_timer_id:null,label_counter:0,map_moved:0,osming:false,show:function(A){if(typeof (YMap)=="function"){if(!_ge("div_zoom_background")){if(A){Y.U.Dom.setStyle("f_div_corrections_map_holder","width","480px");Y.U.Dom.setStyle("f_div_corrections_map","width","480px")}else{Y.U.Dom.setStyle("f_div_corrections_map_holder","width","704px");Y.U.Dom.setStyle("f_div_corrections_map","width","704px")}this.ymap=new YMap(_ge("f_div_corrections_map"));this.ymap.disableKeyControls();this.ymap.setMapType(YAHOO_MAP_REG);var J=YUtility.createNode("div","div_zoom_background");var L={position:"absolute",top:"4px",right:"4px",width:"24px",height:"165px"};YUtility.setStyle(J,L);var B=YUtility.createNode("img","map_zoom_background");var L={position:"absolute",top:"0px",left:"0px",width:"24px",height:"165px"};YUtility.setStyle(B,L);B.src=_images_root+"/map_zoom_background.png";B.className="trans_png";YUtility.appendNode(J,B);var B=YUtility.createNode("img","candy_map_zoom_out");var L={position:"absolute",top:"4px",left:"4px",width:"16px",height:"16px"};YUtility.setStyle(B,L);B.style.cursor=(F.is_ie)?"hand":"pointer";B.src=_images_root+"/candy_map_zoom_out_default.png";YUtility.appendNode(J,B);var B=YUtility.createNode("img","candy_map_zoom_in");var L={position:"absolute",top:"145px",left:"4px",width:"16px",height:"16px"};YUtility.setStyle(B,L);B.style.cursor=(F.is_ie)?"hand":"pointer";B.src=_images_root+"/candy_map_zoom_in_default.png";YUtility.appendNode(J,B);var B=YUtility.createNode("img","candy_map_dragger");var L={position:"absolute",top:"20px",left:"3px",width:"18px",height:"13px"};YUtility.setStyle(B,L);B.style.cursor=(F.is_ie)?"hand":"pointer";B.src=_images_root+"/candy_map_zoom_drag.png";B.className="trans_png";YUtility.appendNode(J,B);YUtility.appendNode(_ge("f_div_corrections_map"),J);F.decorate(_ge("candy_map_zoom_in"),F._map_zoom_button).button_go_go_go("in");F.decorate(_ge("candy_map_zoom_out"),F._map_zoom_button).button_go_go_go("out");var J=YUtility.createNode("div","f_div_crosshairs");var L={position:"absolute",top:"161px",left:"222px"};YUtility.setStyle(J,L);var B=YUtility.createNode("img","f_img_ch_white");var L={display:"none"};YUtility.setStyle(B,L);B.style.cursor=(F.is_ie)?"hand":"pointer";B.src=_images_root+"/map_crosshair_white.png";YUtility.appendNode(J,B);var B=YUtility.createNode("img","f_img_ch_pink");var L={display:"block"};YUtility.setStyle(B,L);B.style.cursor=(F.is_ie)?"hand":"pointer";B.src=_images_root+"/map_crosshair_pink.png";YUtility.appendNode(J,B);YUtility.appendNode(_ge("f_div_corrections_map"),J);F.decorate(_ge("f_img_ch_white"),F._map_crosshairs_button).button_go_go_go();F.decorate(_ge("f_img_ch_pink"),F._map_crosshairs_button).button_go_go_go();YEvent.Capture(this.ymap,EventsList.changeZoom,function(){_ge("f_div_corrections_box_holder_border").map_box.toggle_zoom();F.osming.check_map(this,"f_div_corrections_map")});if(A){YEvent.Capture(this.ymap,EventsList.startPan,function(){if(_ge("f_div_corrections_box_holder_border").map_box.counter_id!=null){clearTimeout(_ge("f_div_corrections_box_holder_border").map_box.counter_id)}});YEvent.Capture(this.ymap,EventsList.endPan,function(){_ge("f_div_corrections_box_holder_border").has_the_map_moved_or_what=true;_ge("f_div_corrections_box_holder_border").map_box.map_moved++;if(_ge("f_div_corrections_box_holder_border").map_box.counter_id!=null){clearTimeout(_ge("f_div_corrections_box_holder_border").map_box.counter_id)}if(_is_editing_geo||(!_has_geo&&!_is_editing_geo)){_is_editing_geo=true;Y.U.Dom.setStyle("f_img_ch_white","display","none");Y.U.Dom.setStyle("f_img_ch_pink","display","block");_ge("geo_form_save").disabled=false;_ge("f_div_corrections_right_side").display_lat_lon(this.getCenterLatLon())}clearTimeout(_ge("f_div_corrections_box_holder_border").map_box.drag_around_timer_id);_ge("f_div_corrections_box_holder_border").map_box.drag_around_timer_id=setTimeout("_ge('f_div_corrections_box_holder_border').map_box.get_center_point_label()",333);if(_save_position){_ge("f_div_corrections_box_holder_border").map_box.counter_id=setTimeout("_ge('f_div_corrections_box_holder_border').map_box.end_pan_delay()",1000)}F.osming.check_map(this,"f_div_corrections_map")})}else{}Y.U.Event.addListener(_ge("candy_map_dragger"),"mousedown",this.map_dragger_mouseDown,this,true);var J=YUtility.createNode("img","candy_map_type_map");var L={position:"absolute",top:"4px",right:"31px",width:"62px",height:"20px"};YUtility.setStyle(J,L);J.src=_intl_images_root+"/candy_map_type_map_default.png";YUtility.appendNode(_ge("f_div_corrections_map"),J);var J=YUtility.createNode("img","candy_map_type_hybrid");var L={position:"absolute",top:"25px",right:"31px",width:"62px",height:"20px"};YUtility.setStyle(J,L);J.src=_intl_images_root+"/candy_map_type_hybrid_default.png";YUtility.appendNode(_ge("f_div_corrections_map"),J);var J=YUtility.createNode("img","candy_map_type_sat");var L={position:"absolute",top:"46px",right:"31px",width:"62px",height:"20px"};YUtility.setStyle(J,L);J.src=_intl_images_root+"/candy_map_type_sat_default.png";YUtility.appendNode(_ge("f_div_corrections_map"),J);F.decorate(_ge("candy_map_type_map"),F._map_type_button).button_go_go_go("map");F.decorate(_ge("candy_map_type_hybrid"),F._map_type_button).button_go_go_go("hybrid");F.decorate(_ge("candy_map_type_sat"),F._map_type_button).button_go_go_go("sat");if(F.geoloc&&F.geoloc.can_locate()){var J=YUtility.createNode("img","candy_map_find_me");if(A){var L={position:"absolute",top:"4px",right:"95px",width:"127px",height:"20px",display:"block"}}else{var L={position:"absolute",top:"4px",right:"95px",width:"127px",height:"20px",display:"none"}}YUtility.setStyle(J,L);J.src=_intl_images_root+"/candy_find_me_default.png";YUtility.appendNode(_ge("f_div_corrections_map"),J);var J=YUtility.createNode("img","img_find_me_pulse");var L={position:"absolute",top:"11px",right:"152px",width:"12px",height:"6px",display:"none"};YUtility.setStyle(J,L);J.src=_images_root+"/progress/balls-12x6-trans.gif";YUtility.appendNode(_ge("f_div_corrections_map"),J);F.decorate(_ge("candy_map_find_me"),F._find_me_button).button_go_go_go(1)}this.map_position();F.osming.check_map(_ge("f_div_corrections_box_holder_border").map_box.ymap,"f_div_corrections_map");var K=YUtility.createNode("div","div_single_marker_holder");K.style.position="absolute";if(_has_geo&&!A){K.style.display="block";Y.U.Dom.setStyle("f_img_ch_white","display","none");Y.U.Dom.setStyle("f_img_ch_pink","display","none")}else{K.style.display="none"}var C=YUtility.createNode("div","div_single_marker");C.style.position="absolute";C.style.left=this.marker_offset.x+"px";C.style.top=this.marker_offset.y+"px";C.style.width="102px";C.style.height="140px";C.style.cursor="pointer";YUtility.appendNode(K,C);var H=YUtility.createNode("img","img_single_marker");H.style.position="absolute";H.style.left="0px";H.style.top="0px";H.style.width="102px";H.style.height="140px";H.src=_images_root+"/pop_up_pinwin_thinner.png";H.style.cursor="pointer";H.className="trans_png";YUtility.appendNode(C,H);var H=YUtility.createNode("img","img_single_marker_thumb");H.style.position="absolute";H.style.left="7px";H.style.top="7px";H.style.width="75px";H.style.height="75px";H.style.cursor="pointer";H.src=geo_thmb;YUtility.appendNode(C,H);if(_use_4real_location==""){var I=new YGeoPoint(this.ymap.getCenterLatLon().Lat,this.ymap.getCenterLatLon().Lon)}else{var I=new YGeoPoint(_use_4real_location.split("|")[0].split(",")[0],_use_4real_location.split("|")[0].split(",")[1])}if(I.Lat==0&&I.Lon==0){I.Lat=0.0001;I.Lon=-0}this.mo=new YCustomOverlay(I,K);this.ov=this.ymap.addOverlay(this.mo);if(_is_suggestion){var G=YUtility.createNode("div","f_div_splat_dot");var L={position:"relative",opacity:"0.85"};YUtility.setStyle(G,L);var B=YUtility.createNode("img","f_img_splat_dot");if(typeof (_suggestion_obj)=="object"&&_suggestion_obj!=null){var L={position:"absolute",top:"-16px",left:"-16px",width:"32px",height:"34px",display:"block"}}else{var L={position:"absolute",top:"-16px",left:"-16px",width:"32px",height:"34px",display:"none"}}YUtility.setStyle(B,L);B.src=_images_root+"/dot_splat.png";B.className="trans_png";YUtility.appendNode(G,B);if(typeof (_suggestion_obj)=="object"&&_suggestion_obj!=null){var E=new YCustomOverlay(new YGeoPoint(_suggestion_obj.latitude,_suggestion_obj.longitude),G)}else{var E=new YCustomOverlay(new YGeoPoint(0.0001,0),G)}var D=this.ymap.addOverlay(E);this.splat_dot=E}_ge("f_div_corrections_right_side").display_lat_lon(this.mo.YGeoPoint);_ge("f_div_corrections_box_holder_border").map_box.toggle_type();return }else{_ge("f_div_corrections_map").innerHTML="";this.show(A);return }}var M=document.createElement("script");M.src="http://l.yimg.com/a/lib/map/js/api/ymapapi_3_8_2_1.js";M.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(M);setTimeout("_ge('f_div_corrections_box_holder_border').map_box.check_for_map_existing("+A+")",100)},end_pan_delay:function(){if(_ge("f_div_corrections_box_holder_border").map_box.counter_id!=null){clearTimeout(_ge("f_div_corrections_box_holder_border").map_box.counter_id)}var A={flickr_people_geo_setLocation_onLoad:function(G,E,C,D){}};var B=new Object();B.lat=_ge("f_div_corrections_box_holder_border").map_box.ymap.getCenterLatLon().Lat;B.lon=_ge("f_div_corrections_box_holder_border").map_box.ymap.getCenterLatLon().Lon;B.accuracy=Math.min(16,Math.max(0,17-_ge("f_div_corrections_box_holder_border").map_box.ymap.getZoomLevel()));B.context="last";F.API.callMethod("flickr.people.geo.setLocation",B,A,null,null,0)},get_center_point_label:function(){_ge("f_div_corrections_box_holder_border").map_box.label_counter++;var B=new Object();B.lat=_ge("f_div_corrections_box_holder_border").map_box.ymap.getCenterLatLon().Lat;B.lon=_ge("f_div_corrections_box_holder_border").map_box.ymap.getCenterLatLon().Lon;B.accuracy=Math.min(16,Math.max(0,17-_ge("f_div_corrections_box_holder_border").map_box.ymap.getZoomLevel()));B.label_counter=_ge("f_div_corrections_box_holder_border").map_box.label_counter;var A={flickr_geocode_reverseGeocodePoint_onLoad:function(K,J,H,I){if(K){if(I.label_counter==_ge("f_div_corrections_box_holder_border").map_box.label_counter){var E=[];var G=J.documentElement.getElementsByTagName("location")[0].childNodes;for(var D=0;D<G.length;D++){if(G[D].nodeName!="#text"&&G[D].nodeName!="taken_in"){if(E.length==0||(E[0]!=G[D].firstChild.nodeValue)){E.push(G[D].firstChild.nodeValue)}if(E.length>=2){break}}}var C=E.join(", ");_taken_in_for_suggestion=C;_ge("f_div_corrections_drag_around").innerHTML=F.output.get("corrections_drag_around",C);if(_is_suggestion&&typeof (_suggestion_obj)=="object"&&_suggestion_obj!=null&&_populate_suggestion==true){_ge("f_div_corrections_psst").innerHTML=F.output.get("corrections_psst",C);Y.U.Dom.setStyle("f_div_corrections_psst","display","block");_populate_suggestion=false}if(_ge("f_div_corrections_box_holder_border").map_box.map_moved>=1){_ge("f_div_corrections_search_results_clicked").innerHTML=F.output.get("corrections_heres_a_place",C);_ge("div_corrections_search_no_results_display").innerHTML=F.output.get("corrections_drag_around",C)}}}else{_ge("f_div_corrections_drag_around").innerHTML=F.output.get("corrections_drag_around",F.output.get("a_place_with_no_name"))}}};if(Y.U.Dom.getStyle("f_div_crosshairs","display")=="block"){F.API.callMethod("flickr.geocode.reverseGeocodePoint",B,A,null,null,0)}},check_for_map_existing:function(A){if(typeof (YMap)=="function"){_ge("f_div_corrections_box_holder_border").map_box.show(A)}else{setTimeout("_ge('f_div_corrections_box_holder_border').map_box.check_for_map_existing("+A+")",100)}},jump_to_map:function(){window.location="/map?fLat="+this.ymap.getCenterLatLon().Lat+"&fLon="+this.ymap.getCenterLatLon().Lon+"&zl="+_ge("f_div_corrections_box_holder_border").map_box.ymap.getZoomLevel()},correct_marker:function(){var A={};A.x=Y.U.Dom.getRegion("div_single_marker").left-Y.U.Dom.getRegion("f_div_corrections_map").left;A.y=Y.U.Dom.getRegion("div_single_marker").top-Y.U.Dom.getRegion("f_div_corrections_map").top;A.x-=this.marker_offset.x;A.y-=this.marker_offset.y;this.mo.setYGeoPoint(this.ymap.convertXYLatLon(new YCoordPoint(A.x,A.y)));_ge("f_div_corrections_right_side").display_lat_lon(this.mo.YGeoPoint);Y.U.Dom.setStyle("div_single_marker","left",this.marker_offset.x+"px");Y.U.Dom.setStyle("div_single_marker","top",this.marker_offset.y+"px")},center_marker:function(){var A={};A.x=_pi((Y.U.Dom.getRegion("f_div_corrections_map").right-Y.U.Dom.getRegion("f_div_corrections_map").left)/2);A.y=_pi((Y.U.Dom.getRegion("f_div_corrections_map").bottom-Y.U.Dom.getRegion("f_div_corrections_map").top)/2);this.mo.setYGeoPoint(this.ymap.convertXYLatLon(new YCoordPoint(A.x,A.y)));_ge("f_div_corrections_right_side").display_lat_lon(this.mo.YGeoPoint);Y.U.Dom.setStyle("div_single_marker","left",this.marker_offset.x+"px");Y.U.Dom.setStyle("div_single_marker","top",this.marker_offset.y+"px")},center_map_on_marker:function(){this.ymap.drawZoomAndCenter(this.mo.YGeoPoint,this.ymap.getZoomLevel())},center_marker_on_map:function(){this.center_marker()},hide_splat:function(){Y.U.Dom.setStyle("f_img_splat_dot","display","none")},set_splat:function(){this.splat_dot.setYGeoPoint(new YGeoPoint(_suggestion_obj.latitude,_suggestion_obj.longitude));Y.U.Dom.setStyle("f_img_splat_dot","display","block")},jump_to_last_saved_position:function(){if(_use_4real_location==""){var A=new YGeoPoint(0.0001,0);this.ymap.drawZoomAndCenter(A,16);this.mo.setYGeoPoint(A)}else{var A=new YGeoPoint(_use_4real_location.split("|")[0].split(",")[0],_use_4real_location.split("|")[0].split(",")[1]);this.ymap.drawZoomAndCenter(A,17-_use_4real_location.split("|")[0].split(",")[2]);this.mo.setYGeoPoint(A)}Y.U.Dom.setStyle("div_single_marker","left",this.marker_offset.x+"px");Y.U.Dom.setStyle("div_single_marker","top",this.marker_offset.y+"px");_ge("f_div_corrections_right_side").display_lat_lon(this.mo.YGeoPoint)},map_position:function(){if(_use_4real_location==""){var A=new YGeoPoint(0,0);this.ymap.drawZoomAndCenter(A,16)}else{var A=new YGeoPoint(_use_4real_location.split("|")[0].split(",")[0],_use_4real_location.split("|")[0].split(",")[1]);this.ymap.drawZoomAndCenter(A,17-_use_4real_location.split("|")[0].split(",")[2])}this.toggle_zoom()},jump_to_position:function(B){var C=[new YGeoPoint(B.bbox.split(",")[1],B.bbox.split(",")[0]),new YGeoPoint(B.bbox.split(",")[3],B.bbox.split(",")[2])];var A=this.ymap.getBestZoomAndCenter(C);this.ymap.drawZoomAndCenter(new YGeoPoint(B.lat,B.lon),A.zoomLevel)},jump_to_lat_lon:function(A,B){this.ymap.drawZoomAndCenter(new YGeoPoint(A,B),3)},jump_to_found_location:function(A){_ge("f_div_corrections_box_holder_border").map_box.ymap.drawZoomAndCenter(new YGeoPoint(A.latitude,A.longitude),A.accuracy);_ge("f_div_corrections_box_holder_border").map_box.ymap.Events.endPan.trigger();Y.U.Dom.setStyle("img_find_me_pulse","display","none");_ge("candy_map_find_me").button_enable()},jump_to_found_location_fail:function(A){alert(A);Y.U.Dom.setStyle("img_find_me_pulse","display","none");_ge("candy_map_find_me").button_enable()},set_map_type:function(B){if(B!=this.map_mode){this.map_mode=B;if(this.map_mode==this.const_map_map){this.ymap.setMapType(YAHOO_MAP_REG)}if(this.map_mode==this.const_map_hyb){this.ymap.setMapType(YAHOO_MAP_HYB)}if(this.map_mode==this.const_map_sat){this.ymap.setMapType(YAHOO_MAP_SAT)}var A={lat:_ge("f_div_corrections_box_holder_border").map_box.ymap.getCenterLatLon().Lat,lon:_ge("f_div_corrections_box_holder_border").map_box.ymap.getCenterLatLon().Lon};if(typeof (_use_osm)!="undefined"&&_use_osm==true&&_ge("f_div_corrections_box_holder_border").map_box.ymap.getCurrentMapType()=="YAHOO_MAP"&&_ge("f_div_corrections_box_holder_border").map_box.ymap.getZoomLevel()<8&&A.lat>=39.8558502197&&A.lat<=40.0156097412&&A.lon>=116.2662734985&&A.lon<=116.4829177856){if(!_ge("f_div_corrections_box_holder_border").map_box.osming){_ge("f_div_corrections_box_holder_border").map_box.oldTileReg=YMapConfig.tileReg;YMapConfig.tileReg=["/map_openstreetmap_tile_broker.gne?t=m&","/map_openstreetmap_tile_broker.gne?t=m&"];_ge("f_div_corrections_box_holder_border").map_box.osming=true;if(_ge("f_div_osm_cc")){_ge("f_div_osm_cc").style.display="block"}setTimeout("_ge('f_div_corrections_box_holder_border').map_box.hide_copy()","100");_ge("f_div_corrections_box_holder_border").map_box.ymap._cleanTileCache();_ge("f_div_corrections_box_holder_border").map_box.ymap._callTiles()}setTimeout("_ge('f_div_corrections_box_holder_border').map_box.hide_copy()","100");setTimeout("_ge('f_div_corrections_box_holder_border').map_box.hide_copy()","800")}else{if(_ge("f_div_corrections_box_holder_border").map_box.osming==true){YMapConfig.tileReg=_ge("f_div_corrections_box_holder_border").map_box.oldTileReg;_ge("f_div_corrections_box_holder_border").map_box.osming=false;if(_ge("f_div_osm_cc")){_ge("f_div_osm_cc").style.display="none"}setTimeout("_ge('f_div_corrections_box_holder_border').map_box.show_copy()","100");setTimeout("_ge('f_div_corrections_box_holder_border').map_box.show_copy()","800");_ge("f_div_corrections_box_holder_border").map_box.ymap._cleanTileCache();_ge("f_div_corrections_box_holder_border").map_box.ymap._callTiles()}}}},toggle_type:function(){if(this.map_mode==this.const_map_map){_ge("candy_map_type_map").button_disable()}else{_ge("candy_map_type_map").button_enable()}if(this.map_mode==this.const_map_hyb){_ge("candy_map_type_hybrid").button_disable()}else{_ge("candy_map_type_hybrid").button_enable()}if(this.map_mode==this.const_map_sat){_ge("candy_map_type_sat").button_disable()}else{_ge("candy_map_type_sat").button_enable()}},toggle_zoom:function(){if(this.ymap.getZoomLevel()&&_ge("candy_map_dragger")){_ge("candy_map_dragger").style.top=20+((17-this.ymap.getZoomLevel())*7)+"px"}if(_has_geo&&!_is_editing_geo){var B=_pi(_use_4real_location.split(",")[2]);var A=Math.min(16,Math.max(0,17-_ge("f_div_corrections_box_holder_border").map_box.ymap.getZoomLevel()));if(B+2<A){Y.U.Dom.setStyle("div_single_marker_holder","display","none")}else{Y.U.Dom.setStyle("div_single_marker_holder","display","block")}}_ge("f_div_corrections_box_holder_border").map_box.drag_around_timer_id=setTimeout("_ge('f_div_corrections_box_holder_border').map_box.get_center_point_label()",333);if(_save_position){_ge("f_div_corrections_box_holder_border").map_box.counter_id=setTimeout("_ge('f_div_corrections_box_holder_border').map_box.end_pan_delay()",1000)}},map_dragger_mouseDown:function(A){Y.U.Event.stopEvent(A);this._new_zoom_level=_ge("f_div_corrections_box_holder_border").map_box.ymap.getZoomLevel();this._startDragY=Y.U.Event.getPageY(A)-_pi(_ge("candy_map_dragger").style.top);Y.U.Event.addListener(document,"mouseup",this.map_dragger_mouseUp,this,true);Y.U.Event.addListener(document,"mousemove",this.map_dragger_mouseMove,this,true)},map_dragger_mouseUp:function(A){Y.U.Event.stopEvent(A);Y.U.Event.removeListener(document,"mouseup",this.map_dragger_mouseUp);Y.U.Event.removeListener(document,"mousemove",this.map_dragger_mouseMove);_ge("f_div_corrections_box_holder_border").map_box.ymap.setZoomLevel(this._new_zoom_level)},map_dragger_mouseMove:function(A){var B=(Y.U.Event.getPageY(A)-this._startDragY);this._new_zoom_level=17-(_pi(B/7)-3);if(this._new_zoom_level<1){this._new_zoom_level=1}if(this._new_zoom_level>17){this._new_zoom_level=17}_ge("candy_map_dragger").style.top=((17-this._new_zoom_level)*7)+20+"px"}}};F._map_zoom_button={_decotype:F._simple_button,button_go_go_go:function(A){this.direction=A;F._map_zoom_button._decotype.button_go_go_go.apply(this)},onclick:function(B){var A=_ge("f_div_corrections_box_holder_border").map_box.ymap.getZoomLevel();if(this.direction=="in"){A--}if(this.direction=="out"){A++}if(A<1){A=1}if(A>17){A=17}_ge("f_div_corrections_box_holder_border").map_box.ymap.setZoomLevel(A);F.stop_event_propagation(B)},ondblclick:function(A){F.stop_event_propagation(A)}};F._map_type_button={_decotype:F._simple_button,button_go_go_go:function(A){this.type=A;F._map_type_button._decotype.button_go_go_go.apply(this,[1])},onclick:function(A){F.stop_event_propagation(A);if(this.type=="map"){_ge("f_div_corrections_box_holder_border").map_box.set_map_type(_ge("f_div_corrections_box_holder_border").map_box.const_map_map)}if(this.type=="hybrid"){_ge("f_div_corrections_box_holder_border").map_box.set_map_type(_ge("f_div_corrections_box_holder_border").map_box.const_map_hyb)}if(this.type=="sat"){_ge("f_div_corrections_box_holder_border").map_box.set_map_type(_ge("f_div_corrections_box_holder_border").map_box.const_map_sat)}_ge("f_div_corrections_box_holder_border").map_box.toggle_type()},ondblclick:function(A){F.stop_event_propagation(A)}};F._map_crosshairs_button={_decotype:F._simple_button,button_go_go_go:function(){F._map_type_button._decotype.button_go_go_go.apply(this,[0])},onclick:function(A){F.stop_event_propagation(A)},ondblclick:function(B){F.stop_event_propagation(B);var A=_ge("f_div_corrections_box_holder_border").map_box.ymap.getZoomLevel()-1;if(A<1){A=1}_ge("f_div_corrections_box_holder_border").map_box.ymap.setZoomLevel(A);_ge("f_div_corrections_box_holder_border").map_box.toggle_zoom()}};F._find_me_button={_decotype:F._simple_button,button_go_go_go:function(A){F._find_me_button._decotype.button_go_go_go.apply(this,[A])},onclick:function(A){F.stop_event_propagation(A);this.button_disable();Y.U.Dom.setStyle("img_find_me_pulse","display","block");F.geoloc.get_location(_ge("f_div_corrections_box_holder_border").map_box.jump_to_found_location,_ge("f_div_corrections_box_holder_border").map_box.jump_to_found_location_fail)},ondblclick:function(A){F.stop_event_propagation(A)}};F.PhotoPicker=function(){var B=this;var A=null;this.selectedPhotos=[];this.selectedPhotosHash=[];this.addedAPIResponses=[];this.oPhotosFound=null;this.pendingRequest=false;this.apiData={currentPage:1,pages:0,lastCallParams:{page:0}};this.parseCollection=function(G){var N=G.documentElement.getElementsByTagName("photo");if(N.length==0){return }else{var H=G.documentElement.getElementsByTagName("photos")[0];if(!H){H=G.documentElement.getElementsByTagName("photoset")[0]}B.apiData.currentPage=parseInt(H.getAttribute("page"));B.apiData.pages=parseInt(H.getAttribute("pages"));var C=[];var I,K,L,D,E,J,O;for(var M=0;M<N.length;M++){I=N[M].getAttribute("id");K=N[M].getAttribute("secret");L=N[M].getAttribute("server");E=N[M].getAttribute("farm");J=N[M].getAttribute("media");O=N[M].getAttribute("ispublic");D=_photo_root.replace("farm","farm"+E)+L+"/"+I+"_"+K+"_s.jpg";C.push({id:I,src:D,media:J,ispublic:O});global_photos[I]=N[M]}}return C};this.photoItem=document.createElement("li");this.photoItem.appendChild(document.createElement("img"));this.photoItem.getElementsByTagName("img")[0].src=_images_root+"/spaceball.gif";this.photoItem.getElementsByTagName("img")[0].className="pp_thumb_geo";this.photoItem.appendChild(document.createElement("span"));this.photoItem.getElementsByTagName("span")[0].className="pp_close_geo";this.photoItem.appendChild(document.createElement("span"));this.photoItem.getElementsByTagName("span")[1].className="pp_status_geo";this.photoItem.appendChild(document.createElement("img"));this.photoItem.getElementsByTagName("img")[1].src=_images_root+"/video_play_icon_small.png.v1";this.photoItem.getElementsByTagName("img")[1].className="pp_video_geo trans_png";this.cloneItem=function(){return B.photoItem.cloneNode(true)};this.call_API=function(E,C){var D={flickr_photos_geo_photosForLocation_onLoad:function(K,J,H,I){if(K){_pp_geo.setLoading(false);_pp_geo.pendingRequest=false;if(!K){alert("there was an error: "+H);return }var G=_pp_geo.parseCollection(J);_pp_geo.makePhotosList(G)}}};_pp_geo.pendingRequest=true;F.API.callMethod("flickr.photos.geo.photosForLocation",{lat:E.lat,lon:E.lon,accuracy:E.acc,page:E.page,per_page:E.per_page},D,null,null,0)};this.makePhotosList=function(E){var H=_ge("pp-source_geo");if(E&&E.length){var D=document.createElement("ul");D.className="pp-list_geo";var K=null;var I=null;var C=null;for(var G=0;G<E.length;G++){K=B.cloneItem();K.style.width="60px";K.style.height="60px";I=K.getElementsByTagName("img")[0];I.id="source_"+E[G].id;I.src=E[G].src;I.style.width="60px";I.style.height="60px";if(E[G].id!=page_photo_id){D.appendChild(K)}}H.appendChild(D);var J=H.scrollHeight-H.offsetHeight;if(H.scrollHeight&&H.scrollTop>=J){H.scrollTop=J-1}}};this.setLoading=function(C,E){var D=_ge("pp-source_geo");var G=_ge("pp-loading_geo");if(E){D.innerHTML=""}if(C){Y.D.addClass(_ge("pp_geo"),"pp-cursor-loading_geo")}else{Y.D.removeClass(_ge("pp_geo"),"pp-cursor-loading_geo")}document.body.style.cursor=(C?"wait":"auto");G.className=(C?"active":"")};this.getNextPage=function(){this.setLoading(true);this.pendingRequest=true;this.apiData.lastCallParams.page=this.apiData.currentPage;this.call_API(this.apiData.lastCallParams)};this.didScroll=function(){if(this.scrollHeight&&this.scrollTop>=this.scrollHeight-this.offsetHeight-2){B.scrolledToBottom()}};this.scrolledToBottom=function(){if(!this.pendingRequest&&this.apiData.currentPage<this.apiData.pages){this.apiData.currentPage++;this.getNextPage()}};this.isSelected=function(C){return(typeof B.selectedPhotosHash[C]!="undefined")};this.sourceClick=function(H){var I=(H?H.target||H.srcElement:event.srcElement);if(I.nodeName.toLowerCase()!=""){var C=F.find_parent_node_by_name(I,"li")}if(!Y.D.hasClass(C,"pp_type_photo_geo")&&!Y.D.hasClass(C,"pp_type_video_geo")){return false}var D=(I.nodeName.toLowerCase()=="li"?I:F.find_parent_node_by_name(I,"li"));I=Y.D.getElementsByClassName("pp_thumb_geo","img",D)[0];var E=null;var J=I.nodeName.toLowerCase();if(J=="img"&&Y.D.hasClass(I,"pp_thumb_geo")){E=I.id}else{return true}if(B.resetMode){B.removeSelectedItems()}var G=E.replace("source","target");var D=_ge(G);if(D){B.removeItem(E,G)}else{B.addItem(F.find_parent_node(_ge(E)))}B.setResetMode(false)};this.resetMode=false;this.attachEvents=function(){Y.E.addListener(_ge("pp-source_geo"),"scroll",_pp_geo.didScroll)};this.init=function(){B.attachEvents()}};