var snag=1;F._group_vanisher={remove_photo:function(C,S,M,n){if(this.already_removing==undefined){this.already_removing=false;}if(this.photosA==undefined&&_ge("div_hold_photos")){this.photosA=new Array();var d=_ge("div_hold_photos");for(var h=0;h<d.childNodes.length;h++){if(d.childNodes[h].nodeType==1&&d.childNodes[h].className=="PoolList"){this.photosA.push(_pi(d.childNodes[h].id.replace("pool_","")));}}}this.new_photo_id=null;this.total_photos=null;this.photo_load_offset=0;if(!this.already_removing&&window.confirm(F.output.get("grouppool_are_you_sure"))){this.already_removing=true;this.group_id=C;this.photo_id=S;this.load_replacement_photo=M;this.photo_url=n;this.vanish_photo();}},vanish_photo:function(){var d=function(){_ge("pool_"+F._group_vanisher.photo_id).innerHTML="";};anim_do_opacity_to(_ge("pool_"+this.photo_id),50,20,0,"easeOutQuad",d);F._group_vanisher.api_remove_photo();},api_remove_photo:function(){var d={flickr_groups_pools_remove_onLoad:function(C,n,S,M){if(C){if(F._group_vanisher.load_replacement_photo==true){F._group_vanisher.load_new_photo(F._group_vanisher.photo_load_offset);}else{F._group_vanisher.photo_load_offset=0;F._group_vanisher.already_removing=false;}}else{alert(F.output.get("grouppool_sorry_not_remove"));F._group_vanisher.un_vanish_photo();}}};var h=new Object();h.photo_id=F._group_vanisher.photo_id;h.group_id=F._group_vanisher.group_id;F.API.callMethod("flickr.groups.pools.remove",h,d,null,null,0);},un_vanish_photo:function(){_ge("pool_"+this.photo_id).style.display="block";anim_do_opacity_to(_ge("pool_"+this.photo_id),50,20,100,"easeInQuad");this.photo_load_offset=0;this.already_removing=false;},load_new_photo:function(S){var d={flickr_groups_pools_getPhotos_onLoad:function(x,C,M,n){F._group_vanisher.responseXML=C;if(x){try{F._group_vanisher.total_photos=_pi(C.documentElement.getElementsByTagName("photos")[0].getAttribute("total"));if(isNaN(F._group_vanisher.total_photos)){F._group_vanisher.total_photos=0;}if(!_groups_improv){if(_ge("a_see_all")){_ge("a_see_all").innerHTML=(F._group_vanisher.total_photos>1)?F.output.get("grouppool_see_all_link_plural",F._group_vanisher.group_id,F._group_vanisher.total_photos):F.output.get("grouppool_see_all_link_single",F._group_vanisher.group_id);}else{_ge("span_see_all").innerHTML=(F._group_vanisher.total_photos>1)?F.output.get("grouppool_see_no_link_plural",F._group_vanisher.total_photos):F.output.get("grouppool_see_no_link_single");}}else{if(_ge("a_see_all")){_ge("a_see_all").innerHTML=(F._group_vanisher.total_photos!=1)?F.output.get("count_items_plural",F._group_vanisher.total_photos):F.output.get("count_items",F._group_vanisher.total_photos);}else{_ge("span_see_all").innerHTML=(F._group_vanisher.total_photos!=1)?F.output.get("count_items_plural",F._group_vanisher.total_photos):F.output.get("count_items",F._group_vanisher.total_photos);}}}catch(e){}}else{}F._group_vanisher.photo_load_offset=0;F._group_vanisher.already_removing=false;}};var h=new Object();h.group_id=F._group_vanisher.group_id;h.per_page=1;h.page=6+S;if(this.total_photos!=null&&this.total_photos<6){h.page=this.total_photos;}if(this.total_photos!=null&&this.total_photos<6&&S>2){F._group_vanisher.photo_load_offset=0;F._group_vanisher.already_removing=false;return ;}F.API.callMethod("flickr.groups.pools.getPhotos",h,d,null,null,0);},show_new_photo:function(){for(var d=0;d<this.photosA.length;d++){if(this.photosA[d]==this.new_photo_id){this.photo_load_offset++;if(this.photo_load_offset<=5){this.load_new_photo(this.photo_load_offset);}else{this.photo_load_offset=0;this.already_removing=false;}return ;}}this.photosA.push(this.new_photo_id);var h="";h+="<div id=\"pool_"+this.new_photo_id+"\" class=\"PoolList\">";h+="<a href=\""+this.photo_url.replace(this.photo_id,this.new_photo_id)+"\"><img src=\""+_get_photo_src(global_photos[this.new_photo_id],"t")+"\" /></a><br>";if(global_last_log_in!=null&&this.date_added>global_last_log_in){h+="<span class=\"New\">"+F.output.get("grouppool_new")+"</span> ";}h+=F.output.get("grouppool_from",global_photos[this.new_photo_id].owner_nsid,global_photos[this.new_photo_id].owner_name);if(global_can_remove||global_nsid==global_photos[this.new_photo_id].owner_nsid){h+=" <a href=\"#\" title=\""+F.output.get("grouppool_remove_photo")+"\" onclick=\"F._group_vanisher.remove_photo('"+this.group_id+"','"+this.new_photo_id+"', true, '"+this.photo_url.replace(this.photo_id,this.new_photo_id)+"'); return false;\" class=\"Grey\">[X]</a>";}h+="</div>";_ge("div_hold_photos").innerHTML+=h;this.photo_load_offset=0;this.already_removing=false;}};F.PhotoPicker=function(){var h=this;var d=null;var S=global_group_name.truncate_with_ellipses(40).escape_for_display();this.selectedPhotos=[];this.selectedPhotosHash=[];this.addedAPIResponses=[];this.oPhotosFound=null;this.pendingRequest=false;this.resetMode=false;this.apiData={currentPage:1,pages:0,lastCallParams:null};this.parseCollection=function(b){var t=b.documentElement.getElementsByTagName("photo");if(t.length==0){h.showPhotosFound(0);return ;}else{var r=b.documentElement.getElementsByTagName("photos")[0];if(!r){r=b.documentElement.getElementsByTagName("photoset")[0];}h.apiData.currentPage=parseInt(r.getAttribute("page"));h.apiData.pages=parseInt(r.getAttribute("pages"));h.showPhotosFound(r.getAttribute("total"));var C=[];var v,O,N,x,e,m,u;for(var B=0;B<t.length;B++){v=t[B].getAttribute("id");O=t[B].getAttribute("secret");N=t[B].getAttribute("server");e=t[B].getAttribute("farm");m=t[B].getAttribute("media");u=t[B].getAttribute("ispublic");x=_photo_root.replace("farm","farm"+e)+N+"/"+v+"_"+O+"_s.jpg";C.push({"id":v,"src":x,"media":m,"ispublic":u});global_photos[v]=t[B];}if(C.length>0){}}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";this.photoItem.appendChild(document.createElement("span"));this.photoItem.getElementsByTagName("span")[0].className="pp_close";this.photoItem.appendChild(document.createElement("span"));this.photoItem.getElementsByTagName("span")[1].className="pp_status";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 trans_png";this.cloneItem=function(){return h.photoItem.cloneNode(true);};this.setSearchField=function(C){var x=_ge("pp-search");x.disabled=(!C);if(C!=true){x.className="pp-disabled";x.value="";}else{x.className="";}};this.enableSearchField=function(){h.setSearchField(true);};this.disableSearchField=function(){h.setSearchField(false);};this.lastSearchTypeIndex=0;this.searchType=null;this.search_handler={generic_api_onLoad:function(r,b,x,e){h.setLoading(false);h.pendingRequest=false;if(!r){alert("there was an error: "+x);return ;}var C=h.parseCollection(b);h.makePhotosList(C);}};this.doSearchAll=function(x){var C=_ge("pp-search-filter");C.selectedIndex=0;h.setSearchType(true);Y.E.stopEvent(x||event);return false;};this.setSearchType=function(b){var e=_ge("pp-search-filter");var x=e.options[e.selectedIndex].value;var C=e.options[e.selectedIndex].text;if(b){_ge("pp-search").value="";}if(x==""){e.selectedIndex=h.lastSearchTypeIndex;return ;}h.searchType=x;if(h.searchType.indexOf("photoset")>-1){h.set_id=h.searchType.replace("photoset","");h.searchType="in_set";}else{if(h.searchType.indexOf("group")>-1){h.group_id=h.searchType.replace("group","");h.searchType="in_group";}else{if(h.searchType.indexOf("upload_day")>-1){h.upload_day=F.convert_MYSQLDateTime_into_unix_time_stamp(h.searchType.replace("upload_day",""));h.searchType="in_upload_day";}else{if(h.searchType.indexOf("batch_")>-1){h.batch_id=h.searchType.replace("batch_","");h.searchType="from_batch";}}}}_ge("pp-show-all").style.display="inline";switch(h.searchType){case "all":h.oPhotosFound.style.display="none";h.enableSearchField();if(_ge("pp-search").value==""){_ge("pp-show-all").style.display="none";}h.call_API=function(v,r){F.API.callMethod("flickr.photos.search",v,h.search_handler,undefined,undefined,undefined,r);};break;case "not_tagged":h.disableSearchField();h.oPhotosFound.style.display="inline";h.call_API=function(v,r){F.API.callMethod("flickr.photos.getUntagged",v,h.search_handler,undefined,undefined,undefined,r);};break;case "y_photos":h.enableSearchField();h.oPhotosFound.style.display="inline";h.call_API=function(v,r){v.y_photos=1;F.API.callMethod("flickr.photos.search",v,h.search_handler,undefined,undefined,undefined,r);};break;case "not_located":h.enableSearchField();h.oPhotosFound.style.display="inline";h.call_API=function(v,r){if(v.text||v.tags){v.nogeo=1;F.API.callMethod("flickr.photos.search",v,h.search_handler,undefined,undefined,undefined,r);}else{F.API.callMethod("flickr.photos.getWithoutGeodata",v,h.search_handler,undefined,undefined,undefined,r);}};break;case "located":h.disableSearchField();h.oPhotosFound.style.display="inline";h.call_API=function(v,r){F.API.callMethod("flickr.photos.getWithGeodata",v,h.search_handler,undefined,undefined,undefined,r);};break;case "not_in_set":h.disableSearchField();h.oPhotosFound.style.display="inline";h.call_API=function(v,r){F.API.callMethod("flickr.photos.getNotInSet",v,h.search_handler,undefined,undefined,undefined,r);};break;case "in_upload_day":h.enableSearchField();h.oPhotosFound.style.display="inline";h.call_API=function(v,r){v.min_upload_date=h.upload_day;v.max_upload_date=(h.upload_day*1)+86399;F.API.callMethod("flickr.photos.search",v,h.search_handler,undefined,undefined,undefined,r);};break;case "in_set":h.disableSearchField();h.oPhotosFound.style.display="inline";h.call_API=function(v,r){v.photoset_id=h.set_id;F.API.callMethod("flickr.photosets.getPhotos",v,h.search_handler,undefined,undefined,undefined,r);};break;case "from_batch":h.disableSearchField();h.oPhotosFound.style.display="inline";h.call_API=function(v,r){setTimeout(function(){_ge("findr").show_self_batch(_ge("findr").batch_id);},1000);};break;case "in_group":h.disableSearchField();h.oPhotosFound.style.display="inline";h.call_API=function(v,r){v.group_id=h.group_id;F.API.callMethod("flickr.groups.pools.getPhotos",v,h.search_handler,undefined,undefined,undefined,r);};break;default:return ;}h.lastSearchTypeIndex=e.selectedIndex;h.doSearch();};this.call_API=function(x,C){F.API.callMethod("flickr.photos.search",x,h,undefined,undefined,undefined,C);};this.showPhotosFound=function(C){if(C==1){h.oPhotosFound.innerHTML=F.output.get("group_photopickr_found_single",C);}else{h.oPhotosFound.innerHTML=F.output.get("group_photopickr_found_plural",C);}};this.makePhotosList=function(x){var t=_ge("pp-source");if(x&&x.length){var B=document.createElement("ul");B.className="pp-list";var g=null;var m=null;var O=null;for(var r=0;r<x.length;r++){g=h.cloneItem();m=g.getElementsByTagName("img")[0];m.id="source_"+x[r].id;m.src=x[r].src;if(h.isSelected(m.id.replace("source","target"))){g.className="pp_type_"+x[r].media+" selected";}else{g.className="pp_type_"+x[r].media;}B.appendChild(g);}t.appendChild(B);var C=t.scrollHeight-t.offsetHeight;if(t.scrollHeight&&t.scrollTop>=C){t.scrollTop=C-1;}}else{var v=_ge("pp-search");var b=_ge("pp-search-filter");if(b.value=="all"&&!v.value){t.innerHTML="<div class=\"pp_empty\"><h3>"+F.output.get("group_photopickr_empty_account")+"</h3></div>";}else{t.innerHTML="<div class=\"pp_empty\"><h3>"+F.output.get("no_photos_found")+"</h3>"+(v.value?"<div>"+F.output.get("other_than","<b>"+v.value.escape_for_display()+"</b>")+"</div>":"")+"</div>";try{v.select();v.focus();}catch(N){}}}};this.flickr_photos_search_onLoad=function(r,b,x,e){h.setLoading(false);h.pendingRequest=false;if(!r){alert("there was an error: "+x);return ;}var C=h.parseCollection(b);h.makePhotosList(C);};this.setLoading=function(C,e){var x=_ge("pp-source");var b=_ge("pp-loading");if(e){x.innerHTML="";}if(C){Y.D.addClass(_ge("pp"),"pp-cursor-loading");}else{Y.D.removeClass(_ge("pp"),"pp-cursor-loading");}document.body.style.cursor=(C?"wait":"auto");b.className=(C?"active":"");};this.doSearch=function(b){if(!h.pendingRequest){var x=null;if(_ge("pp-search").value!=""){x=F.get_tags_from_input_str(_ge("pp-search").value);_ge("pp-show-all").style.display="inline";}h.setLoading(true,true);h.pendingRequest=true;var C={user_id:global_nsid,tags:x,per_page:102,extras:"media"};h.apiData.lastCallParams=C;h.call_API(C);}if(typeof b!="undefined"||typeof (event)!="undefined"){Y.E.stopEvent(b?b:event);}return false;};this.getNextPage=function(){h.setLoading(true);h.pendingRequest=true;h.apiData.lastCallParams.page=h.apiData.currentPage;h.call_API(h.apiData.lastCallParams);};this.didScroll=function(){if(this.scrollHeight&&this.scrollTop>=this.scrollHeight-this.offsetHeight){h.scrolledToBottom();}};this.scrolledToBottom=function(){if(!h.pendingRequest&&h.apiData.currentPage<h.apiData.pages){h.apiData.currentPage++;h.getNextPage();}else{}};this.isSelected=function(C){return (typeof h.selectedPhotosHash[C]!="undefined");};this.sourceClick=function(v){var m=(v?v.target||v.srcElement:event.srcElement);if(m.nodeName.toLowerCase()!=""){var C=F.find_parent_node_by_name(m,"li");}if(!Y.D.hasClass(C,"pp_type_photo")&&!Y.D.hasClass(C,"pp_type_video")){return false;}var x=(m.nodeName.toLowerCase()=="li"?m:F.find_parent_node_by_name(m,"li"));m=Y.D.getElementsByClassName("pp_thumb","img",x)[0];var b=null;var O=m.nodeName.toLowerCase();if(O=="img"&&Y.D.hasClass(m,"pp_thumb")){b=m.id;}else{return true;}if(h.resetMode){h.removeSelectedItems();}var r=b.replace("source","target");var x=_ge(r);if(x){h.removeItem(b,r);}else{h.addItem(F.find_parent_node(_ge(b)));}h.setResetMode(false);};this.targetClick=function(m){var O=(m?m.target||event.srcElement:event.srcElement);var x=(O.nodeName.toLowerCase()=="li"?O:F.find_parent_node_by_name(O,"li"));if(!x){return true;}var v=null;var b=null;O=Y.D.getElementsByClassName("pp_thumb","img",x)[0];v=O.id;b=v.replace("target","source");if(h.resetMode){h.removeSelectedItems();h.setResetMode(false);h.setButtonState();return false;}O.id="";O.src=_images_root+"/spaceball.gif";x.className="";for(var r=0;r<h.selectedPhotos.length;r++){if(h.selectedPhotos[r].srcID==b){h.selectedPhotos.splice(r,1);}}if(!h.selectedPhotos.length){h.setButtonState();}delete h.selectedPhotosHash[v];var C=_ge(b);if(C){Y.D.removeClass(F.find_parent_node(C),"selected");}h.setResetMode(false);};this.addItem=function(C){var x=h.getNextTarget();if(!x||h.selectedPhotos.length>=n){h.setModalMode(true);global_comm_div.start_comming(F.output.get("group_photopickr_limit",n),undefined,undefined,true,true,undefined,h.setModalMode,false,undefined,undefined,undefined,true,false);return false;}var r=x.getElementsByTagName("img")[0];r.id=C.getElementsByTagName("img")[0].id.replace("source","target");var b=r.id;r.src=C.getElementsByTagName("img")[0].src;Y.D.addClass(C,"selected");x.className=C.className;try{}catch(v){}h.selectedPhotos[h.selectedPhotos.length]={srcID:C.getElementsByTagName("img")[0].id,targetID:x.id,id:b.substr(7)};h.setButtonState(true);h.selectedPhotosHash[b]=true;};this.removeItem=function(v){var C=F.find_parent_node(_ge(v));var e=v.replace("source","target");var x=F.find_parent_node(_ge(e));var r=x.getElementsByTagName("img")[0];r.src=_images_root+"/spaceball.gif";r.id="";Y.D.removeClass(C,"selected");x.className="";for(var b=0;b<h.selectedPhotos.length;b++){if(h.selectedPhotos[b].srcID==v){h.selectedPhotos.splice(b,1);}}if(!h.selectedPhotos.length){h.setButtonState();}delete h.selectedPhotosHash[e];};this.setButtonState=function(C){_ge("pp-add-photos").className=(C?"Butt":"DisabledButt");};this.getNextTarget=function(){var e=_ge("pp-target").getElementsByTagName("li");var x=null;for(var C=0;C<e.length;C++){x=e[C].getElementsByTagName("img")[0];if(!x.id||x.id==""){return e[C];}}return null;};this.createTargetList=function(){var e=_ge("pp-target");if(!e){return false;}e.innerHTML="";var C=document.createElement("ul");C.className="pp-list";for(var x=n;x--;){C.appendChild(h.cloneItem());}e.appendChild(C);};this.flickr_groups_pools_add_onLoad=function(b,e,C,x){h.setLoading(false);h.addedAPIResponses[h.addedAPIResponses.length]={success:b,responseXML:e,responseText:C,params:x};if(h.addedAPIResponses.length>=h.selectedPhotos.length){h.handleAddAPIResponses();}};this.isQueued=function(C){return (C.responseText.indexOf("Your Photo has been added to the Pending Queue for this Pool")!=-1);};this.handleAddAPIResponses=function(){var b=0;var C=0;var m=0;var x=h.addedAPIResponses.length;var v="";for(var e=0;e<x;e++){if(h.addedAPIResponses[e].success){b++;}else{if(h.isQueued(h.addedAPIResponses[e])){b++;m++;}else{C++;}}}var O=(m==0?"add_to_group_added":"batch_end_pending_adding_to_group");if(!C){if(b==1){v=F.output.get(O,S);}else{v=F.output.get(O+"_plural",parseInt(b),S);}}else{if(C<x){v="<ul style=\"margin-left:0px;padding-left:2em;margin-bottom:0px\">";v+=("<li>"+F.output.get("group_photopickr_could_only_add",x-C)+"</li>");v+=("<li>"+F.output.get((C>1?"group_photopickr_could_not_add_mixed_plural":"group_photopickr_could_not_add_mixed_single"),C)+"</li>");v+=("<li>"+F.output.get("group_photopickr_taken_out")+"</li>");v+="</ul>";}else{if(C==1){v=F.output.get("group_photopickr_could_not_add_single");}else{v=F.output.get("group_photopickr_could_not_add_any");}}}h.results={"ok":b,"queued":m,"failed":C,"allFailed":(C&&C==x)};var r=null;for(var e=0;e<h.addedAPIResponses.length;e++){r=F.find_parent_node(_ge("target_"+h.addedAPIResponses[e].params.photo_id));Y.D.addClass(r,(h.addedAPIResponses[e].success||h.isQueued(h.addedAPIResponses[e])?"pp_ok":"pp_error"));}h.updateRemaining(b);setTimeout(function(){if(C||m){if(!h.results.allFailed){h.removeFailedItems();}h.setModalMode(true);global_comm_div.start_comming(v,undefined,undefined,true,true,undefined,h.onFinish,false,undefined,undefined,undefined,true,false);}else{h.onFinish();}},250);};this.updateRemaining=function(C){var e=_ge("pp-limit-remaining");if(e){var x=parseInt(global_group_limit_remaining);if(!isNaN(x)&&x!=101&&C){x-=C;n=x;e.innerHTML=F.output.get("group_photopickr_can_add",x);}else{if(!isNaN(x)){e.innerHTML=F.output.get("group_photopickr_can_add",x==101?n:x);}}}};this.onFinish=function(){if(h.results.allFailed){h.removeFailedItems();}h.setModalMode(false);h.addedAPIResponses=[];if(!h.results.allFailed){window.location.href=("/groups/"+global_group_nsid+"/?added="+h.results.ok);}};this.setModalMode=function(C){var x=_ge("pp-source");x.style.overflow=(C?"hidden":"auto");};this.setResetMode=function(C){if(h.resetMode==C){return false;}var x=_ge("pp-add-photos");if(C){x.value=F.output.get("clear_selection");}else{x.value=F.output.get("group_photopickr_add");}h.resetMode=C;};this.removeAddedItems=function(){for(var C=0;C<h.addedAPIResponses.length;C++){if(h.addedAPIResponses[C].success&&h.isQueued(h.addedAPIResponses[C])){h.removeItem("source_"+h.addedAPIResponses[C].params.photo_id);}}};this.removeFailedItems=function(){for(var C=0;C<h.addedAPIResponses.length;C++){if(!h.addedAPIResponses[C].success&&!h.isQueued(h.addedAPIResponses[C])){h.removeItem("source_"+h.addedAPIResponses[C].params.photo_id);}}};this.removeSelectedItems=function(){if(h.resetMode==true){for(var C=0;C<h.selectedPhotos.length;C++){h.removeItem(h.selectedPhotos[C].srcID);C--;}}};this.doAddPhotos=function(){if(h.resetMode==true){h.removeSelectedItems();h.setResetMode(false);return false;}var x=0;for(var C=h.selectedPhotos.length;C--;){if(global_photos[h.selectedPhotos[C].id].getAttribute("ispublic")==0){x++;}}if(x==0){h.doAddPhotosAPICall();}else{h.setModalMode(true);global_comm_div.start_comming(F.output.get((x>1?"batch_confirm_adding_to_group_plural":"batch_confirm_adding_to_group"),S),undefined,undefined,true,true,undefined,h.doAddPhotosAPICall,true,undefined,h.setModalMode,undefined,true,false);}};this.doAddPhotosAPICall=function(){var C=[];var e=null;for(var x=0;x<h.selectedPhotos.length;x++){e={photo_id:h.selectedPhotos[x].id,group_id:global_group_nsid};h.setModalMode(true);global_comm_div.start_comming(F.output.get("group_photopickr_adding"),undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,true,false);F.API.callMethod("flickr.groups.pools.add",e,h,null,null,0);}};this.attachEvents=function(){Y.E.addListener(_ge("pp-search-filter"),"change",function(){h.setSearchType(true);});Y.E.addListener(_ge("emptyform"),"submit",h.doSearch);Y.E.addListener(_ge("pp-add-photos"),"click",h.doAddPhotos);Y.E.addListener(_ge("pp-target"),"mousedown",h.targetClick);Y.E.addListener(_ge("pp-source"),"mousedown",h.sourceClick);Y.E.addListener(_ge("pp-source"),"scroll",h.didScroll);Y.E.addListener(_ge("pp-show-all"),"click",h.doSearchAll);};this.init=function(C){if(!global_comm_div){_make_comm_div("10001");}h.oPhotosFound=_ge("pp-photos-found");if(!h.oPhotosFound){return false;}h.createTargetList();h.attachEvents();h.setButtonState();h.setSearchType();h.updateRemaining();};var M=6;var n=Math.max(0,(Math.min(M,parseInt(global_group_limit_remaining))));};Y.E.addListener(window,"load",function(){if(_ge("pp")&&!Y.D.hasClass(_ge("pp"),"disabled")){F.photopickr=new F.PhotoPicker();F.photopickr.init();}});