function place_menu(V,H){var G=Y.U.Dom.getX(H);var l=Y.U.Dom.getY(H)+24;if(F.is_ie){G-=2;l-=2;}V.style.left=G+"px";V.style.top=l+"px";}var sendToBlogDialogDiv;function show_sendToBlogDialog(H){if(!_ok_for_scrumjax_xml()){document.location="/blog.gne?photo="+H;return ;}if(_ge("photo_props")){_ge("photo_props").style.display="none";}var V=_ge("photo_gne_button_blog_this");V.disable_others();if(sendToBlogDialogDiv==undefined){make_send_to_div("sendToBlog",H);}place_menu(sendToBlogDialogDiv,V);sendToBlogDialogDiv.style.display="block";if(navigator.userAgent.indexOf("Mozilla/5.0")!=-1&&navigator.userAgent.indexOf("KHTML")==-1){var G=_ge("sendToBlogDialogListDiv").offsetHeight;if(G>=220){_ge("sendToBlogDialogListDiv").style.overflow="-moz-scrollbars-vertical";}}}var sendToGroupDialogDiv;function show_sendToGroupDialog(H){if(!_ok_for_scrumjax_xml()){document.location="/photo_sendto_group.gne?id="+H;return ;}if(_ge("photo_props")){_ge("photo_props").style.display="none";}var V=_ge("photo_gne_button_send_to_group");V.disable_others();if(sendToGroupDialogDiv==undefined){make_send_to_div("sendToGroup",H);}place_menu(sendToGroupDialogDiv,V);sendToGroupDialogDiv.style.display="block";if(navigator.userAgent.indexOf("Mozilla/5.0")!=-1&&navigator.userAgent.indexOf("KHTML")==-1){var G=_ge("sendToGroupDialogListDiv").offsetHeight;if(G>=220){_ge("sendToGroupDialogListDiv").style.overflow="-moz-scrollbars-vertical";}}}var sendToSetDialogDiv;function show_sendToSetDialog(H){if(!_ok_for_scrumjax_xml()){document.location="/photo_sendto_set.gne?id="+H;return ;}if(_ge("photo_props")){_ge("photo_props").style.display="none";}var V=_ge("photo_gne_button_send_to_set");V.disable_others();if(sendToSetDialogDiv==undefined){make_send_to_div("sendToSet",H);}place_menu(sendToSetDialogDiv,V);sendToSetDialogDiv.style.display="block";if(navigator.userAgent.indexOf("Mozilla/5.0")!=-1&&navigator.userAgent.indexOf("KHTML")==-1){var G=_ge("sendToSetDialogListDiv").offsetHeight;if(G>=220){_ge("sendToSetDialogListDiv").style.overflow="-moz-scrollbars-vertical";}}}var printDialogDiv;function show_printDialog(G){if(!_ok_for_scrumjax_xml()){document.location="/photo_print.gne?id="+G;return ;}if(_ge("photo_props")){_ge("photo_props").style.display="none";}var H=_ge("photo_gne_button_print");H.disable_others();if(printDialogDiv==undefined){make_send_to_div("print",G);}place_menu(printDialogDiv,H);printDialogDiv.style.display="block";}function hide_printDialog(){hide_send_to_div(printDialogDiv,_ge("photo_gne_button_print"));var G=_ge("print_form");if(G&&G.clear){G.clear();}}function hide_sendToSetDialog(){hide_send_to_div(sendToSetDialogDiv,_ge("photo_gne_button_send_to_set"),_ge("sendToSetDialogFormDiv"));var G=_ge("new_set_form");G.set_title.value="";G.set_description.value="";}function hide_sendToGroupDialog(){hide_send_to_div(sendToGroupDialogDiv,_ge("photo_gne_button_send_to_group"));}function hide_sendToBlogDialog(){hide_send_to_div(sendToBlogDialogDiv,_ge("photo_gne_button_blog_this"));}hide_send_to_div=function(l,V,H){V.enable_others();V.lock_down=0;V.handle_mouseout();l.style.display="none";window.should_I_ignore_stuff_because_of_button_action=0;_ge(l.id.replace("Div","")+"HeaderDiv").innerHTML=l.get_click_a_text();var G=_ge(l.id.replace("Div","")+"ListDiv");if(H&&H.style.display=="block"){G.style.display="block";H.style.display="none";}};make_send_to_div=function(P,l){var j=P+"Dialog";var z=j+"Div";if(P=="sendToSet"){var T="set";var N=F.output.get("photo_what_set");var V=F.output.get("photo_what_set_plural");var H=49;var y="flickr.photosets.getList";var d=F.output.get("photo_create_new_one",z);}else{if(P=="sendToGroup"){var T="group";var N=F.output.get("photo_what_group");var V=F.output.get("photo_what_group_plural");var H=54;var y="flickr.groups.pools.getGroups";var d=F.output.get("photo_dont_belong");}else{if(P=="sendToBlog"){var T="blog";var N=F.output.get("photo_what_blog");var V=F.output.get("photo_what_blog_plural");var H=48;var y="flickr.blogs.getList";var d=F.output.get("photo_configure_blog_now");}else{if(P=="print"){var T="print";var N=F.output.get("photo_what_print");var V=F.output.get("photo_what_print_plural");var H=58;var y="";var d="";}else{return ;}}}}var G=window[z]=document.createElement("div");G.id=z;G.style.position="absolute";G.style.padding="0 0px 0px 0px";G.style.border="1px solid #999";G.style.borderWidth="0 1px 1px 1px";G.style.fontFamily="arial";G.style.fontSize="12px";G.style.textAlign="left";G.style.backgroundColor="#fff";G.style.width="250px";G.style.overflow="visible";if(P=="print"){G.style.width="260px";var a="<div style=\"border:1px solid #999; border-width:1px 0 0 0;height:1px; margin-left:"+H+"px; font-size:1px;\"></div>";a+="<div id=\""+j+"HeaderDiv\" style=\"text-align:center; padding:3px 0 3px 0;\">"+F.output.get("photo_loading_print_options")+"</div>";a+="<div id=\""+j+"ListWrapperDiv\" style=\"display:none; background-color:#fff; padding:4px 2px 4px 2px; border-bottom: 1px solid #ddd; border-top: 1px solid #ddd;\">";a+="<div id=\""+j+"ListDiv\" style=\"padding-right:2px; max-height:450px; overflow:auto;\"></div>";a+="</div>";a+="<div id=\""+j+"BottomDiv\" style=\"margin:0px; display:none; background-color:#f7f7f7; font-family:arial; font-size:11px; padding:13px 13px 8px 13px;\">";a+="<!--"+F.output.get("photo_printing_services_provided_by");a+="<br><img src=\""+_images_root+"/icon_cart.gif\" width=\"16\" height=\"16\" border=\"0\" style=\"border:0; float:right; display:block;\"><br clear=\"all\">";a+="--></div>";}else{var a="<div style=\"border:1px solid #999; border-width:1px 0 0 0;height:1px; margin-left:"+H+"px; font-size:1px;\"></div>";if(T=="set"){a+="<div id=\""+j+"HeaderDiv\" style=\"text-align:center; padding:3px 0 3px 0;\">"+F.output.get("photo_loading_what_set")+"</div>";}if(T=="group"){a+="<div id=\""+j+"HeaderDiv\" style=\"text-align:center; padding:3px 0 3px 0;\">"+F.output.get("photo_loading_what_group")+"</div>";}if(T=="blog"){a+="<div id=\""+j+"HeaderDiv\" style=\"text-align:center; padding:3px 0 3px 0;\">"+F.output.get("photo_loading_what_blog")+"</div>";}if(T=="print"){a+="<div id=\""+j+"HeaderDiv\" style=\"text-align:center; padding:3px 0 3px 0;\">"+F.output.get("photo_loading_what_print")+"</div>";}a+="<div style=\"display:none; background-color:#fff; padding:4px 2px 4px 2px; border-bottom: 1px solid #ddd; border-top: 1px solid #ddd;\">";a+="<div id=\""+j+"ListDiv\" style=\"padding-right:2px; max-height:220px; overflow:auto;\"></div>";a+="\t<div id=\""+j+"FormDiv\" style=\"margin:10px; display:none; height:200px\">";if(P=="sendToSet"){a+="<form id=\"new_set_form\" onsubmit=\"_ge('"+z+"').create_new_set(); return false;\">";a+=F.output.get("photo_title")+"<br><input type=\"text\" name=\"set_title\" style=\"width:220px;\"><br><br>";a+=F.output.get("photo_description")+"<br><textarea type=\"text\" name=\"set_description\" style=\"width:220px; height:105px;\"></textarea><br>";a+="<input type=\"button\" class=\"Butt\" value=\""+F.output.get("photo_create_new_set")+"\" onclick=\"_ge('"+z+"').create_new_set(); this.blur();\" style=\"margin:5px 0 0 0;\">";a+="</form>";}a+="</div>";a+="</div>";a+="<div id=\""+j+"BottomDiv\" style=\"margin:3px; display:none; text-align:center;\">";a+="<a href=\"\" onclick=\"hide_"+j+"(); return false;\">"+F.output.get("cancel")+"</a>";a+="</div>";}G.innerHTML=a;document.body.appendChild(G);G.get_click_a_text=function(){var R="";if(P=="sendToSet"){if(user_can_create_sets){R+=F.output.get("photo_choose_a_set_or","_ge('"+z+"').show_new_set_form();return false;");}else{R+=F.output.get("photo_choose_a_set");}}else{if(P=="print"){R=F.output.get("photo_choose_a_size");}else{if(T=="set"){R=F.output.get("photo_choose_a_what_set");}if(T=="group"){R=F.output.get("photo_choose_a_what_group");}if(T=="blog"){R=F.output.get("photo_choose_a_what_blog");}if(T=="print"){R=F.output.get("photo_choose_a_what_print");}}}return R;};G.show_new_set_form=function(){_ge(j+"ListDiv").parentNode.style.display="block";_ge(j+"HeaderDiv").innerHTML=F.output.get("photo_create_new_set_ups");_ge(j+"ListDiv").style.display="none";_ge(j+"FormDiv").style.display="block";_ge("new_set_form").set_title.focus();};G.create_new_set=function(){var R=_ge("new_set_form");var b=R.set_title.value;var U=R.set_description.value;if(b==""){alert(F.output.get("photo_must_enter_set_title"));return ;}this.send_to_action(null,b,"create",U);};G.send_to_action=function(b,h,C,X,k){var m=_ge("photo_notes");if(P=="sendToGroup"&&C=="add"&&!global_photos[l].isPublic&&!k){window["hide_"+j]();var R=function(){G.send_to_action(b,h,C,X,1);};var K=F.output.get("photo_private_photo_to_group",h);m.start_comming(K,1,1,F.output.get("yes_up"),R,1,F.output.get("no_up"),null);return ;}deja_view_uh_huh();if(P=="print"){var U=F.output.get("photo_adding_prints_to_cart");}else{if(C=="remove"){var U="";if(T=="set"){U=F.output.get("photo_removing_photo_from_what_set");}if(T=="group"){U=F.output.get("photo_removing_photo_from_what_group");}if(T=="blog"){U=F.output.get("photo_removing_photo_from_what_blog");}}else{if(C=="create"){var U="";if(T=="set"){U=F.output.get("photo_creating_new_what_set");}if(T=="group"){U=F.output.get("photo_creating_new_what_group");}if(T=="blog"){U=F.output.get("photo_creating_new_what_blog");}}else{var U="";if(T=="set"){U=F.output.get("photo_adding_photo_to_what_set");}if(T=="group"){U=F.output.get("photo_adding_photo_to_what_group");}if(T=="blog"){U=F.output.get("photo_adding_photo_to_what_blog");}}}}window["hide_"+j]();this.id_dealing_with=b;this.title_dealing_with=h;if(P=="sendToSet"){if(C=="create"){F.API.callMethod("flickr.photosets.create",{title:h,description:X,primary_photo_id:l},G);}else{if(C=="remove"){F.API.callMethod("flickr.photosets.removePhoto",{photoset_id:b,photo_id:l},G);}else{F.API.callMethod("flickr.photosets.addPhoto",{photoset_id:b,photo_id:l},G);}}}else{if(P=="sendToGroup"){if(C=="remove"){F.API.callMethod("flickr.groups.pools.remove",{group_id:b,photo_id:l},G);}else{F.API.callMethod("flickr.groups.pools.add",{group_id:b,photo_id:l},G);}}else{if(P=="sendToBlog"){var Q=_ge("blog_form");Q.blog.value=b;Q.submit();return ;}else{if(P=="print"){G.addToCart_responses_expected=page_print_orderA.length;G.addToCart_responses=0;G.addToCart_error_count=0;G.addToCart_problem_product_ids=[];G.addToCart_cart_url="";G.addToCart_last_error="";G.send_another_printing_product();}else{return ;}}}}if(m&&m.start_comming){m.start_comming(U);}};G.send_another_printing_product=function(){var R=page_print_orderA[G.addToCart_responses].split(":");var U={provider_id:page_printing_provider,photo_ids:l,product_id:R[0].replace("prod",""),quantity:R[1]};F.API.callMethod("flickr.printing.addToCart",U,G);};G.flickr_printing_addToCart_onLoad=function(X,K,h,b){G.addToCart_responses++;if(X){G.addToCart_cart_url=K.documentElement.getElementsByTagName("cart")[0].firstChild.nodeValue;}else{G.addToCart_error_count++;G.addToCart_problem_product_ids.push(b.product_id);if(h){G.addToCart_last_error=h;}else{G.addToCart_last_error=F.output.get("unknown_err");}}if(G.addToCart_responses!=G.addToCart_responses_expected){G.send_another_printing_product();return ;}var k=_ge("photo_notes");writeDebug("div.addToCart_responses "+G.addToCart_responses+" "+G.addToCart_error_count);if(G.addToCart_responses>G.addToCart_error_count){if(G.addToCart_error_count>0){var C=F.output.get("photo_adding_some_errors",global_photos[l].title,G.addToCart_error_count,G.addToCart_last_error.truncate_with_ellipses(400).replace("&","[wbr]&").replace("/","/[wbr]").replace("=","=[wbr]").escape_for_display_and_wrap().replace("[wbr]","<wbr>"));}else{var C=F.output.get("photo_added_prints_to_cart",global_photos[l].title,G.addToCart_cart_url);}C+="<ul style=\"padding-left:20px;\">";for(var m=0;m<page_print_orderA.length;m++){var U=page_print_orderA[m].split(":");if(F.array_index_of(G.addToCart_problem_product_ids,G.productsO[U[0]].id)>-1){C+="<li style=\"color:red;\"><b>"+0+"</b> @ "+G.productsO[U[0]].id+" "+G.productsO[U[0]].name+"</li>";}else{C+="<li><b>"+U[1]+"</b> @ "+G.productsO[U[0]].name+" <nobr>("+format_price(U[1]*(G.productsO[U[0]].price.replace(".","")))+")</nobr></li>";}}C+="</ul>";C+="<form id=\"print_cart_form\"><input type=\"button\" id=\"print_ok_button\" class=\"Butt\" value=\""+F.output.get("photo_continue_browsing")+"\" style=\"margin:5px 0 10px 0;\"><br>"+F.output.get("photo_or_are_you_ready")+"<br><input type=\"button\" id=\"print_cart_button\" class=\"Butt\" value=\""+F.output.get("photo_proceed")+"\" style=\"margin:5px 0 10px 0;\"></form>"+"<div id=\"print_cart_prompt\"><img src=\""+_images_root+"/icon_cart.gif\" width=\"16\" height=\"16\" border=\"0\" style=\"margin:0 6px 20px 0; border:0; float:left; display:block;\">"+"<div>"+F.output.get("photo_get_to_cart")+"</div></div>";k.start_comming(C,1,0,F.output.get("photo_go_to_cart"),1,F.output.get("close_up"),null);var Q=_ge("print_ok_button");if(navigator.userAgent.indexOf("KHTML")==-1){Q.focus();}Q.onclick=function(){k.stop_comming();this.blur();};var R=_ge("print_cart_button");R.onclick=function(){k.stop_comming();this.blur();document.location=G.addToCart_cart_url;};}else{alert(F.output.get("photo_errors_adding_prints")+" "+G.addToCart_last_error);if(k&&k.stop_comming){k.stop_comming(1);}}};G.flickr_photosets_removePhoto_onLoad=G.flickr_groups_pools_remove_onLoad=function(Q,k,m){var U=_ge("photo_notes");var R=_ge("add_to_"+T+"_"+this.id_dealing_with+"_div");var b=_ge("add_to_"+T+"_"+this.id_dealing_with+"_td");if(Q||m.indexOf("not in pool")!=-1||m.indexOf("not in set")!=-1){if(R){R.make_me_for_adding();}if(U&&U.p_id&&P=="sendToSet"){var C=F.output.get("photo_removed_from_set",global_photos[l].ownersUrl,this.id_dealing_with,this.title_dealing_with);remove_context_widget("set",this.id_dealing_with);F.API.callMethod(y,{},G);}else{if(U&&U.p_id&&P=="sendToGroup"){var C=F.output.get("photo_removed_from_pool",this.id_dealing_with,this.title_dealing_with);remove_context_widget("pool",this.id_dealing_with);}}U.start_comming(C,1,1,F.output.get("ok"));}else{alert(F.output.get("api_err_generic")+" "+m);if(U&&U.stop_comming){U.stop_comming(1);}}};G.flickr_photosets_addPhoto_onLoad=G.flickr_groups_pools_add_onLoad=function(X,K,k,U){var m=_ge("photo_notes");var h=_ge("add_to_"+T+"_"+this.id_dealing_with+"_div");var b=_ge("add_to_"+T+"_"+this.id_dealing_with+"_td");if(X||k.indexOf("already in pool")!=-1||k.indexOf("already in set")!=-1||k.indexOf("Your Photo has been added to the Pending Queue for this Pool")!=-1){if(h){h.make_me_for_removing();}if(m&&m.p_id&&P=="sendToSet"){var C=F.output.get("photo_added_to_set",global_photos[l].ownersUrl,this.id_dealing_with,this.title_dealing_with);add_context_widget("set",this.id_dealing_with,l);}else{if(m&&m.p_id&&P=="sendToGroup"){if(k.indexOf("Your Photo has been added to the Pending Queue for this Pool")!=-1){var C=F.output.get("photo_added_to_pool_pending",this.id_dealing_with,this.title_dealing_with);}else{var C=F.output.get("photo_added_to_pool",this.id_dealing_with,this.title_dealing_with);}add_context_widget("pool",this.id_dealing_with,l,(k.indexOf("Your Photo has been added to the Pending Queue for this Pool")!=-1)?true:false);}}var Q=function(){h.confirm_remove();};m.start_comming(C,1,1,F.output.get("ok"),null,1,F.output.get("undo"),Q);}else{if(!K){alert(F.output.get("api_err_generic")+" "+k);if(m&&m.stop_comming){m.stop_comming(1);}return ;}var R=K.documentElement.getElementsByTagName("err")[0];if(R&&R.getAttribute("code")=="5"&&T=="group"){this.flickr_groups_getInfo_onLoad=function(D,W,v,n){var A=W.documentElement.getElementsByTagName("throttle")[0];var Z=A.getAttribute("count");var B=A.getAttribute("mode");if(B=="disabled"){var u=F.output.get("photo_adding_disabled",this.title_dealing_with);}else{if(B=="ever"){if(Z*1>1){var u=F.output.get("photo_limits_1",Z,this.title_dealing_with,Z);}else{var u=F.output.get("photo_limits_2",Z,this.title_dealing_with,Z);}}else{if(Z*1>1){var u=F.output.get("photo_limits_3",Z,B,this.title_dealing_with,Z);}else{var u=F.output.get("photo_limits_4",Z,B,this.title_dealing_with,Z);}}}u+="<br><br>"+F.output.get("photo_see_group_for_info",_site_root,this.id_dealing_with,this.title_dealing_with);m.start_comming(u,1,1);};F.API.callMethod("flickr.groups.getInfo",{group_id:this.id_dealing_with},this);}else{if(R&&R.getAttribute("code")=="4"&&T=="group"){m.start_comming(F.output.get("photo_max_groups",global_group_limit,this.title_dealing_with),1,1);}else{if(R&&R.getAttribute("code")=="6"&&T=="group"){m.start_comming(F.output.get("photo_max_groups",global_group_limit,this.title_dealing_with),1,1);}else{if(R&&R.getAttribute("code")=="7"&&T=="group"){m.start_comming(F.output.get("photo_added_to_pool_already_pending",global_group_limit,this.title_dealing_with),1,1);if(h){h.make_me_for_removing();}}else{if(R&&R.getAttribute("code")=="8"&&T=="group"){this.pool_restrictions_fragment_onLoad=function(v,Z,A){var B=F.output.get("photo_not_added_to_pool_restrictions",this.id_dealing_with,this.title_dealing_with);B+=restrictions_html="<ul class=\"batch_edit_pool_restrictions\">"+Z+"</ul>";B+=""+F.output.get("photo_see_group_for_info",_site_root,this.id_dealing_with,this.title_dealing_with);m.start_comming(B,1,1);};F.fragment_getter.get("/fragment_groups_pool_restrictions.gne",{nsid:this.id_dealing_with},this,"pool_restrictions_fragment_onLoad");}else{alert(F.output.get("api_err_generic")+" "+k);if(m&&m.stop_comming){m.stop_comming(1);}}}}}}}};G.flickr_photosets_create_onLoad=function(k,m,C){var U=_ge("photo_notes");if(k){var R=m.documentElement.getElementsByTagName("photoset")[0];if(U&&U.p_id&&P=="sendToSet"){var b=F.output.get("photo_added_to_set2",R.getAttribute("url"),this.title_dealing_with);add_context_widget("set",R.getAttribute("id"),l);}U.start_comming(b,1,1,F.output.get("ok"),null);F.API.callMethod(y,{new_set_id_passthrough:R.getAttribute("id")},G);}else{alert(F.output.get("api_err_generic")+" "+C);if(U&&U.stop_comming){U.stop_comming(1);}}};G.flickr_photosets_getList_onLoad=G.flickr_blogs_getList_onLoad=G.flickr_groups_pools_getGroups_onLoad=function(h,R,Z,S){if(!h){alert(F.output.get("api_err_generic")+" "+Z);}var L=1;var k=1;if(P=="sendToSet"){var A=R.documentElement.getElementsByTagName("photoset");user_can_create_sets=(R.documentElement.getElementsByTagName("photosets")[0].getAttribute("cancreate")=="1")?1:0;_ge(j+"HeaderDiv").innerHTML=this.get_click_a_text();}else{if(P=="sendToGroup"){var A=R.documentElement.getElementsByTagName("group");L=R.documentElement.getElementsByTagName("groups")[0].getAttribute("pages")*1;k=R.documentElement.getElementsByTagName("groups")[0].getAttribute("page")*1;}else{if(P=="sendToBlog"){var A=R.documentElement.getElementsByTagName("blog");}else{return ;}}}if(A.length==0){if(P=="sendToSet"){G.show_new_set_form();}else{_ge(j+"BottomDiv").innerHTML="<br>"+d+"<br><br>"+_ge(j+"BottomDiv").innerHTML+"";_ge(j+"HeaderDiv").style.display="none";}}else{if(k==1){_ge(j+"ListDiv").innerHTML="";}var E=_page_timer.add("before collection iteration");for(var r=0;r<A.length;r++){_page_timer.add("before handle one");var f=A[r];var J=f.getAttribute("id");if(P=="sendToSet"){var B="contextDiv_set"+J;var U="set";var W=R.documentElement.getElementsByTagName("title")[r].firstChild.nodeValue;var u=f.getAttribute("server");var K=Math.ceil(u/1000);var n=_photo_root.replace("http://farm","http://farm"+K);var m=n+u+"/"+f.getAttribute("primary")+"_"+f.getAttribute("secret")+"_s.jpg";var X=25;var b=25;}else{if(P=="sendToGroup"){var B="contextDiv_pool"+J;var U="pool";var W=f.getAttribute("name");var u=f.getAttribute("iconserver");var m=_images_root+"/buddyicon.jpg";if(u&&u!="0"){var K=Math.ceil(u/1000);var n=_photo_root.replace("http://farm","http://farm"+K);m=n+u+"/buddyicons/"+f.getAttribute("id")+".jpg";}var X=24;var b=24;}else{if(P=="sendToBlog"){var B="";var U="";var W=f.getAttribute("name");var m=_images_root+"/spaceball.gif";var X=20;var b=2;}}}var C=(r==0||(F.is_ie))?"0px":"-2px";var v=make_menu_item(T,J,W,C,m,b,X,j);_ge(j+"ListDiv").appendChild(v);var s=false;if(P=="sendToGroup"){for(var D=0;D<in_groupsA.length;D++){if(in_groupsA[D].nsid==J&&(in_groupsA[D].status==1||in_groupsA[D].status==2)){s=true;}}}if(P=="sendToGroup"&&s){v.make_me_for_removing();}else{if(P=="sendToSet"&&(_ge(B)&&_ge(B).style.display=="block"||nextprev_currentContextID==U+J)||S.new_set_id_passthrough==J){v.make_me_for_removing();}else{v.make_me_for_adding();}}_page_timer.add("after handle one");}_page_timer.add("after collection iteration");if(k<L){S.page=k+1;F.API.callMethod(S.method,S,this);return ;}_ge(j+"ListDiv").parentNode.style.display="block";if(F.is_ie){_ge(j+"ListDiv").style.height="auto";var Q=_ge(j+"ListDiv").offsetHeight;if(Q&&Q>220){_ge(j+"ListDiv").style.height="220px";}}_ge(j+"HeaderDiv").innerHTML=G.get_click_a_text();}_ge(j+"BottomDiv").style.display="block";_page_timer.dump(E);};G.flickr_printing_getProducts_onLoad=function(b,R,k,W){if(!b){alert(F.output.get("api_err_generic")+" "+k);}calculate_photo_props(l);var X=global_photos[l];var K=R.documentElement.getElementsByTagName("product");if(K.length==0){hide_printDialog();return false;}else{window.page_print_prices={};G.productsO={};for(var v=0;v<K.length;v++){var u=K[v];var h=u.getAttribute("id");var B=u.getAttribute("price");var D=u.getAttribute("name");var A=u.getAttribute("description");var m=u.getAttribute("minresx")*1;var C=u.getAttribute("minresy")*1;var Z=u.getAttribute("aspect")*1;var U=u.getAttribute("panorama")*1;var n=0;if(X.huge){if(F.array_index_of(global_huge_photo_print_ids,h)>-1){n=1;}}else{if(F.array_index_of(global_wallet_photo_print_ids,h)>-1){n=1;}}if(X.square){if(F.array_index_of(global_square_photo_print_ids,h)>-1){n=1;}}if(X.dig_dims){if(F.array_index_of(global_dig_photo_print_ids,h)>-1){n=1;}}else{if(F.array_index_of(global_reg_photo_print_ids,h)>-1){n=1;}}writeDebug("min rec size:"+m+"x"+C+" size:"+X.o_w+"x"+X.o_h);if(Z==1){var Q=(Math.min(X.o_w,X.o_h)>=m)?1:0;}else{var Q=(Math.max(X.o_w,X.o_h)>=Math.max(m,C)&&Math.min(X.o_w,X.o_h)>=Math.min(m,C))?1:0;}writeDebug("recommended:"+Q);G.productsO["prod"+h]={id:h,name:D.replace("Digital Aspect",""),description:A,price:B,recommended:Q,show:n,minresx:m,minresy:C};page_print_prices["prod"+h]=B.replace(".","");}}G.show_printing_products();};G.flickr_printing_setPrefs_onLoad=function(C,b,R,U){if(C){F.API.callMethod("flickr.printing.getProviders",{country_code:page_printing_country_code},G);}else{alert(F.output.get("api_err_generic")+" "+R);}};G.flickr_printing_getProviders_onLoad=function(m,C,R,b){if(m){var U=C.documentElement.getElementsByTagName("provider");if(U.length==0){page_printing_provider=0;}else{page_printing_provider=U[0].getAttribute("id");}if(!page_printing_provider||page_printing_provider=="0"){G.show_no_providers();}else{G.show_printing_products();}}else{alert(F.output.get("api_err_generic")+" "+R);}};G.show_print_screen_changing=function(R){_ge(j+"HeaderDiv").innerHTML="<br>"+R+"<br><br>";_ge(j+"ListDiv").parentNode.style.display="none";};G.set_country_select=function(C){if(!C){C=0;}var U=_ge("country");if(!U){return ;}for(var R=0;R<U.options.length;R++){var b=U.options[R];if(C==b.value){U.selectedIndex=R;return ;}}};G.show_no_providers=function(){_ge(j+"HeaderDiv").innerHTML=F.output.get("photo_apologize");_ge(j+"HeaderDiv").style.display="none";_ge(j+"ListWrapperDiv").style.border="0px solid red";_ge("choose_a_country_div").style.display="none";if(G.no_providers_text==undefined){G.no_providers_text=_ge("no_providers_div").innerHTML;}var R=function(U){U=U.replace("REP_COUNTRY",page_printing_country_name);return U;};_ge("no_providers_div").innerHTML=R(G.no_providers_text);_ge("no_providers_div").style.display="block";_ge(j+"ListDiv").parentNode.style.display="block";};G.show_country_form=function(){_ge(j+"HeaderDiv").innerHTML=F.output.get("photo_first_things_first");_ge(j+"HeaderDiv").style.display="none";_ge(j+"ListWrapperDiv").style.border="0px solid red";_ge("no_providers_div").style.display="none";_ge("print_form").style.display="none";G.set_country_select(page_printing_country_code);var R=_ge("country_submit");var U=_ge("country_form");if(U){U.onsubmit=R.onclick=function(){var C=U.country.selectedIndex;if(U.country.options[C].value==0){return false;}G.show_print_screen_changing(F.output.get("photo_setting_country"));page_printing_country_code=U.country.options[C].value;page_printing_country_name=U.country.options[C].text;F.API.callMethod("flickr.printing.setPrefs",{country_code:page_printing_country_code},G);};var b=_ge("country");b.onchange=function(){if(navigator.userAgent.indexOf("KHTML")==-1){R.focus();}};}_ge("choose_a_country_div").style.display="block";_ge(j+"ListDiv").parentNode.style.display="block";if(U){if(navigator.userAgent.indexOf("KHTML")==-1){b.focus();}}};G.show_all_printing_products=function(){printDialogDiv.style.display="none";for(p in G.productsO){var R=G.productsO[p];if(R.show){continue;}_ge("prod_"+R.id+"_tr").style.display=(F.is_ie)?"block":"table-row";if(!R.recommended){_ge("print_not_rec_tr").style.display=(F.is_ie)?"block":"table-row";}}show_printDialog(l);};G.show_printing_products=function(){if(G.productsO==undefined){F.API.callMethod("flickr.printing.getProducts",{provider_id:page_printing_provider},G);return ;}_ge(j+"HeaderDiv").innerHTML=G.get_click_a_text();_ge(j+"HeaderDiv").style.display="block";_ge("choose_a_country_div").style.display="none";_ge("no_providers_div").style.display="none";var C=_ge("print_product_tr");var m=C.parentNode;var X=function(A,B){var u=B.description+" "+F.output.get("photo_we_recommend",B.minresx,B.minresy);global_js_tip_count++;var v=F.get_tip_html(u,"js_tooltip_"+global_js_tip_count,"tip_print_menu");A=A.replace("REP_TIP",v);A=A.replace("REP_NAME",B.name);A=A.replace("REP_PRODUCT","prod"+B.id);A=A.replace("REP_PRICE",B.price);return A;};for(p in G.productsO){var Q=G.productsO[p];var h=document.createElement("tr");h.id="prod_"+Q.id+"_tr";if(!Q.show){h.style.display="none";}var b=document.createElement("td");b.className="print_dropdown_td";b.innerHTML=X(C.childNodes[0].innerHTML,Q);h.appendChild(b);var U=document.createElement("td");U.className=(Q.recommended)?"print_item_td":"print_item_notrec_td";U.innerHTML=X(C.childNodes[1].innerHTML,Q);h.appendChild(U);var R=document.createElement("td");R.className=(Q.recommended)?"print_price_td":"print_price_notrec_td";R.innerHTML=X(C.childNodes[2].innerHTML,Q);h.appendChild(R);if(Q.recommended){m.insertBefore(h,_ge("print_not_rec_tr"));}else{if(Q.show){_ge("print_not_rec_tr").style.display=(F.is_ie)?"block":"table-row";}m.appendChild(h);}}var k=_ge("print_cancel");var Z=_ge("print_add");var K=_ge("print_form");K.clear=function(){for(var B=0;B<K.elements.length;B++){if(K.elements[B].type=="select-one"){K.elements[B].selectedIndex=0;}}update_print_prices();};page_print_orderA=[];k.onclick=hide_printDialog;Z.onclick=function(){page_print_orderA=[];for(var B=0;B<K.elements.length;B++){if(K.elements[B].type=="select-one"){if(K.elements[B].value*1>0){writeDebug("print_form.elements[i].value "+K.elements[B].value);page_print_orderA.push(K.elements[B].name+":"+K.elements[B].value);}}}if(page_print_orderA.length>0){G.send_to_action(l,"cart","add");}return false;};if(_ge("change_country_link2")){_ge("change_country_link2").onclick=function(){G.show_country_form();return false;};}if(_ge("more_print_options")){_ge("more_print_options").onclick=function(){this.style.display="none";G.show_all_printing_products();return false;};}_ge("print_form").style.display="block";_ge(j+"ListDiv").parentNode.style.display="block";};G.print_fragment_onLoad=function(b,R,U){_ge(j+"ListDiv").innerHTML=R;if(page_printing_provider&&page_printing_provider!="0"){G.show_printing_products();}else{if(page_printing_country_code!=""){G.show_no_providers();}else{G.show_country_form();}}};if(P=="print"){var w={photo_id:l};if(page_zazzle_url!=undefined){w["zazzle_url"]=page_zazzle_url;}if(page_qoop_url!=undefined){w["qoop_url"]=page_qoop_url;}if(page_hp_url!=undefined){w["hp_url"]=page_hp_url;}F.fragment_getter.get("/photo_print_fragment.gne",w,G,"print_fragment_onLoad");}else{F.API.callMethod(y,{},G);}};make_menu_item=function(T,P,H,G,l,V,N,y){var j=(F.is_ie)?217:220;var a=document.createElement("DIV");a.id="add_to_"+T+"_"+P+"_div";a.style.marginTop=G;a.highlight=function(){this.style.backgroundColor="#0063DC";_ge("add_to_"+T+"_"+P+"_td").style.color="#fff";};a.unhighlight=function(){this.style.backgroundColor="transparent";_ge("add_to_"+T+"_"+P+"_td").style.color="#0063DC";};a.add_action=function(){window[y+"Div"].send_to_action(P,H,"add");};a.remove_action=function(){window[y+"Div"].send_to_action(P,H,"remove");};a.confirm_remove=function(){window["hide_"+y]();var d=function(){a.remove_action();};var z=_ge("photo_notes");z.start_comming(F.output.get("photo_are_you_sure",H),1,1,F.output.get("yes_up"),d,1,F.output.get("cancel"),null);};a.make_me_for_removing=function(){this.unhighlight();this.style.cursor="default";_ge("add_to_"+T+"_"+P+"_td").style.color="#999";if(T=="set"){remove_link="<a title=\""+F.output.get("photo_remove_from_set",H.replace("<","&lt;").replace("\"","&quot;"))+"\" class=\"remove_thing\" href=\"\" onclick=\"_ge('"+a.id+"').confirm_remove();return false;\">[X]</a>";}else{if(T=="group"){remove_link="<a title=\""+F.output.get("photo_remove_from_pool",H.replace("<","&lt;").replace("\"","&quot;"))+"\" class=\"remove_thing\" href=\"\" onclick=\"_ge('"+a.id+"').confirm_remove();return false;\">[X]</a>";}}_ge("add_to_"+T+"_"+P+"_td").innerHTML=H.truncate_with_ellipses(25)+" "+remove_link;this.onmouseout=null;this.onmouseover=null;this.onclick=null;};a.make_me_for_adding=function(){this.unhighlight();this.style.cursor=(F.is_ie)?"hand":"pointer";_ge("add_to_"+T+"_"+P+"_td").style.color="#0063DC";_ge("add_to_"+T+"_"+P+"_td").innerHTML="<span>"+H.truncate_with_ellipses(31)+"</span>";this.onmouseout=this.unhighlight;this.onmouseover=this.highlight;this.onclick=this.add_action;};var w="";w+="<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\""+j+"\"><tr>";w+="<td valign=\"top\" style=\"padding:0; width:"+(V+7)+"px;\">";w+="<img src=\""+l+"\" width=\""+V+"\" height=\""+N+"\" style=\"border:0; display:block; margin: 2px 0 2px 2px;\"></td>";w+="<td id=\"add_to_"+T+"_"+P+"_td\">";w+="</td></tr></table>";a.innerHTML=w;return a;};remove_context_widget=function(j,V){if(j=="pool"){for(var G=0;G<in_groupsA.length;G++){if(in_groupsA[G].nsid==V){in_groupsA[G].status=0;break;}}}var P=_ge("contextDiv_"+j+V);if(P){P.style.display="none";if(nextprev_currentContextID==j+V){var w=_ge("nextprev_button_stream"+global_nsid);if(w&&!w.isOpen){w.handle_click();}}var H=_ge("other_contexts_p");var l=Y.U.Dom.getElementsByClassName("contextDiv","DIV");var y=0;for(var G=0;G<l.length;G++){if(l[G].style.display=="block"&&l[G].parentNode==H.parentNode){y++;break;}}if(!y){H.style.display="none";}}};add_context_widget=function(T,G,l,V){if(V==null){V=false;}if(T=="pool"){var j=false;for(var P=0;P<in_groupsA.length;P++){if(in_groupsA[P].nsid==G){in_groupsA[P].status=(V)?2:1;j=true;break;}}if(!j){in_groupsA.push(new in_groupsObj(G,(V)?2:1));}}if(V==true){return ;}var w=_ge("contextDiv_"+T+G);var H=_ge("other_contexts_p");H.style.display="block";if(w){w.style.display="block";if(nextprev_currentContextID==T+G){var y=_ge("nextprev_button_stream"+global_nsid);if(y&&y.isOpen){y.handle_mouseup();y.handle_mouseout();}}}else{H.add_context_widget=function(R,N,z){if(N==""){return ;}if(N.indexOf("id=\"contextLink_\"")>0){return ;}var a=document.createElement("div");a.id="contextDiv_"+T+G;a.style.display="block";a.innerHTML=N;var d=this.parentNode.getElementsByTagName("DIV");if(d.length>0){this.parentNode.insertBefore(a,d[0]);}else{this.parentNode.appendChild(a);}F.decorate(_ge("nextprev_button_"+T+G),F._nextprev_button).button_go_go_go(T,G,l);};F.fragment_getter.get("/photo_context_fragment.gne",{photo_id:l,context_type:T,context_id:G},H,"add_context_widget");}};increment_print_dropdown=function(l){var G=_ge(l);var H=G.selectedIndex;H++;if(H>=G.options.length){for(var V=0;V<10;V++){G.options.length++;G.options[G.options.length-1].value=G.options[G.options.length-1].text=G.options.length-1;}}G.selectedIndex=H;update_print_prices(l);};decrement_print_dropdown=function(V){var G=_ge(V);var H=G.selectedIndex;H--;if(H<0){return ;}G.selectedIndex=H;update_print_prices(V);};format_price=function(G){var H=G/100;if(H==0){H="0.00";}else{if(H<1){H=H.toString();}}dpA=H.toString().split(".");if(dpA.length==1){H=H.toString()+".00";}else{if(dpA[1].length==1){H=H.toString()+"0";}}H="$ "+H;return H;};update_print_prices=function(P){var G=_ge("print_form");var w=_ge("price_print_total_td");var V=0;for(var H=0;H<G.elements.length;H++){if(G.elements[H].type=="select-one"){if(G.elements[H].value*1>0){var l=page_print_prices[G.elements[H].name];V=V+(l*G.elements[H].value);}}}var y=format_price(V);if(V>0){y="<nobr><b>"+y+"</b></nobr>";if(G.last_total!=V){anim_do_blink_pink(w);}}else{w.style.color="rgb(0, 0, 0)";}w.innerHTML=y;G.last_total=V;};var place_notes_text_div=function(H){if(!F.is_ie){return ;}var G=_ge("photo_notes");if(G){G.place_notes_text_div();_set_single_shadow_height(_ge("notes_text_table"));}return ;};var adjust_textarea_height=function(G){return ;temp_div.innerHTML=G.value.replace("<","&lt;").replace("\n","<br>")+"g";G.style.height=(temp_div.offsetHeight)+"px";return ;if(G.scrollHeight>G.clientHeight){G.style.height=G.scrollHeight;}};function show_notes_initially(){if(window.should_I_ignore_stuff_because_of_button_action||window.should_I_ignore_stuff_because_of_editable_div_action){return ;}var G=_ge("photo_notes");if(G&&G.p_id){G.shown_initially=1;G.style.visibility="visible";if(!G.tried_to_show_before_shown_initially){G.go_away_in_a_bit();}}}function calculate_photo_props(G){var l=global_photos[G];if(!l){return ;}var H=Math.max(l.o_w,l.o_h);var V=Math.min(l.o_w,l.o_h);l.aspect=H/V;l.panorama=(l.aspect>=2)?1:0;l.dig_dims=(l.aspect<1.36)?1:0;l.square=(l.aspect>0.96&&l.aspect<1.04)?1:0;l.small=(H<=1024)?1:0;l.huge=(V>=3000&&H>=4500)?1:0;if(writeDebug){writeDebug("aspect "+l.aspect);}if(writeDebug){writeDebug("panorama "+l.panorama);}if(writeDebug){writeDebug("dig_dims "+l.dig_dims);}if(writeDebug){writeDebug("square "+l.square);}if(writeDebug){writeDebug("small "+l.small);}if(writeDebug){writeDebug("huge "+l.huge);}}function ok_accept(G,H){_ge("div_invite_confirm_"+G).style.display="none";_ge("div_invite_confirm_loading_"+G).style.display="block";var V={flickr_groups_invite_photo_accept_onLoad:function(N,a,y,T){if(N){add_context_widget("pool",H,page_photo_id,false);_ge("div_invite_confirm_"+G).style.display="none";_ge("div_invite_confirm_loading_"+G).style.display="none";_ge("div_invite_confirm_hooray_"+G).style.display="block";in_groupsA.push(new in_groupsObj(H,1));var w=_ge("add_to_group_"+H+"_div");if(w){w.make_me_for_removing();}}else{var P=a.documentElement.getElementsByTagName("err")[0];if(P){var j=P.getAttribute("msg");if(photo_notes&&photo_notes.stop_comming){photo_notes.stop_comming(1);}photo_notes.start_comming(F.output.get("api_err_generic")+" "+j.escape_for_display(),1,1);_ge("div_invite_confirm_"+G).style.display="block";_ge("div_invite_confirm_loading_"+G).style.display="none";}}}};var l=new Object();l.user_id=global_nsid;l.photo_id=page_photo_id;l.comment_id=G;l.group_id=H;F.API.callMethod("flickr.groups.invite.photo.accept",l,V,null,null,0);}function no_deny(G,H){_ge("div_invite_confirm_"+G).style.display="none";var V={flickr_groups_invite_photo_decline_onLoad:function(a,T,P,j){if(a){}else{var w=T.documentElement.getElementsByTagName("err")[0];if(w){var y=w.getAttribute("msg");if(photo_notes&&photo_notes.stop_comming){photo_notes.stop_comming(1);}photo_notes.start_comming(F.output.get("api_err_generic",P.escape_for_display()),1,1);}}}};var l=new Object();l.user_id=global_nsid;l.photo_id=page_photo_id;l.comment_id=G;l.group_id=H;F.API.callMethod("flickr.groups.invite.photo.decline",l,V,null,null,0);}function admin_group_obj(G,V,H){this.nsid=G;this.title=V;this.status=H;}function new_admin_group_obj(G,V,H){this.nsid=G;this.title=V;this.status=H;}F._admin_group_loader={admin_group_loader_go_go_go:function(){this.old_group_nsid=null;this.old_group_title=null;this.old_comment_block="";this.first_time=true;this.style.display="block";this.admin_groups=new Array();F.decorate(_ge("a_group_loader"),F.admin_group_invite_clicker);F.decorate(_ge("div_invite_list_loading"),F.admin_group_loading);F.decorate(_ge("div_invite_dropdown"),F.admin_group_dropdown_div).admin_group_dropdown_div_go_go_go();var G=false;if(_ge("hdn_group_invite")&&_ge("hdn_group_invite").value.length>0){_ge("div_invite_loader").admin_groups=JSON.parse(_ge("hdn_group_details").value);var V=_ge("div_invite_loader").admin_groups;_ge("slct_invite_to_group").options[0]=new Option(F.output.get("photo_select_a_group"),"");_ge("slct_invite_to_group").options[1]=new Option("--------------","");for(var H=0;H<V.length;H++){if(V[H].status=="1"){_ge("slct_invite_to_group").options[H+2]=new Option(V[H].title,V[H].nsid);}else{_ge("slct_invite_to_group").options[H+2]=new Option(V[H].title+" ("+F.output.get("photo_already_invited")+")","");_ge("slct_invite_to_group").options[H+2].style.color="silver";}_ge("slct_invite_to_group").options[H+2].id=V[H].status;if(V[H].nsid==_ge("hdn_group_invite").value){_ge("slct_invite_to_group").options[H+2].selected=true;_ge("div_invite_loader").old_group_nsid=V[H].nsid;_ge("div_invite_loader").old_group_title=V[H].title;G=true;}}}if(G){_ge("div_pre_invite").style.display="none";_ge("div_invite_list_loading").style.display="none";_ge("div_invite_dropdown").style.display="block";_ge("chk_invite_to_group").checked=true;}},load_groups:function(){_ge("div_invite_list_loading").load_admin_groups();},set_invite:function(V){var G=F.output.get("page_photo_hi_im_admin",_site_root,this.old_group_nsid,this.old_group_title);if(V>=0&&this.admin_groups[V].status=="1"){var H=F.output.get("page_photo_hi_im_admin",_site_root,this.admin_groups[V].nsid,this.admin_groups[V].title);this.old_group_nsid=this.admin_groups[V].nsid;this.old_group_title=this.admin_groups[V].title;}if(_ge("message").value.indexOf(G)>=0&&V<0){_ge("message").value=_ge("message").value.replace(G,"");}else{if(_ge("message").value.indexOf(G)>=0){_ge("message").value=_ge("message").value.replace(G,H);this.old_comment_block=_ge("message").value;}else{if(_ge("message").value==this.old_comment_block||_ge("message").value==""){_ge("message").value=H;this.old_comment_block=_ge("message").value;}else{if(this.first_time){_ge("message").value=H+String.fromCharCode(13)+String.fromCharCode(13)+_ge("message").value;this.old_comment_block=_ge("message").value;}}}}_ge("message").value=_ge("message").value.replace("undefined","");this.first_time=false;if(V>=0&&this.admin_groups[V].status=="1"){_ge("hdn_group_invite").value=this.admin_groups[V].nsid;_ge("hdn_group_old_nsid").value=this.admin_groups[V].nsid;_ge("hdn_group_old_title").value=this.admin_groups[V].title;}else{_ge("hdn_group_invite").value="";_ge("hdn_group_old_nsid").value="";_ge("hdn_group_old_title").value="";}}};F.admin_group_invite_clicker={onclick:function(){_ge("div_pre_invite").style.display="none";_ge("div_invite_loader").load_groups();return false;}};F.admin_group_loading={load_admin_groups:function(){var G={flickr_groups_getAdministeredGroups_onLoad:function(d,N,T,P){if(d){_ge("div_invite_list_loading").admin_groups=new Array();var V=N.getElementsByTagName("group");for(var y=0;y<V.length;y++){var j=V[y].getAttribute("nsid");var a=V[y].getAttribute("title");var w=V[y].getAttribute("able_to_invite_photo");var l=new new_admin_group_obj(j,a,w);_ge("div_invite_loader").admin_groups.push(l);}if(_ge("div_invite_loader").admin_groups.length>0){_ge("div_invite_dropdown").render_dropdown();_ge("hdn_group_details").value=JSON.stringify(_ge("div_invite_loader").admin_groups);return ;}}_ge("div_invite_list_loading").style.display="none";_ge("div_pre_invite").style.display="block";}};if(_ge("div_invite_loader").admin_groups.length==0){this.style.display="block";var H=new Object();H.user_id=global_nsid;H.photo_id=page_photo_id;F.API.callMethod("flickr.groups.getAdministeredGroups",H,G,null,null,0);}else{_ge("div_invite_dropdown").render_dropdown();}}};F.admin_group_dropdown_div={admin_group_dropdown_div_go_go_go:function(){F.decorate(_ge("chk_invite_to_group"),F.chk_invite_to_group);F.decorate(_ge("slct_invite_to_group"),F.slct_invite_to_group);if(_ge("slct_invite_to_group")&&_ge("hdn_group_details")){_ge("slct_invite_to_group").innerHTML=_ge("hdn_group_details").value;}},render_dropdown:function(){var H=_ge("div_invite_loader").admin_groups;if(H.length==0){_ge("div_pre_invite").style.display="block";_ge("div_invite_list_loading").style.display="none";this.style.display="none";return ;}_ge("div_pre_invite").style.display="none";_ge("div_invite_list_loading").style.display="none";_ge("slct_invite_to_group").options.length=0;_ge("slct_invite_to_group").options[0]=new Option(F.output.get("photo_select_a_group"),"");_ge("slct_invite_to_group").options[1]=new Option("--------------","");for(var G=0;G<H.length;G++){if(H[G].status=="1"){_ge("slct_invite_to_group").options[G+2]=new Option(H[G].title,H[G].nsid);}else{_ge("slct_invite_to_group").options[G+2]=new Option(H[G].title+" ("+F.output.get("photo_already_invited")+")","");_ge("slct_invite_to_group").options[G+2].style.color="silver";}_ge("slct_invite_to_group").options[G+2].id=H[G].status;}_ge("chk_invite_to_group").checked=true;this.style.display="block";}};F.chk_invite_to_group={onchange:function(){if(!this.checked){_ge("div_pre_invite").style.display="block";_ge("div_invite_list_loading").style.display="none";_ge("div_invite_dropdown").style.display="none";_ge("hdn_group_invite").value="";_ge("slct_invite_to_group").options.selectedIndex=0;var G=F.output.get("page_photo_hi_im_admin",_site_root,_ge("div_invite_loader").old_group_nsid,_ge("div_invite_loader").old_group_title);if(_ge("message").value.indexOf(G)>=0){_ge("message").value=_ge("message").value.replace(G,"");}}},onclick:function(){this.onchange();}};F.slct_invite_to_group={onchange:function(){this.check_value();},onkeyup:function(){this.check_value();},check_value:function(){_ge("div_invite_loader").set_invite(this.selectedIndex-2);}};function script_has_loaded(){}F.picnik={loadSwfObjJs:function(){if(!this.swfJsWritten){this.loadJs(page_p.swfObjSrc);this.swfJsWritten=true;}return (window.SWFObject)?true:false;},loadUrlkitJs:function(){if(!this.urlkiJsWritten){this.loadJs(picnik_urlkit_path);this.urlJsWritten=true;}},loadJs:function(H){var G=document.createElement("script");G.src=H;G.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(G);writeDebug("picnik js source: "+G.src);},initSwf:function(){if(!this.p_div){this.header_height=35;this.p_div=document.createElement("div");this.p_div.id="picnik-div";var P=document.createElement("div");P.id="picnik-div-header";P.style.height=this.header_height+"px";var V=document.createElement("div");V.id="picnik-div-header-inner";P.appendChild(V);var w=_ge("FlickrLogo").cloneNode(true);w.id="FlickrLogo2";V.appendChild(w);var H=document.createElement("span");var l=document.createTextNode(F.output.get("picnik_mode"));H.appendChild(l);V.appendChild(H);this.p_swf_cont=document.createElement("div");this.p_swf_cont.id="picnik-cont";this.p_swf_cont.style.height=(Y.U.Dom.getViewportHeight()-this.header_height)+"px";this.p_div.appendChild(P);this.p_div.appendChild(this.p_swf_cont);this.p_div.style.height=Math.max(document.body.offsetHeight,document.body.scrollHeight)+"px";this.p_div.style.width="100%";this.p_div.style.position="absolute";this.p_div.style.top="0px";this.p_div.style.left="0px";document.getElementsByTagName("body")[0].appendChild(this.p_div);var G=deconcept.SWFObjectUtil.getPlayerVersion();if(G.major<9){Y.U.Dom.addClass(this.p_swf_cont,"picnik_no_flash");this.p_swf_cont.innerHTML=F.output.get("picnik_no_flash");}else{this.writeSwf();}}else{this.writeSwf();this.p_div.style.top="0px";this.p_div.style.left="0px";}Y.U.Event.addListener(window,"resize",this.resize,this);},writeSwf:function(){var G=new SWFObject(picnik_swf_path,"picnik","100%","100%","9.0.28","#ffffff",true);G.addParam("allowFullScreen","true");G.addParam("allowScriptAccess","always");G.addVariable("serverurl","http://www.picnik.com");G.addVariable("loglevel","30");G.addVariable("lite","true");G.addVariable("host","Flickr lite");G.addVariable("authservice","Flickr");G.addVariable("userid",global_nsid);G.addVariable("token",picnik_token);G.addVariable("_ss_itemid",page_photo_id);G.addVariable("_ss_setid",picnik_set_id);if(G.write(this.p_swf_cont)){var H=new SWFMacMouseWheel(G);}F.changes_count=true;},go_go_go:function(){if(picnik_token){this.show();}else{F.fragment_getter.get("/photo_picnik_auth_fragment.gne",{},this,"fragment_onLoad");}},fragment_onLoad:function(w,H,l){this.lightBoxBg=_ge("contactChangerBackground");this.lightBox=document.createElement("div");this.lightBox.style.position="absolute";var G=500;var V=290;this.lightBox.style.width=G+"px";this.lightBox.style.height=V+"px";this.lightBox.style.top=((Y.U.Dom.getViewportHeight()/2)-(V/2))-30;this.lightBox.style.left=(Y.U.Dom.getViewportWidth()/2)-(G/2);this.lightBox.style.zIndex=20001;this.lightBoxBg.style.display="block";document.getElementsByTagName("body")[0].appendChild(this.lightBox);this.lightBox.innerHTML=H;},resize:function(H,G){G.p_div.style.height=(Y.U.Dom.getViewportHeight()-G.header_height)+"px";},show:function(){if(this.loadSwfObjJs()){this.initSwf();this.loadUrlkitJs();}else{setTimeout(function(){F.picnik.show();},300);}},doAuth:function(){window.page_always_post_fragment_requests=true;F.fragment_getter.get("/services/auth/picnik.gne",{"magic_cookie":global_auth_hash},this,"digestAuthResponse");},digestAuthResponse:function(success,responseText,params){var rsp=eval("("+responseText+")");this.lightBox.style.display="none";this.lightBoxBg.style.display="none";if(rsp.picnik_auth.stat){picnik_token=rsp.picnik_auth.token;this.go_go_go();}else{F.photo_confirm_msg.add(1,F.output.get("picnik_auth_fail"));}},cancelAuth:function(){this.lightBoxBg.style.display="none";this.lightBox.style.display="none";F.photo_confirm_msg.add(1,F.output.get("picnik_cancel_auth"));},its_raining:function(G){writeDebug("its_raining response: "+G);F.changes_count=false;if(G){if(G==page_photo_id){window.location.replace(page_p.url+"?editreplace=1");}else{window.location.href=page_p.ownersUrl+G+"/?eOrig="+page_photo_id;}}else{this.p_div.style.top="-9999px";this.p_div.style.left="-9999px";F.photo_confirm_msg.add(1,F.output.get("picnik_cancel_edit"));}}};F.photo_confirm_msg={add:function(G,l){this.remove();var H=document.createElement("p");H.id="photo_confirm_msg_p";H.className=(G)?"Confirm":"Problem";if(l){H.innerHTML=l;}var V=_ge("Photo");V.parentNode.insertBefore(H,V);},remove:function(){var G=_ge("photo_confirm_msg_p");if(G){G.parentNode.removeChild(G);}}};F._photo_notes={notes_go_go_go:function(V,o,M){var X=this;this.hex_colors={yellow:"#ffffd3",green:"#d0fdaf"};this.isOver=this.editing=this.dragging=0;this.hide_while_dragging=0;this.which_note=null;this.p_id=V;this.rotate_version=M;this.thumb_url=o+"?cb="+new Date().getTime();var c=_ge("photoImgDiv"+V);c.onmouseover=function(){X.onmouseover();};c.onmouseout=function(q){var O=_get_event_src(q);if(window.should_I_ignore_stuff_because_of_button_action||window.should_I_ignore_stuff_because_of_editable_div_action||global_comm_div.comming){return ;}_ge("photo_notes").hide_tim=setTimeout("_ge('photo_notes').take_her_away('photo_div.onmouseout timer');",200);};var x=_ge("notes_text_div");x.style.zIndex="1000";x.style.display="none";x.style.width="220px";x.style.position="relative";var z="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"padding:0px;\" id=\"notes_text_table\">"+"<tr><td><img width=\"3\" height=\"3\" src=\""+_images_root+"/tc_yellow_tl.gif\"></td><td class=\"td_note_yeller\"></td><td><img width=\"3\" height=\"3\" src=\""+_images_root+"/tc_yellow_tr.gif\"></td></tr>"+"<tr><td class=\"td_note_yeller\"></td>"+"<td class=\"td_note_yeller\" style=\"padding:3px\">"+"<span id=\"notes_text_span\" style=\"font-family:arial; font-size:12px;\"></span>"+"<form id=\"notes_text_form\"><input type=\"hidden\" name=\"magic_cookie\" value=\""+global_auth_hash+"\" />"+"<textarea onkeydown=\"_limit_textarea(this, 300); _ge('photo_notes').check_note_for_prop()\" onkeyup=\"place_notes_text_div(); adjust_textarea_height(this); _limit_textarea(this, 300); _ge('photo_notes').check_note_for_prop()\" id=\"notes_text_area\" rows="+1+"; style=\"overflow:visible; width: 200px; font-family:arial; font-size:12px; padding:0px; border:0px inset #e9e9ae; background-color:#ffffd3;\" wrap=\"virtual\"></textarea>"+"</form>"+"</td><td class=\"td_note_yeller\"></td></tr>"+"<tr><td><img width=\"3\" height=\"3\" src=\""+_images_root+"/tc_yellow_bl.gif\"></td><td class=\"td_note_yeller\"></td><td><img width=\"3\" height=\"3\" src=\""+_images_root+"/tc_yellow_br.gif\"></td></tr></table>"+"<form id=\"notes_text_buttons_form\">"+"<input type=\"button\" class=\"Butt\" value=\""+F.output.get("save")+"\" onclick=\"_ge('photo_notes').save_editing(); this.blur();\" style=\"margin:5px 5px 0 0;\">"+"<input type=\"button\" class=\"CancelButt\" value=\""+F.output.get("cancel")+"\" onclick=\"_ge('photo_notes').cancel_editing(); this.blur();\" style=\"margin:5px 5px 0 0;\">"+"<input type=\"button\" class=\"CancelButt\" value=\""+F.output.get("deletee")+"\" id=\"delete_note_button\" onclick=\"_ge('photo_notes').delete_note(); this.blur();\" style=\"margin:5px 5px 0 0;\">"+"</form><div id=\"temp_div\" style=\"visibility:hidden;\"></div>";x.innerHTML=z;var S=_ge("notes_text_table");S.onmouseover=function(){if(X.editing){return ;}if(X.which_note){clearTimeout(X.which_note.hide_timmy);}};S.onmouseout=function(O){if(X.editing){return ;}if(X.which_note){X.which_note.handle_mouseout();}};S.onmouseup=function(q){if(X.editing){return ;}var O=_get_event_src(q);if(O&&_el_is_in_a_link(O)){return ;}if(X.which_note&&X.which_note.can_edit){X.which_note.editing=1;X.which_note.change_display();X.start_editing_one(X.which_note);}};var W=_ge("notes_text_area");if(!F.is_ie||navigator.userAgent.indexOf("Opera")!=-1){W.style.height="58px";}window.temp_div=_ge("temp_div");temp_div.style.width=W.style.width;var R=_ge("rotate_div");R.style.zIndex="1003";R.style.display="none";var z="<table id=\"rotate_table\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:218px; padding:0px;\">"+"<tr><td width=\"3\"><img width=\"3\" height=\"3\" src=\""+_images_root+"/tc_white_tl.gif\"></td><td class=\"td_note_white\"></td><td width=\"3\"><img width=\"3\" height=\"3\" src=\""+_images_root+"/tc_white_tr.gif\"></td></tr>"+"<tr><td class=\"td_note_white\"></td>"+"<td class=\"td_note_white\" style=\"padding:0px; height:155px\"><span id=\"rotate_span\" style=\"font-family:arial; font-size:12px;\"></span>"+"</td><td class=\"td_note_white\"></td></tr>"+"<tr><td><img width=\"3\" height=\"3\" src=\""+_images_root+"/tc_white_bl.gif\"></td><td class=\"td_note_white\"></td><td><img width=\"3\" height=\"3\" src=\""+_images_root+"/tc_white_br.gif\"></td></tr></table>";R.innerHTML=z;_make_comm_div("1002");global_comm_div.button_cancel.onclick_plus=global_comm_div.button_ok.onclick_plus=function(){_ge("photo_notes").stop_comming();};window.hide_rotate_div=function(){X.hide_rotate_div();};window.save_rotation=function(O){X.save_rotation(O);};this.restack_notes();},onmouseover:function(){clearTimeout(this.hide_tim);if(!this.shown_initially){this.tried_to_show_before_shown_initially=1;return ;}if(window.should_I_ignore_stuff_because_of_button_action||window.should_I_ignore_stuff_because_of_editable_div_action||global_comm_div.comming){return ;}this.isOver=1;this.change_display();},go_away_in_a_bit:function(){this.hide_tim=setTimeout("_ge('photo_notes').take_her_away('go_away_in_a_bit');",3000);},restack_notes:function(){var M=function(z){return z.box.w*z.box.h;};var o=function(W,X){var z=M(W);var V=M(X);return (z<V)?1:((z>V)?-1:0);};var x=global_photos[this.p_id].notesA;x.sort(o);for(var c=0;c<x.length;c++){var S=_ge("photo_note_"+x[c].id);if(S){this.appendChild(F.prepare_for_insertion(S));}}},take_her_away:function(x){clearTimeout(this.hide_tim);if(this.editing||global_comm_div.comming||this.dragging){return ;}this.isOver=0;this.stop_showing_one("take_her_away "+x);this.change_display();},show_rotate_div:function(M){var S=_ge("rotate_div");if(S.style.display!="none"){return ;}S.style.display="block";S.style.visibility="hidden";global_single_shadow_div.style.visibility="hidden";this.button_acting=M;var o=_pi((this.get_image_w()-_pi(_ge("rotate_table").offsetWidth))/2);var X=_pi((this.get_image_h()-150)/2);if(X<10){X=10;}if(o<10){o=10;}S.style.marginLeft=o+"px";S.style.marginTop=X+"px";var c="/apps/rotate/rotate.swf?cancel_str="+escape_utf8(F.output.get("cancel_up"))+"&ok_str="+escape_utf8(""+F.output.get("ok")+"  ")+"&thumb_url="+this.thumb_url+"&v="+this.rotate_version+"&cb="+new Date().getTime();this.take_her_away("show_rotate_div");window.should_I_ignore_stuff_because_of_button_action=1;if(!this.rotate_swf_html){var z="<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" ";z+="WIDTH=\"212\" HEIGHT=\"145\" id=\"photo\" ALIGN=\"\">";z+="<PARAM NAME=movie VALUE=\""+c+"\"><PARAM NAME=quality VALUE=high>";z+="<PARAM NAME=bgcolor VALUE=#ffffff>";z+="<EMBED src=\""+c+"\" quality=high bgcolor=#ffffff  WIDTH=\"212\" HEIGHT=\"145\" NAME=\"photo\"";z+=" ALIGN=\"\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></EMBED></OBJECT>";this.rotate_swf_html=z;}if(navigator.userAgent.indexOf("KHTML")!=-1){this.insert_rotate_swf_and_show_tim=setTimeout("_ge('photo_notes').insert_rotate_swf_and_show()",50);}else{if(_ge("rotate_span").innerHTML==""){this.insert_rotate_swf_and_show();}else{S.style.visibility="visible";global_single_shadow_div.style.visibility="visible";}}global_single_shadow_div.style.display="block";_set_single_shadow_x(o);_set_single_shadow_y(X);_set_single_shadow_height(_ge("rotate_table"));_set_single_shadow_width(_ge("rotate_table"));},insert_rotate_swf_and_show:function(){_ge("rotate_span").innerHTML=this.rotate_swf_html;_ge("rotate_div").style.visibility="visible";_set_single_shadow_height(_ge("rotate_table"));global_single_shadow_div.style.visibility="visible";},hide_rotate_div:function(){_ge("rotate_div").style.display="none";global_single_shadow_div.style.display="none";window.should_I_ignore_stuff_because_of_button_action=0;if(this.button_acting){this.button_acting.enable_others();}},save_rotation:function(x){this.hide_rotate_div();if(x=="-90"){x=270;}if(x=="-180"){x=180;}this.start_comming(F.output.get("photo_notes_rotate"));var o={photo_id:this.p_id,degrees:x};F.API.callMethod("flickr.photos.transform.rotate",o,this);},flickr_photos_transform_rotate_onLoad:function(c,o,x){if(c){document.location=page_current_url+"?rotated=1&cb="+new Date().getTime();}else{alert(F.output.get("api_err_generic")+" "+x);this.stop_comming();}},make_note_this_color:function(x){var S=(this.last_note_color)?this.last_note_color:"yellow";if(S==x){return ;}_ge("notes_text_area").style.backgroundColor=this.hex_colors[x];var c=this.getElementsByTagName("TD");for(var o=0;o<c.length;o++){if(c[o].className=="td_note_yeller"){c[o].style.backgroundColor=this.hex_colors[x];}}var M=this.getElementsByTagName("IMG");for(var o=0;o<M.length;o++){if(M[o].src){M[o].src=M[o].src.replace(S,x);}}this.last_note_color=x;},start_showing_one:function(c){clearTimeout(this.hide_tim);if(this.which_note){clearTimeout(this.which_note.hide_timmy);}if(this.which_note!=c){this.stop_showing_one();}this.make_note_this_color(c.use_color);var o=c.render_text_for_display();if(!c.from_owner){o+="  - <a href=\"/photos/"+c.author+"\"><i>"+c.author_name+"</i></a>";}_ge("notes_text_span").innerHTML=o;this.which_note=c;var x=_ge("notes_text_area");if(this.editing){_ge("notes_text_span").style.display="none";_ge("notes_text_form").style.display="block";_ge("notes_text_buttons_form").style.display="block";if(this.which_note.id=="photo_note_temp"){_ge("delete_note_button").style.display="none";}else{_ge("delete_note_button").style.display="inline";}if(c!=this.which_note||x.value==""){x.value=c.saved_txt;adjust_textarea_height(x);}}else{_ge("notes_text_span").style.display="inline";_ge("notes_text_form").style.display="none";_ge("notes_text_buttons_form").style.display="none";}_ge("notes_text_div").style.display="block";global_single_shadow_div.style.display="block";_set_single_shadow_height(_ge("notes_text_table"));_set_single_shadow_width(_ge("notes_text_table"));this.place_notes_text_div();if(this.editing){x.focus();x.select();}},check_note_for_prop:function(){if(_ge("photo_props")){var x=_ge("notes_text_area");if(x.value=="ho ho ho beard"||x.value=="ho ho ho hat"){if(_ge("photo_prop_"+this.which_note.note_id)&&_ge("photo_prop_"+this.which_note.note_id).style.display=="none"){if(x.value=="ho ho ho beard"){_ge("photo_prop_img_"+this.which_note.note_id).src=_images_root+"/prop_santa_beard.png";_ge("photo_prop_"+this.which_note.note_id).style.display="block";}if(x.value=="ho ho ho hat"){_ge("photo_prop_img_"+this.which_note.note_id).src=_images_root+"/prop_santa_hat.png";_ge("photo_prop_"+this.which_note.note_id).style.display="block";}}}else{if(_ge("photo_prop_"+this.which_note.note_id)&&_ge("photo_prop_"+this.which_note.note_id).style.display=="block"){_ge("photo_prop_img_"+this.which_note.note_id).src=_images_root+"/spaceball.gif";_ge("photo_prop_"+this.which_note.note_id).style.display="none";}}}},place_notes_text_div:function(z,M){var o=_ge("notes_text_div");if(z&&M){var x=z;var X=M+this.which_note.get_note_h()+5;}else{if(this.editing){var c=0;var S=200;}else{var c=100;var S=200;}var x=_pi(this.which_note.style.left);var X=_pi(this.which_note.style.top)+this.which_note.get_note_h()+5;if(X+o.offsetHeight>this.get_image_h()+c){X=_pi(this.which_note.style.top)-o.offsetHeight-10;if(F.is_ie&&navigator.userAgent.indexOf("Opera")==-1){X+=15;}}if(X<-S){X=_pi(this.which_note.style.top)+this.which_note.get_note_h()+5;}}o.style.left=x+"px";o.style.top=X+"px";_set_single_shadow_x(x);_set_single_shadow_y(X);},stop_showing_one:function(x){_ge("notes_text_div").style.display="none";global_single_shadow_div.style.display="none";if(this.which_note){this.which_note.isOver=0;this.which_note.change_display();}},start_dragging_one:function(){this.dragging=1;window.should_I_ignore_stuff_because_note_editing=1;},start_editing_one:function(x){this.editing=1;this.dragging=0;window.should_I_ignore_stuff_because_note_editing=1;this.start_showing_one(x);},hide_notes_text_div:function(){_ge("notes_text_div").style.display="none";global_single_shadow_div.style.display="none";},refresh_notes:function(){if(_ok_for_scrumjax_xml()){var x={photo_id:this.p_id};F.API.callMethod("flickr.photos.getInfo",x,this);}else{document.location=page_current_url+"?changednotes=1&cb="+new Date().getTime();}},flickr_photos_getInfo_onLoad:function(S,x,W,h){if(S){var O=global_photos[this.p_id].notesA=[];var e={};var u=x.documentElement.getElementsByTagName("owner")[0].getAttribute("nsid");var V=x.documentElement.getElementsByTagName("note");for(var R=0;R<V.length;R++){var M=V[R].firstChild.nodeValue;var G=V[R].getAttribute("x")*1;var P=V[R].getAttribute("y")*1;var g=V[R].getAttribute("w")*1;var c=V[R].getAttribute("h")*1;var y=V[R].getAttribute("id");var s=V[R].getAttribute("author");var a=V[R].getAttribute("authorname");e[y]=y;O.push({id:y,box:{x:G,y:P,w:g,h:c}});var q=_ge("photo_note_"+y);if(q){q.refresh_info(y,G,P,g,c,M);if(_ge("photo_props")){if(!_ge("photo_prop_"+y)){var r=document.createElement("DIV");r.className="photo_prop";r.id="photo_prop_"+y;r.style.left=(G+3)+"px";r.style.top=(P+3)+"px";r.style.width=(g-4)+"px";r.style.height=(c-4)+"px";if(M=="ho ho ho beard"||M=="ho ho ho hat"){r.style.display="block";}else{r.style.display="none";}var X=document.createElement("IMG");X.className="trans_png";X.id="photo_prop_img"+y;X.style.width=(g-4)+"px";X.style.height=(c-4)+"px";if(M=="ho ho ho beard"){X.src=_images_root+"/prop_santa_beard.png";}else{if(M=="ho ho ho hat"){X.src=_images_root+"/prop_santa_hat.png";}else{X.src=_images_root+"/spaceball.gif";}}r.appendChild(F.prepare_for_insertion(X));_ge("photo_props").appendChild(F.prepare_for_insertion(r));}}}else{var z=(global_nsid==s||global_photos[this.p_id].isOwner)?1:0;var o=(u==s);this.create_note(y,G,P,g,c,M,z,o,a,s);}}for(var w=this.childNodes.length-1;w>=0;w--){if(this.childNodes[w].className=="photo_note"){if(!e[this.childNodes[w].note_id]){F.remove_el(this.childNodes[w],this);}}}this.restack_notes();}else{alert(F.output.get("api_err_generic")+" "+W);}if(global_comm_div.comming){this.stop_comming();}if(_ge("photo_prop_temp")){F.remove_el(_ge("photo_prop_temp"),_ge("photo_props"));}},start_pulsing:function(){var o=_ge("button_pulser");if(!o){var x=document.createElement("IMG");x.width=32;x.height=15;x.src=_images_root+"/pulser2.gif";x.style.border="0";x.border="0";o=document.createElement("DIV");o.id="button_pulser";o.style.position="absolute";o.style.backgroundColor="white";if(global_intl_lang=="en-us"){o.style.padding="4px 12px";}else{o.style.padding="4px 0px";}o.appendChild(x);document.body.appendChild(o);}var c=_ge("button_bar");o.style.left=Y.U.Dom.getX(c)+"px";o.style.top=Y.U.Dom.getY(c)+"px";o.style.display="block";},stop_pulsing:function(){if(_ge("button_pulser")){_ge("button_pulser").style.display="none";}},start_comming:function(c,z,O,M,o,R,X,W,S){if(S){F.eb_broadcast("stewart_pause_if_need_to_hide_video");}else{F.eb_broadcast("stewart_pause");}window.should_I_ignore_stuff_because_note_editing=1;this.style.visibility="hidden";var V=function(){var q=_pi((_ge("photo_notes").get_w()-_pi(global_comm_div.table.offsetWidth))/2);if(q<10){q=10;}return q;};var x=function(){var q=_pi((_ge("photo_notes").get_h()-global_comm_div.table.offsetHeight)/2);if(q<10){q=10;}return q;};global_comm_div.start_comming(c,V,x,z,O,M,o,R,X,W);},stop_comming:function(x){window.should_I_ignore_stuff_because_note_editing=0;global_comm_div.stop_comming();if(!x){this.style.visibility="visible";}F.eb_broadcast("stewart_play_if_was_playing");},start_adding_note:function(){if(this.editing){alert(F.output.get("photo_notes_one_note"));return ;}this.empty_notes_text_area();this.onmouseover();var x=this.create_note("temp",20,20,50,50,F.output.get("photo_notes_add_notes_here"),1,global_photos[this.p_id].isOwner,"","");x.start_editing();this.start_editing_one(x);},create_note:function(w,R,W,O,c,o,x,u,S,z){var V=document.createElement("DIV");V.className="photo_note";V.id="photo_note_"+w;V.style.left=(R)+"px";V.style.top=(W)+"px";var X="<div class=\"photo_note_box_div\"><div class=\"photo_note_box_inner_div\">";X+="<div class=\"photo_note_box_inner_inner_div\"><div style=\"width:"+(O-4)+"px; height:"+(c-4)+"px;\">";X+="</div></div></div></div><div class=\"photo_note_text_div\"></div>";V.innerHTML=X;this.appendChild(V);F.decorate(V,F._photo_note).note_go_go_go(w,x,u,S,z,o);if(_ge("photo_props")){if(_ge("photo_prop_temp")){F.remove_el(_ge("photo_prop_temp"),_ge("photo_props"));}var M=document.createElement("DIV");M.className="photo_prop";M.id="photo_prop_"+w;M.style.left=(R+3)+"px";M.style.top=(W+3)+"px";M.style.width=(O-4)+"px";M.style.height=(c-4)+"px";if(o=="ho ho ho beard"||o=="ho ho ho hat"){M.style.display="block";}else{M.style.display="none";}var q=document.createElement("IMG");q.className="trans_png";q.id="photo_prop_img_"+w;q.style.width=(O-4)+"px";q.style.height=(c-4)+"px";q.src=_images_root+"/spaceball.gif";if(o=="ho ho ho beard"){q.src=_images_root+"/prop_santa_beard.png";}else{if(o=="ho ho ho hat"){q.src=_images_root+"/prop_santa_hat.png";}else{q.src=_images_root+"/spaceball.gif";}}M.appendChild(F.prepare_for_insertion(q));_ge("photo_props").appendChild(F.prepare_for_insertion(M));}return V;},delete_note:function(){deja_view_uh_huh();this.which_note.stop_editing(0);this.editing=0;this.stop_showing_one();this.empty_notes_text_area();this.start_comming(F.output.get("photo_notes_deleting"));if(_ge("photo_prop_"+this.which_note.note_id)&&_ge("photo_props")){F.remove_el(_ge("photo_prop_"+this.which_note.note_id),_ge("photo_props"));}var x={note_id:this.which_note.note_id};F.API.callMethod("flickr.photos.notes.delete",x,this);},flickr_photos_notes_delete_onLoad:function(c,o,x){if(!c&&(!x||x.indexOf("not found")==-1)){alert(F.output.get("api_err_generic")+" "+x);this.stop_comming();}this.refresh_notes();},cancel_editing:function(){this.which_note.stop_editing(1);this.editing=0;window.should_I_ignore_stuff_because_note_editing=0;this.stop_showing_one();this.empty_notes_text_area();if(this.which_note.id=="photo_note_temp"){F.remove_el(this.which_note,this);if(_ge("photo_prop_temp")&&_ge("photo_props")){F.remove_el(_ge("photo_prop_temp"),_ge("photo_props"));}}},empty_notes_text_area:function(){_ge("notes_text_area").value="";},save_editing:function(){var x=_ge("notes_text_area");if(x.value==""){x.focus();x.select();return ;}deja_view_uh_huh();this.which_note.stop_editing(0);this.editing=0;this.stop_showing_one();if(this.which_note.id=="photo_note_temp"){this.start_comming(F.output.get("photo_notes_saving_note"));var o={photo_id:this.p_id,note_x:this.which_note.get_note_x(),note_y:this.which_note.get_note_y(),note_w:(this.which_note.get_note_w()),note_h:(this.which_note.get_note_h()),note_text:x.value};F.API.callMethod("flickr.photos.notes.add",o,this);F.remove_el(this.which_note,this);}else{this.start_comming(F.output.get("saving"));var o={note_id:this.which_note.note_id,note_x:this.which_note.get_note_x(),note_y:this.which_note.get_note_y(),note_w:(this.which_note.get_note_w()),note_h:(this.which_note.get_note_h()),note_text:x.value};F.API.callMethod("flickr.photos.notes.edit",o,this);}this.empty_notes_text_area();},flickr_photos_notes_add_onLoad:function(c,o,x){if(c){this.refresh_notes();}else{alert(F.output.get("api_err_generic")+" "+x);this.stop_comming();if(_ge("photo_prop_temp")){F.remove_el(_ge("photo_prop_temp"),_ge("photo_props"));}}},flickr_photos_notes_edit_onLoad:function(c,o,x){if(c){this.refresh_notes();}else{alert(F.output.get("api_err_generic")+" "+x);this.stop_comming();}},flickr_test_echo_onLoad:function(c,o,x){if(!c){alert(F.output.get("api_err_generic")+" "+x);this.stop_comming();}},get_w:function(){return _ge("photoImgDiv"+this.p_id).offsetWidth;},get_h:function(){return _ge("photoImgDiv"+this.p_id).offsetHeight;},get_image_w:function(){var o=_ge("photoImgDiv"+this.p_id);var x=o.getElementsByTagName("img");if(x[0]&&x[0].width){return x[0].width;}else{return 0;}},get_image_h:function(){var o=_ge("photoImgDiv"+this.p_id);var x=o.getElementsByTagName("img");if(x[0]&&x[0].height){return x[0].height;}else{return 0;}},change_display:function(){if(this.isOver){this.style.visibility="visible";if(_ge("photo_props")){_ge("photo_props").style.display="";}}else{this.style.visibility="hidden";}}};F._photo_note={note_go_go_go:function(S,x,c,X,M,z){var o=this;this.note_id=S;this.can_edit=x;this.author_name=X;this.author=M;this.from_owner=c;this.use_color=(this.from_owner)?"yellow":"green";this.isOver=0;this.editing=0;this.isDragging=0;this.resize_box_size=8;this.last_rendered_txt="";this.box_div=this.childNodes[0];this.innermost_div=this.box_div.childNodes[0].childNodes[0].childNodes[0];if(F.is_ie){this.innermost_div.style.backgroundColor="#fff";this.innermost_div.style.filter="alpha(opacity:0)";}this.text_div=this.childNodes[1];this.saved_txt=z;this.saved_x=_pi(this.style.left);this.saved_y=_pi(this.style.top);this.saved_w=_pi(this.innermost_div.style.width);this.saved_h=_pi(this.innermost_div.style.height);this.appendChild(this.make_resize_div("nw"));this.appendChild(this.make_resize_div("ne"));this.appendChild(this.make_resize_div("sw"));this.appendChild(this.make_resize_div("se"));Y.U.Event.addListener(this.box_div,"mouseover",this.handle_mouseover,this,true);Y.U.Event.addListener(this.box_div,"mouseout",this.handle_mouseout,this,true);if(this.can_edit){Y.U.Event.addListener(this.box_div,"mousedown",this.handle_mousedown,this,true);this.box_div.style.cursor=(F.is_ie)?"hand":"pointer";}},make_resize_div:function(S){var c="resize_"+S+"_div";var x=this;var o=document.createElement("DIV");o.style.position="absolute";o.style.display="none";o.style.cursor=S+"-resize";o.style.top=(S=="ne"||S=="nw")?"0px":(this.get_note_h()-this.resize_box_size)+"px";o.style.left=(S=="sw"||S=="nw")?"0px":(this.get_note_w()-this.resize_box_size)+"px";o.style.backgroundColor="#fff";o.innerHTML="<div style=\"border:1px solid black\"><div style=\"width:"+(this.resize_box_size-2)+"px; height:"+(this.resize_box_size-2)+"px; background-color:#fff; font-size:1px\"></div></div>";o.onmousedown=function(M){M||(M=window.event);x.start_dragging_resize(M,S);};o.note=this;this[c]=o;return this[c];},render_text_for_display:function(){var x=this.saved_txt;if(this.last_saved_txt!=this.saved_txt){x=_hyperlink(x);x=x.trim().nl2br();this.last_saved_txt=this.saved_txt;this.last_rendered_txt=x;}return this.last_rendered_txt;},start_dragging_resize:function(V,X){V||(V=window.event);var S="resize_"+X+"_div";var q=this[S];_ge("photo_notes").start_dragging_one();_disable_select();q.lastClientX=V.clientX;q.lastClientY=V.clientY;if(X=="se"){var O=_pi(q.style.left);var R=_pi(q.style.top);var z=V.clientX-O+this.resize_box_size;var c=z+_ge("photo_notes").get_image_w()-_pi(this.style.left)-(this.resize_box_size*2);var M=V.clientY-R+this.resize_box_size;var o=M+_ge("photo_notes").get_image_h()-_pi(this.style.top)-(this.resize_box_size*2);}else{if(X=="sw"){var O=_pi(this.style.left);var R=_pi(q.style.top);var z=V.clientX-O;var c=z+O+this.get_note_w()-(this.resize_box_size*2);var M=V.clientY-R+this.resize_box_size;var o=M+_ge("photo_notes").get_image_h()-_pi(this.style.top)-(this.resize_box_size*2);}else{if(X=="nw"){var O=_pi(this.style.left);var R=_pi(this.style.top);var z=V.clientX-O;var c=z+O+this.get_note_w()-(this.resize_box_size*2);var M=V.clientY-R;var o=M+R+this.get_note_h()-(this.resize_box_size*2);}else{if(X=="ne"){var O=_pi(q.style.left);var R=_pi(this.style.top);var z=V.clientX-O+this.resize_box_size;var c=z+_ge("photo_notes").get_image_w()-_pi(this.style.left)-(this.resize_box_size*2);var M=V.clientY-R;var o=M+R+this.get_note_h()-(this.resize_box_size*2);}}}}this.isDragging=1;this.change_display();var W=this;document.dragee=q;document.onmouseup=function(x){if(document.dragee){W.stop_dragging_resize();}document.dragee=null;};document.onmousemove=function(P){P||(P=window.event);if(_ge("photo_notes").hide_while_dragging){_ge("photo_notes").hide_notes_text_div();}var G=Math.min(Math.max(P.clientX,z),c);var h=Math.min(Math.max(P.clientY,M),o);if(X=="se"){var r=_pi(q.style.left);var g=_pi(q.style.top);var s=r+(G-q.lastClientX);var w=g+(h-q.lastClientY);q.style.left=s+"px";q.style.top=w+"px";W.innermost_div.style.width=(_pi(q.style.left)+W.resize_box_size-4)+"px";W.innermost_div.style.height=(_pi(q.style.top)+W.resize_box_size-4)+"px";W["resize_ne_div"].style.left=q.style.left;W["resize_sw_div"].style.top=q.style.top;}else{if(X=="sw"){var r=_pi(W.style.left);var g=_pi(q.style.top);var s=r+(G-q.lastClientX);var w=g+(h-q.lastClientY);W.style.left=s+"px";q.style.top=w+"px";W.innermost_div.style.width=(_pi(W.innermost_div.style.width)+r-s)+"px";W.innermost_div.style.height=(_pi(q.style.top)+W.resize_box_size-4)+"px";W["resize_ne_div"].style.left=W["resize_se_div"].style.left=(_pi(W.innermost_div.style.width)-W.resize_box_size+4)+"px";W["resize_se_div"].style.top=q.style.top;}else{if(X=="nw"){var r=_pi(W.style.left);var g=_pi(W.style.top);var s=r+(G-q.lastClientX);var w=g+(h-q.lastClientY);W.style.left=s+"px";W.style.top=w+"px";W.innermost_div.style.width=(_pi(W.innermost_div.style.width)+r-s)+"px";W.innermost_div.style.height=(_pi(W.innermost_div.style.height)+g-w)+"px";W["resize_sw_div"].style.left=q.style.left;W["resize_ne_div"].style.top=q.style.top;W["resize_se_div"].style.top=W["resize_sw_div"].style.top=(_pi(W.innermost_div.style.height)-W.resize_box_size+4)+"px";W["resize_se_div"].style.left=W["resize_ne_div"].style.left=(_pi(W.innermost_div.style.width)-W.resize_box_size+4)+"px";}else{if(X=="ne"){var r=_pi(q.style.left);var g=_pi(W.style.top);var s=r+(G-q.lastClientX);var w=g+(h-q.lastClientY);q.style.left=s+"px";W.style.top=w+"px";W.innermost_div.style.width=(_pi(q.style.left)+W.resize_box_size-4)+"px";W.innermost_div.style.height=(_pi(W.innermost_div.style.height)+g-w)+"px";W["resize_se_div"].style.left=q.style.left;W["resize_se_div"].style.top=W["resize_sw_div"].style.top=(_pi(W.innermost_div.style.height)-W.resize_box_size+4)+"px";}}}}q.lastClientX=G;q.lastClientY=h;var u=_ge("photo_prop_"+W.note_id);var a=_ge("photo_prop_img_"+W.note_id);if(u&&a){u.style.top=_pi(W.style.top)+2;u.style.left=_pi(W.style.left)+2;u.style.width=W.innermost_div.style.width;u.style.height=W.innermost_div.style.height;a.style.width=W.innermost_div.style.width;a.style.height=W.innermost_div.style.height;}if(!_ge("photo_notes").hide_while_dragging){_ge("photo_notes").place_notes_text_div();}Y.E.stopEvent(P);return false;};},stop_dragging_resize:function(){_enable_select();if(!this.isDragging){return ;}document.onmousemove=null;_ge("photo_notes").start_editing_one(this);this.isDragging=0;this.change_display();},show_resize_divs:function(){this.resize_nw_div.style.display=this.resize_ne_div.style.display=this.resize_sw_div.style.display=this.resize_se_div.style.display="block";},hide_resize_divs:function(){this.resize_nw_div.style.display=this.resize_ne_div.style.display=this.resize_sw_div.style.display=this.resize_se_div.style.display="none";},get_note_w:function(){return _pi(this.innermost_div.style.width)+4;},get_note_h:function(){return _pi(this.innermost_div.style.height)+4;},get_note_x:function(){return _pi(this.style.left);},get_note_y:function(){return _pi(this.style.top);},handle_mouseover:function(){if(_ge("photo_notes").editing||global_comm_div.comming||_ge("photo_notes").dragging){return ;}this.isOver=1;this.change_display();_ge("photo_notes").start_showing_one(this);},handle_mouseout:function(){if(this.id=="photo_note_temp"){return ;}clearTimeout(this.hide_timmy);this.hide_timmy=setTimeout("_ge('"+this.id+"').take_another_little_piece_of_my_heart('Photo_Note_EXT.onmouseout');",200);},take_another_little_piece_of_my_heart:function(){if(_ge("photo_notes").editing||global_comm_div.comming||_ge("photo_notes").dragging){return ;}this.isOver=0;this.change_display();_ge("photo_notes").stop_showing_one();},start_editing:function(){if(this.editing){return ;}this.isOver=1;this.editing=1;this.change_display();},stop_editing:function(x){this.editing=0;if(x){this.style.left=this.saved_x+"px";this.style.top=this.saved_y+"px";this.innermost_div.style.width=this.saved_w+"px";this.innermost_div.style.height=this.saved_h+"px";this.resize_nw_div.style.top=this.resize_ne_div.style.top="0px";this.resize_sw_div.style.top=this.resize_se_div.style.top=(this.get_note_h()-this.resize_box_size)+"px";this.resize_nw_div.style.left=this.resize_sw_div.style.left="0px";this.resize_ne_div.style.left=this.resize_se_div.style.left=(this.get_note_w()-this.resize_box_size)+"px";_ge("photo_notes").start_showing_one(this);var c=_ge("photo_prop_"+this.note_id);var o=_ge("photo_prop_img_"+this.note_id);if(c&&o){c.style.top=_pi(this.style.top)+2;c.style.left=_pi(this.style.left)+2;c.style.width=this.innermost_div.style.width;c.style.height=this.innermost_div.style.height;o.style.width=this.innermost_div.style.width;o.style.height=this.innermost_div.style.height;}}this.change_display();},handle_mousedown:function(x){x||(x=window.event);if(!_ge("photo_notes").editing&&!global_comm_div.comming&&!_ge("photo_notes").dragging){this.start_editing();}if(((!_ge("photo_notes").editing&&!_ge("photo_notes").dragging)||_ge("photo_notes").which_note==this&&!this.isDragging)&&!global_comm_div.comming){this.start_dragging(x);}},stop_dragging:function(){_enable_select();if(!this.isDragging){return ;}document.onmousemove=null;_ge("photo_notes").start_editing_one(this);this.isDragging=0;this.change_display();},start_dragging:function(X){X||(X=window.event);_ge("photo_notes").start_dragging_one();_disable_select();var c=_pi(this.style.left);var V=_pi(this.style.top);this.lastClientX=X.clientX;this.lastClientY=X.clientY;var o=X.clientX-c;var z=o+_ge("photo_notes").get_image_w()-this.get_note_w();var W=X.clientY-V;var M=W+_ge("photo_notes").get_image_h()-this.get_note_h();this.isDragging=1;this.change_display();var S=this;document.dragee=this;document.onmouseup=function(x){if(document.dragee){S.stop_dragging();}document.dragee=null;};var S=this;document.onmousemove=function(w){w||(w=window.event);if(_ge("photo_notes").hide_while_dragging){_ge("photo_notes").hide_notes_text_div();}var O=_pi(S.style.left);var h=_pi(S.style.top);var u=Math.min(Math.max(w.clientX,o),z);var q=Math.min(Math.max(w.clientY,W),M);var R=O+(u-S.lastClientX);var P=h+(q-S.lastClientY);S.style.left=R+"px";S.style.top=P+"px";S.lastClientX=u;S.lastClientY=q;if(!_ge("photo_notes").hide_while_dragging){_ge("photo_notes").place_notes_text_div();}var s=_ge("photo_prop_"+S.note_id);if(s){s.style.top=_pi(S.style.top)+2+"px";s.style.left=_pi(S.style.left)+2+"px";}};Y.E.stopEvent(X);return false;},refresh_info:function(o,S,c,z,x,M){this.note_id=o;this.id="photo_note_"+o;this.style.left=(S)+"px";this.style.top=(c)+"px";this.innermost_div.style.width=(z-4)+"px";this.innermost_div.style.height=(x-4)+"px";this.saved_txt=M;this.saved_x=_pi(this.style.left);this.saved_y=_pi(this.style.top);this.saved_w=_pi(this.innermost_div.style.width);this.saved_h=_pi(this.innermost_div.style.height);},change_display:function(){var o=this.box_div.childNodes[0];var x=o.childNodes[0];o.style.borderStyle="solid";x.style.borderStyle="solid";this.box_div.style.left=this.box_div.style.top="0px";this.box_div.style.borderWidth="0";this.hide_resize_divs();if(this.editing){this.show_resize_divs();x.style.borderStyle="dashed";o.style.borderStyle="dashed";}else{if(this.isOver){this.box_div.style.left=this.box_div.style.top="-1px";this.box_div.style.borderWidth="1px";}}}};F._photo_button_bar={bar_go_go_go:function(l,D){var h=this.getElementsByTagName("img");var X=Y.U.Dom.getElementsByClassName("photo_gne_button","a",this);for(var e=0;e<X.length;e++){Photo_Gne_button_action_check(X[e].id);var n=X[e].id.split("photo_gne_button_").join("");var S=(n=="add_to_faves")?"a_fave":n;var c=X[e].getAttribute("title");var b=X[e].getAttribute("title_off");b=(b)?b:c;var G=(n=="add_to_faves"&&D)?1:0;if(n=="print"&&X[e].className.indexOf("prints_")>-1){n="prints";}F.decorate(X[e],F._photo_button).button_go_go_go(l,n,S,G,c,b);}}};F._photo_button={button_go_go_go:function(e,b,G,n,D,c){this.lock_down=0;this.p_id=e;this.style.cursor=(F.is_ie)?"hand":"pointer";F.make_new_mouse_tip(this);this.base_name=b;this.base_class_name="sprite-";if(b=="add_note"&&!_ok_for_scrumjax()){this.style.display="none";return ;}this.on=[];this.on._className=this.base_class_name+b+"_grey";this.on_over=[];this.on_over._className=this.base_class_name+b+"_color";this.on_down=[];this.on_down._className=this.base_class_name+b+"_color_down";if(b=="send_to_group"||b=="send_to_set"||b=="print"||b=="prints"||b=="blog_this"){this.on_locked=[];this.on_locked._className=this.base_class_name+b+"_color button_locked";}this.off=[];this.off._className=this.base_class_name+G+"_grey";this.off_over=[];this.off_over._className=this.base_class_name+G+"_color";this.off_down=[];this.off_down._className=this.base_class_name+G+"_color_down";this.isOver=this.isDown=0;this.isOff=(n)?1:0;this.title_on=D;this.title_off=c;if(this.isOff){this.change_src();F.change_mouse_tip_txt(this,c);}Y.U.Event.addListener(this,"mouseover",this.handle_mouseover);Y.U.Event.addListener(this,"mouseout",this.handle_mouseout);Y.U.Event.addListener(this,"click",this.handle_click);Y.U.Event.addListener(this,"mousedown",this.handle_mousedown);this.prints_action=this.print_action;},handle_mouseover:function(G){if(window.should_I_ignore_stuff_because_note_editing||window.should_I_ignore_stuff_because_tash_editing||window.should_I_ignore_stuff_because_of_editable_div_action){return ;}this.isOver=1;this.change_src();},handle_mouseout:function(G){this.isOver=0;if(!this.lock_down){this.isDown=0;}this.change_src();},handle_mousedown:function(b){if(window.should_I_ignore_stuff_because_note_editing||window.should_I_ignore_stuff_because_tash_editing||window.should_I_ignore_stuff_because_of_editable_div_action){return ;}if(this.is_disabled){this.enable_others();this.enable_self();}this.isDown=1;this.isOver=1;var G=_ge("photo_notes");if(this.base_name!="rotate"&&G&&G.hide_rotate_div){G.hide_rotate_div();}if(this.base_name!="print"&&printDialogDiv){hide_printDialog();}if(this.base_name!="send_to_set"&&sendToSetDialogDiv){hide_sendToSetDialog();}if(this.base_name!="send_to_group"&&sendToGroupDialogDiv){hide_sendToGroupDialog();}if(this.base_name!="blog_this"&&sendToBlogDialogDiv){hide_sendToBlogDialog();}},handle_click:function(G){if(window.should_I_ignore_stuff_because_note_editing||window.should_I_ignore_stuff_because_tash_editing||window.should_I_ignore_stuff_because_of_editable_div_action){return ;}if(this.is_disabled){return ;}var b=this[this.base_name+"_action"]();this.isOver=1;if(b==1){this.isDown=1;this.lock_down=1;}else{this.isDown=0;}this.change_src();},disable_others:function(){var n=Y.U.Dom.getElementsByClassName("photo_gne_button","IMG");for(var b=0;b<n.length;b++){if(n[b].base_name!=this.base_name){n[b].disable_self();}}var G=_ge("photo_notes");if(G&&G.take_her_away){G.take_her_away("disable_others");}window.should_I_ignore_stuff_because_of_button_action=1;F.eb_broadcast("stewart_pause");},enable_others:function(){var b=Y.U.Dom.getElementsByClassName("photo_gne_button","IMG");for(var G=0;G<b.length;G++){if(b[G].base_name!=this.base_name){b[G].enable_self();}}window.should_I_ignore_stuff_because_of_button_action=0;F.eb_broadcast("stewart_play_if_was_playing");},disable_self:function(){this.is_disabled=1;this.style.cursor="default";},enable_self:function(){this.is_disabled=0;this.style.cursor=(F.is_ie)?"hand":"pointer";},change_src:function(){if(this.is_disabled){return ;}if(this.lock_down){this.className=this.on_locked._className;}else{if(this.isOff){if(this.isDown){this.className=this.off_down._className;}else{if(this.isOver){this.className=this.off_over._className;}else{this.className=this.off._className;}}}else{if(this.isDown){this.className=this.on_down._className;}else{if(this.isOver){this.className=this.on_over._className;}else{this.className=this.on._className;}}}}},delete_action:function(){setTimeout("if (confirm('"+F.output.get("photo_buttons_are_you_sure")+"'))  document.location = global_photos['"+this.p_id+"'].deleteUrl;",50);return 0;},rotate_action:function(){var G=_ge("photo_notes");if(G&&G.show_rotate_div){this.disable_others();G.show_rotate_div(this);}return 0;},send_to_set_action:function(){if(_ok_for_scrumjax_xml()){if(this.lock_down){hide_sendToSetDialog();return 0;}else{show_sendToSetDialog(this.p_id);return 1;}}else{document.location="/photo_sendto_set.gne?id="+this.p_id;}return 0;},print_action:function(){if(_ok_for_scrumjax_xml()){if(this.lock_down){hide_printDialog();return 0;}else{show_printDialog(this.p_id);return 1;}}else{document.location="/photo_print.gne?id="+this.p_id;}return 0;},send_to_group_action:function(){if(_ok_for_scrumjax_xml()){if(this.lock_down){hide_sendToGroupDialog();return 0;}else{show_sendToGroupDialog(this.p_id);return 1;}}else{document.location="/photo_sendto_group.gne?id="+this.p_id;}return 0;},blog_this_action:function(){if(_ok_for_scrumjax_xml()){if(this.lock_down){hide_sendToBlogDialog();return 0;}else{show_sendToBlogDialog(this.p_id);return 1;}}else{document.location="/blog.gne?photo="+this.p_id;}return 0;},add_note_action:function(){var G=_ge("photo_notes");if(G&&G.start_adding_note){G.start_adding_note();}return 0;},add_tash_action:function(){window.should_I_ignore_stuff_because_tash_editing=1;if(!_ge("photo_tash")&&page_photo_id!=null){var G=document.createElement("DIV");G.id="photo_tash";_ge("photoImgDiv"+page_photo_id).appendChild(G);F.decorate(G,photo_tash).go_go_go();}_ge("photo_tash").show();return 0;},zoom_action:function(){document.location=_ge("photo_gne_button_zoom").href;var G;return 0;},embed_action:function(){document.location=_ge("photo_gne_button_embed").href;return 0;},edit_photo_action:function(){F.picnik.go_go_go();},add_to_faves_action:function(){var b=_ge("photo_notes");var G=_ge("fave_form");if(this.isOff){if(_ok_for_scrumjax()){F.API.callMethod("flickr.favorites.remove",{photo_id:this.p_id},this);if(window.disable_stewart){if(b&&b.start_comming){b.start_comming(F.output.get("photo_buttons_removing"),null,null,null,null,null,null,null,1);}}else{if(b&&b.start_pulsing){b.start_pulsing();}}}else{if(G){G.action=page_current_url;G.faveremove.value=1;G.submit();}}}else{if(_ok_for_scrumjax()){F.API.callMethod("flickr.favorites.add",{photo_id:this.p_id},this);if(window.disable_stewart){if(b&&b.start_comming){b.start_comming(F.output.get("photo_buttons_adding"),null,null,null,null,null,null,null,1);}}else{if(b&&b.start_pulsing){b.start_pulsing();}}}else{if(G){G.action=page_current_url;G.faveadd.value=1;G.submit();}}}return 0;},flickr_favorites_add_onLoad:function(c,n,b){var G=_ge("photo_notes");this.isOff=!this.isOff;this.change_src();F.change_mouse_tip_txt(this,this.title_off);if(window.disable_stewart){if(G&&G.stop_comming){G.stop_comming(1);}}else{if(G&&G.stop_pulsing){G.stop_pulsing();}}},flickr_favorites_remove_onLoad:function(c,n,b){var G=_ge("photo_notes");this.isOff=!this.isOff;this.change_src();F.change_mouse_tip_txt(this,this.title_on);if(window.disable_stewart){if(G&&G.stop_comming){G.stop_comming(1);}}else{if(G&&G.stop_pulsing){G.stop_pulsing();}}}};var Photo_Gne_button_action_check=function(b){try{if(b=="photo_gne_button_add_tash"){if(!_ge("photo_tash")&&page_photo_id!=null){setTimeout(function(){var n=document.createElement("DIV");n.id="photo_tash";_ge("photoImgDiv"+page_photo_id).appendChild(n);F.decorate(n,photo_tash).go_go_go();},2000);}}}catch(G){}};function tagrs_showForm(){_ge("tagadderlink").style.display="none";_ge("tagadder").style.display="block";_ge("addtagbox").focus();tagrs_startAutoComplete();}function tagrs_startAutoComplete(){if(_ge("tagSuggestions")&&window.TagCompleteWidget){new TagCompleteWidget(_ge("addtagbox"),_ge("tagSuggestions"),global_nsid).completer.startLoading();}tagrs_startAutoComplete=function(){};}function tagrs_hideForm(){tagrs_clearForm();_ge("tagadderlink").style.display="block";_ge("tagadder").style.display="none";}function tagrs_clearForm(){document.forms.tagadderform.tag.value="";}function tagrs_addTag(E,P){if(!_ok_for_scrumjax_xml()){return true;}if(P==""){return false;}deja_view_uh_huh();tagrs_clearForm();var r=_ge("tagadder");r.flickr_photos_addTags_onLoad=function(I,X,Q){if(I){F.API.callMethod("flickr.photos.getInfo",{photo_id:E},this);}else{var J=F.output.get("tagrs_tag_not_added");var c=X.documentElement.getElementsByTagName("err");if(c){c=c[0];if(c.getAttribute("code")=="2"){J=F.output.get("tagrs_max_limit",global_tag_limit,global_tag_limit);}else{if(c[0].getAttribute("msg")){J+=" "+c[0].getAttribute("msg");}}}var h=_ge("photo_notes");if(h&&h.start_comming){alert(J);}else{alert(J);}}};F.API.callMethod("flickr.photos.addTags",{photo_id:E,tags:P},r);return false;}function tagrs_rebuildTagsHTML(J,h,P,c,r){var E="<div id=\"tagdiv"+h+"\"><a class=\"globe\" onMouseOver=\"this.childNodes[0].src='"+_images_root+"/icon_globe_over.gif';\" onMouseOut=\"this.childNodes[0].src='"+_images_root+"/icon_globe.gif';\" href=\"/photos/tags/"+P+"/\" title=\""+F.output.get("tagrs_click_icon_all_public",P)+"\"><img src=\""+_images_root+"/icon_globe.gif\" width=\"16\" height=\"16\" class=\"icon\" alt=\""+F.output.get("tagrs_click_icon_all_public",P)+"\" /></a> <a class=\"Plain\" href=\""+global_photos[J].ownersUrl+"tags/"+P+"/\">"+c.escape_for_display()+"</a>";if(r){E+="\r\n\t\t\t\t\t\t"+"&nbsp;<a href=\""+global_photos[J].url+"?magic_cookie="+global_auth_hash+"&deletetag="+h+"\" title=\""+F.output.get("tagrs_delete_this_tag")+"\" class=\"Grey\" onclick=\"return tagrs_removeTag('"+J+"', '"+h+"', '"+P+"', '"+c.escape_for_display().replace("'","\\'")+"')\">[x]</a>";}E+="</div>";return E;tagrs_setPopularUsed(P);}function tagrs_removeTag(h,E,P,J){if(window.confirm(F.output.get("tagrs_are_you_sure_delete",J.escape_for_display()))){deja_view_uh_huh();if(!_ok_for_scrumjax_xml()){return true;}var r=_ge("tagadder");r.flickr_photos_removeTag_onLoad=function(i,I,X){if(i){tagrs_removedTag(h,E,P);}else{var c=F.output.get("tagrs_tag_not_deleted");var Q=I.documentElement.getElementsByTagName("err");if(Q&&Q[0].getAttribute("msg")){c+=" "+Q[0].getAttribute("msg");}alert(c);}};F.API.callMethod("flickr.photos.removeTag",{tag_id:E},r);return false;}else{return false;}}function tagrs_removedTag(E,h,N){_ge("tagdiv"+h).style.display="none";var J=0;var X=0;if(_ge("thetags")){var Q=_ge("thetags").getElementsByTagName("div").length;for(var c=0;c<Q;c++){if(_ge("thetags").getElementsByTagName("div")[c].style.display!="none"){J++;}}}if(_ge("themachinetags")){var Q=_ge("themachinetags").getElementsByTagName("div").length;for(var c=0;c<Q;c++){if(_ge("themachinetags").getElementsByTagName("div")[c].style.display!="none"){X++;}}}tagrs_toggle_displays(J,X);tagrs_setPopularUnUsedIfNotInInput(N);var I=tagrs_whereIsThisTagInHere(global_photos[E].tagsA,N);for(var P=0;P<I.length;P++){global_photos[E].tagsA.splice(I[P],1);global_photos[E].tags_rawA.splice(I[P],1);}}function tagrs_clearTags(){_ge("thetags").innerHTML="";}function tagrs_updatePopularList(r){if(!_ok_for_scrumjax_xml()){return false;}var X=_ge("addtagbox");var Q=F.get_tags_from_input_str(X.value);var J=(global_photos[r]&&global_photos[r].tagsA)?global_photos[r].tagsA:[];var E=(global_photos[r]&&global_photos[r].tags_rawA)?global_photos[r].tags_rawA:[];for(var I=0;I<tagrs_popularA.length;I++){var i=tagrs_popularA[I];var h=tagrs_whereIsThisTagInHere(J,i);var P=tagrs_whereIsThisTagInHere(E,i);var c=tagrs_whereIsThisTagInHere(Q,i);if(h.length==0&&P.length==0&&c.length==0){tagrs_setPopularUnUsed(i);}else{tagrs_setPopularUsed(i);}}setTimeout("tagrs_updatePopularList('"+r+"')",200);}tagrs_popularA=[];function tagrs_showPopular(r,E){if(!_ok_for_scrumjax_xml()){return false;}var P=_ge("addtagbox");var J=F.get_tags_from_input_str(P.value);r=(r==undefined)?20:r;var h=_ge("tagpopular");global_nsid;h.innerHTML="<i>loading...</i>";h.flickr_tags_getListUserPopular_onLoad=function(N,i,I){if(N){tagrs_popularA=[];var p=i.documentElement.getElementsByTagName("tag");if(p.length==0){var z="You have no tags yet.";}else{var z="click a tag:";for(var j=0;j<p.length;j++){var c=p[j];var y=c.firstChild.nodeValue;tagrs_popularA.push(y);z+=" <a href=\"#\" id=\"popTags"+y+"\" onclick=\"tagrs_toggleTagInInput('"+y+"', '"+E+"'); return false;\">"+y+"</a>";}if(p.length>r){z+="<br><br><a href=\"#\" onclick=\"tagrs_showPopular("+(r+20)+", '"+E+"');return false;\">"+F.output.get("tagrs_get_more_your_tags")+"</a> | <a href=\"#\" onclick=\"tagrs_showPopular("+(r+2000)+", '"+E+"');return false;\">"+F.output.get("tagrs_get_all_your_tags")+"</a>";}}this.innerHTML=z;tagrs_updatePopularList(E);}else{var X=F.output.get("tagrs_tags_not_loaded");var Q=i.documentElement.getElementsByTagName("err");if(Q&&Q[0].getAttribute("msg")){X+=" "+Q[0].getAttribute("msg");}alert(X);}};F.API.callMethod("flickr.tags.getListUserPopular",{count:r+1},h);}function tagrs_setPopularUsed(P){var E=_ge("popTags"+P);if(!E){return ;}E.className="tagrsUsed";}function tagrs_setPopularUnUsed(P){var E=_ge("popTags"+P);if(!E){return ;}E.className="tagrsUnUsed";}function tagrs_setPopularUnUsedIfNotInInput(P){var r=_ge("popTags"+P);if(!r){return ;}var E=_ge("addtagbox");var J=F.get_tags_from_input_str(E.value);var h=tagrs_whereIsThisTagInHere(J,P);if(h.length>0){return ;}tagrs_setPopularUnUsed(P);}function tagrs_toggleTagInInput(E,J){var h=(global_photos[J]&&global_photos[J].tagsA)?global_photos[J].tagsA:[];var X=_ge("addtagbox");var c=F.get_tags_from_input_str(X.value);var N=tagrs_whereIsThisTagInHere(c,E);if(N.length==0){if(tagrs_whereIsThisTagInHere(h,E).length==0){c.unshift(E);}tagrs_setPopularUsed(E);}else{for(var P=0;P<N.length;P++){c.splice(N[P],1);}tagrs_setPopularUnUsed(E);}var Q=_ge("popTags"+E);if(Q){Q.blur();}var I="";for(var i=0;i<c.length;i++){I+=(c[i].indexOf(" ")==-1)?c[i]:"\""+c[i]+"\"";if(i+1<c.length){I+=" ";}}X.value=I;}function tagrs_whereIsThisTagInHere(h,J){var E=[];for(var r=0;r<h.length;r++){var P=h[r];if(J.toLowerCase()==P.replace(" ","").toLowerCase()){E.unshift(r);}}return E;}function tagrs_toggle_displays(E,P){if(!E&&!P){_ge("thetags").style.display="block";if(_ge("machine_tag_toggle")){_ge("machine_tag_toggle").style.display="none";}if(_ge("themachinetags")){_ge("themachinetags").style.display="none";}}if(E&&!P){_ge("thetags").style.display="block";if(_ge("machine_tag_toggle")){_ge("machine_tag_toggle").style.display="none";}if(_ge("themachinetags")){_ge("themachinetags").style.display="none";}}if(!E&&P){_ge("thetags").style.display="none";if(_ge("machine_tag_toggle")){_ge("machine_tag_toggle").style.display="none";}if(_ge("themachinetags")){_ge("themachinetags").style.display="block";}if(_ge("machine_tag_toggle_show")){_ge("machine_tag_toggle_show").style.display="none";}if(_ge("machine_tag_toggle_hide")){_ge("machine_tag_toggle_hide").style.display="none";}}if(E&&P&&_old_machine_tags!=P){_old_machine_tags=P;_ge("thetags").style.display="block";if(_ge("machine_tag_toggle")){_ge("machine_tag_toggle").style.display="block";}if(_ge("themachinetags")){_ge("themachinetags").style.display="block";}if(_ge("machine_tag_toggle_show")){_ge("machine_tag_toggle_show").style.display="none";}if(_ge("machine_tag_toggle_hide")){_ge("machine_tag_toggle_hide").style.display="block";}}if(_ge("span_machine_tags_show_count")){_ge("span_machine_tags_show_count").innerHTML=P;}if(_ge("span_machine_tags_hide_count")){_ge("span_machine_tags_hide_count").innerHTML=P;}}function tagrs_toggle_machine_tags(){if(_ge("machine_tag_toggle_show")&&_ge("machine_tag_toggle_hide")){if(_ge("machine_tag_toggle_show").style.display=="none"){tagrs_hide_machine_tags();}else{tagrs_show_machine_tags();}}return false;}function tagrs_show_machine_tags(){if(_ge("machine_tag_toggle_show")){_ge("machine_tag_toggle_show").style.display="none";}if(_ge("machine_tag_toggle_hide")){_ge("machine_tag_toggle_hide").style.display="block";}if(_ge("themachinetags")){_ge("themachinetags").style.display="block";}}function tagrs_hide_machine_tags(){if(_ge("machine_tag_toggle_show")){_ge("machine_tag_toggle_show").style.display="block";}if(_ge("machine_tag_toggle_hide")){_ge("machine_tag_toggle_hide").style.display="none";}if(_ge("themachinetags")){_ge("themachinetags").style.display="none";}}function tagrs_writePopularLink(P){if(!_ok_for_scrumjax_xml()){return ;}document.write("<div style=\"margin-top:5px; font-size:12px\" id=\"tagpopular\"><a style=\"text-decoration: none;\" href=\"#\" onclick=\"tagrs_showPopular(20, '"+P+"');return false;\">"+F.output.get("tagrs_choose_from_tags")+"</a></div>");var E=_ge("tagadder");if(E){E.flickr_photos_getInfo_onLoad=function(N,I,c){if(N){var j=I.documentElement.getElementsByTagName("tag");_rebuild_tags_for_photos(P,j);var r=global_photos[P];var X="";var h="";var J=0;var i=0;var Q=new RegExp("^(.+):(.+)=(.+)$");for(var z=0;z<r.tagsA.length;z++){if(Q.test(r.tags_rawA[z])&&_ge("themachinetags")){i++;h+=tagrs_rebuildTagsHTML(P,r.tags_idA[z],r.tagsA[z],r.tags_rawA[z],r.tags_canDeleteA[z]);}else{J++;X+=tagrs_rebuildTagsHTML(P,r.tags_idA[z],r.tagsA[z],r.tags_rawA[z],r.tags_canDeleteA[z]);}}tagrs_toggle_displays(J,i);_ge("thetags").innerHTML=X;if(_ge("themachinetags")){_ge("themachinetags").innerHTML=h;}}else{alert("info not got");}};}if(window.deja_view_should_refresh){_ge("thetags").innerHTML="...<br>";}}function machine_tag_toggle_init(){var J=0;var r=0;if(_ge("thetags")){var E=_ge("thetags").getElementsByTagName("div").length;for(var P=0;P<E;P++){if(_ge("thetags").getElementsByTagName("div")[P].style.display!="none"){J++;}}}if(_ge("themachinetags")){var E=_ge("themachinetags").getElementsByTagName("div").length;for(var P=0;P<E;P++){if(_ge("themachinetags").getElementsByTagName("div")[P].style.display!="none"){r++;}}}if(!J&&!r){_ge("thetags").style.display="block";if(_ge("machine_tag_toggle")){_ge("machine_tag_toggle").style.display="none";}if(_ge("themachinetags")){_ge("themachinetags").style.display="none";}}if(J&&!r){_ge("thetags").style.display="block";if(_ge("machine_tag_toggle")){_ge("machine_tag_toggle").style.display="none";}if(_ge("themachinetags")){_ge("themachinetags").style.display="none";}}if(!J&&r){_ge("thetags").style.display="none";if(_ge("machine_tag_toggle")){_ge("machine_tag_toggle").style.display="none";}if(_ge("themachinetags")){_ge("themachinetags").style.display="block";}if(_ge("machine_tag_toggle_show")){_ge("machine_tag_toggle_show").style.display="none";}if(_ge("machine_tag_toggle_hide")){_ge("machine_tag_toggle_hide").style.display="none";}}if(J&&r){_ge("thetags").style.display="block";if(_ge("machine_tag_toggle")){_ge("machine_tag_toggle").style.display="block";}if(_ge("themachinetags")){_ge("themachinetags").style.display="none";}if(_ge("machine_tag_toggle_show")){_ge("machine_tag_toggle_show").style.display="block";}if(_ge("machine_tag_toggle_hide")){_ge("machine_tag_toggle_hide").style.display="none";}}}var nextprev_currentContextLink;var nextprev_currentContextID;nextprev_toggle_set=function(G,g){if(!_ok_for_scrumjax()){return true;}var O=_ge("nextprev_tr_set"+G);if(O.style.display=="none"){var h=nextprev_expand("set",G);if(!h.ready){h.flickr_photosets_getContext_onLoad=h.handleRsp;F.API.callMethod("flickr.photosets.getContext",{photoset_id:G,photo_id:g},h);}}else{nextprev_collapse("set",G);}return false;};nextprev_toggle_pool=function(G,g){if(!_ok_for_scrumjax()){return true;}var O=_ge("nextprev_tr_pool"+G);if(O.style.display=="none"){var h=nextprev_expand("pool",G);if(!h.ready){h.flickr_groups_pools_getContext_onLoad=h.handleRsp;F.API.callMethod("flickr.groups.pools.getContext",{group_id:G,photo_id:g},h);}}else{nextprev_collapse("pool",G);}return false;};nextprev_toggle_stream=function(g,G){if(!_ok_for_scrumjax()){return true;}var O=_ge("nextprev_tr_stream"+g);if(O.style.display=="none"){var h=nextprev_expand("stream",g);if(!h.ready){h.flickr_photos_getContext_onLoad=h.handleRsp;F.API.callMethod("flickr.photos.getContext",{user_id:g,photo_id:G},h);}}else{nextprev_collapse("stream",g);}return false;};nextprev_collapse=function(O,C){var h=_ge("nextprev_tr_"+O+C);var G=_ge("nextprev_crumbs_tr_"+O+C);var g=_ge("contextTitle_"+O+C);h.style.display="none";if(G){G.style.display="none";}g.style.borderBottom="1px solid #f3f3f3";h.ready=1;};nextprev_expand=function(a,G){var w=_ge("nextprev_tr_"+a+G);var h=_ge("nextprev_crumbs_tr_"+a+G);var O=_ge("nextprev_div_"+a+G);var c=_ge("nextprev_mover_div_"+a+G);var p=_ge("contextInfoInner_"+a+G);var l=_ge("photosNum_"+a+G);var C=_ge("photosText_"+a+G);var g=_ge("contextTitle_"+a+G);var k=_ge("slideshowLink_"+a+G);w.showYourself=function(){w.style.display=(F.is_ie)?"block":"table-row";if(h){h.style.display=(F.is_ie)?"block":"table-row";}g.style.borderBottom="0px";if(!w.ready){c.innerHTML="<img src=\""+_images_root+"/context_loading.gif\" width=\"75\" height=\"75\" alt=\"\" />";}};w.showYourself();w.handleRsp=function(V,N,d){if(V){var x=N.documentElement.getElementsByTagName("prevphoto")[0];var f=x.getAttribute("id")*1;var e="";var m="";var y="";var t="";var M=false;var q="";if(x&&f!="0"){e=x.getAttribute("url");m=x.getAttribute("thumb");y=" href=\""+e+"\"";t=" title=\""+F.output.get("nextprev_goto_prev",a)+"\"";_ge("nextprev_arrows_prev_img_"+a+G).style.visibility="visible";if(x.getAttribute("media")=="video"){M=true;q="<img src=\""+_images_root+"/video_play_icon_small.png.v1\" class=\"trans_png nextprev_stew_indicator\">";}}else{m=_intl_images_root+"/placeholder_first_photo.gif";}var Z="<a "+y+" class=\"contextThumbLink\" style=\"position:absolute; left:0px;\"><img "+"id=\"nextprev_thumb_"+a+G+f+"\" "+"class=\"nextprev_thumb\" "+"style=\"visibility:hidden;\" "+"onload=\"F.decorate(this, F._nextprev_thumb).thumb_go_go_go('"+e+"', false, '"+a+"', '"+G+"')\" "+"src=\""+m+"\" "+"width=\"75\" height=\"75\" "+t+" />"+q+"</a>";O.prev_id=f;O.cache["p"+f]={id:f,url:e,src:m,is_video:M};var Q=N.documentElement.getElementsByTagName("nextphoto")[0];var K=Q.getAttribute("id")*1;var L="";var s="";var J="";var E="";var u=false;var D="";if(Q&&K!="0"){L=Q.getAttribute("url");s=Q.getAttribute("thumb");J=" href=\""+L+"\"";E=" title=\""+F.output.get("nextprev_goto_next",a)+"\"";_ge("nextprev_arrows_next_img_"+a+G).style.visibility="visible";if(Q.getAttribute("media")=="video"){u=true;D="<img src=\""+_images_root+"/video_play_icon_small.png.v1\" class=\"trans_png nextprev_stew_indicator\">";}}else{s=_intl_images_root+"/placeholder_last_photo.gif";}var W="<a "+J+" class=\"contextThumbLink\" style=\"position:absolute; left:78px;\"><img "+"id=\"nextprev_thumb_"+a+G+K+"\" "+"class=\"nextprev_thumb\" "+"style=\"visibility:hidden;\" "+"onload=\"F.decorate(this, F._nextprev_thumb).thumb_go_go_go(this, '"+L+"', false, '"+a+"', '"+G+"')\" "+"src=\""+s+"\" "+"width=\"75\" height=\"75\" "+E+" />"+D+"</a>";O.next_id=K;O.cache["p"+K]={id:K,url:L,src:s,is_video:u};c.innerHTML=Z+W;writeAPIDebug(c.innerHTML);var U=N.documentElement.getElementsByTagName("count")[0].firstChild.nodeValue;l.innerHTML=U.pretty_num();C.innerHTML=F.output.get_plural("mat_group_photo",U);k.style.display=(U<2)?"none":"block";p.style.visibility="visible";}else{alert("Error");}};return w;};F._nextprev_button={button_go_go_go:function(G,g,h){this.c_type=G;this.c_id=g;this.p_id=h;this.closed=new Image();this.closed.src=_images_root+"/context_closed.gif";this.closed_over=new Image();this.closed_over.src=_images_root+"/context_closed_over.gif";this.closed_down=new Image();this.closed_down.src=_images_root+"/context_closed_click.gif";this.open=new Image();this.open.src=_images_root+"/context_open.gif";this.open_over=new Image();this.open_over.src=_images_root+"/context_open_over.gif";this.open_down=new Image();this.open_down.src=_images_root+"/context_open_click.gif";this.isOver=0;this.isDown=0;this.isOpen=(this.get_src_file()=="context_closed.gif")?0:1;Y.U.Event.addListener(this,"mouseover",this.handle_mouseover);Y.U.Event.addListener(this,"mouseout",this.handle_mouseout);Y.U.Event.addListener(this,"click",this.handle_click);Y.U.Event.addListener(this,"mousedown",this.handle_mousedown);},get_src_file:function(){return this.src.split("/").pop();},change_src:function(){if(this.isOpen){if(this.isDown){this.src=this.open_down.src;}else{if(this.isOver){this.src=this.open_over.src;}else{this.src=this.open.src;}}}else{if(this.isDown){this.src=this.closed_down.src;}else{if(this.isOver){this.src=this.closed_over.src;}else{this.src=this.closed.src;}}}},handle_mouseover:function(){this.isOver=1;this.change_src();},handle_mouseout:function(){this.isOver=0;this.change_src();},handle_mousedown:function(){this.isDown=1;this.isOver=1;this.change_src();},handle_click:function(){this.isDown=0;this.isOpen=!this.isOpen;this.isOver=!this.isOpen;this.change_src();window["nextprev_toggle_"+this.c_type](this.c_id,this.p_id);}};F._nextprev_thumb={thumb_go_go_go:function(g,O,h,G){this.url=g;this.c_type=h;this.c_id=G;this.current=(O)?1:0;this.style.visibility="visible";Y.U.Event.addListener(this,"click",this.handle_click);},handle_click:function(G){if(this.url==""){return false;}if(!G){G=window.event;}if(this.current){}else{if(nextprev_currentContextLink){nextprev_currentContextLink.style.fontWeight="normal";nextprev_currentContextLink.style.color="#666666";}var g=_ge("contextLink_"+this.c_type+this.c_id);g.style.fontWeight="bold";g.style.color="#0063DC";if(G.metaKey||G.ctrlKey){}else{if(G.preventDefault){G.preventDefault();}if(G.stopPropagation){G.stopPropagation();}setTimeout("document.location = \""+this.url+"\"",500);}}}};F._nextprev_arrows_div={div_go_go_go:function(O){this.contextThumbsDiv=O;this.direction_to_move=0;for(var G=0;G<this.childNodes.length;G++){var h=this.childNodes[G];h.style.cursor=(F.is_ie)?"hand":"pointer";var C=["left","","right"];if(G==1){var g=h.childNodes[0];g.style.visibility="visible";g.over_src=_intl_images_root+"/context_view_page_over.gif?v1";g.out_src=_intl_images_root+"/context_view_page_out.gif?v1";}else{var g=h;g.over_src=_images_root+"/context_arrow_more_"+C[G]+"_over.gif?v1";g.out_src=_images_root+"/context_arrow_more_"+C[G]+"_out.gif?v1";}if(g.title){F.make_new_mouse_tip(g,"below");}Y.U.Event.addListener(g,"mouseover",function(k){this.src=this.over_src;});Y.U.Event.addListener(g,"mouseout",function(k){this.src=this.out_src;});}Y.U.Event.addListener(this,"click",this.handle_click);},handle_click:function(G){if(this.direction_to_move){return ;}var g=_get_event_src(G);if(g.className=="nextprev_arrows_img_prev"){this.direction_to_move="prev";this.contextThumbsDiv.slide_it(this.contextThumbsDiv.prev_id,this.direction_to_move);}else{if(g.className=="nextprev_arrows_img_next"){this.direction_to_move="next";this.contextThumbsDiv.slide_it(this.contextThumbsDiv.next_id,this.direction_to_move);}else{if(g.className=="contextThumbLink"){return ;}else{return ;}}}}};F._slideshow_button={_decotype:F._simple_button,button_go_go_go:function(){F.make_new_mouse_tip(this,"below");F._slideshow_button._decotype.button_go_go_go.apply(this);},button_default_onclick:function(g){this.blur();return true;}};F._nextprev_div={div_go_go_go:function(p,a,c,g,O,h,w,E,k,C,l){this.prev_id=(p=="")?0:p;this.next_id=(a=="")?0:a;this.prev_url=c;this.next_url=g;this.c_type=w;this.c_id=E;this.current=k;this.p_id=C;this.url=l;this.pos=0;var N=_ge("nextprev_thumb_"+this.c_type+this.c_id+p);var G=_ge("nextprev_thumb_"+this.c_type+this.c_id+a);if(N){F.decorate(N,F._nextprev_thumb).thumb_go_go_go(this.prev_url,this.current,this.c_type,this.c_id);}if(G){F.decorate(G,F._nextprev_thumb).thumb_go_go_go(this.next_url,this.current,this.c_type,this.c_id);}this.arrows_div=_ge("nextprev_arrows_div_"+this.c_type+this.c_id);F.decorate(this.arrows_div,F._nextprev_arrows_div).div_go_go_go(this);this.cache={};if(N&&G&&N!=G){N.parentNode.style.position="absolute";N.parentNode.style.left="0px";G.parentNode.style.position="absolute";G.parentNode.style.left="78px";this.cache["p"+p]={id:this.prev_id,url:this.prev_url,src:N.src,is_video:O};this.cache["p"+a]={id:this.next_id,url:this.next_url,src:G.src,is_video:h};if(p!=""){_ge("nextprev_arrows_prev_img_"+this.c_type+this.c_id).style.visibility="visible";}if(a!=""){_ge("nextprev_arrows_next_img_"+this.c_type+this.c_id).style.visibility="visible";}}F.decorate(_ge("slideshow_link_"+this.c_type+this.c_id),F._slideshow_button).button_go_go_go();},add_thumb:function(p,g,G,m,J,O,y){var N=_ge("nextprev_mover_div_"+this.c_type+this.c_id);if(p!=0){var k=_ge("nextprev_view_page_img_"+this.c_type+this.c_id).parentNode;k.href=this.url+"with/"+p+"/";}var E="nextprev_thumb_"+this.c_type+this.c_id+p;var c=_ge(E);var w=0;if(!c||p==0){var e=document.createElement("a");e.style.position="absolute";e.className="contextThumbLink";c=document.createElement("img");c.src=g;c.className="nextprev_thumb";c.id=E;c.width=c.height=75;w=1;e.appendChild(c);if(y){img2=document.createElement("img");img2.src=_images_root+"/video_play_icon_small.png.v1";img2.className="trans_png nextprev_stew_indicator";img2.width=img2.height=11;e.appendChild(img2);}}else{e=c.parentNode;}if(p!=0){e.href=G;}if(m=="prev"){this.pos--;var h=this.pos*78;e.style.left=h+"px";if(p!=0){c.title=F.output.get("nextprev_goto_prev",this.c_type);}if(w){N.appendChild(F.prepare_for_insertion(e));if(N.childNodes.length>4){for(var l=0;l<N.childNodes.length;l++){var C=N.childNodes[l];if(C.childNodes[0]==O){continue;}if(C.childNodes[0]==J){continue;}F.remove_el(C,N);break;}}}this.next_id=this.prev_id;this.prev_id=p;_ge("nextprev_thumb_"+this.c_type+this.c_id+this.next_id).title=F.output.get("nextprev_goto_next",this.c_type);}else{if(m=="next"){this.pos++;var h=this.pos*78;e.style.left=(h+78)+"px";if(p!=0){c.title=F.output.get("nextprev_goto_next",this.c_type);}if(w){N.appendChild(F.prepare_for_insertion(e));if(N.childNodes.length>4){for(var l=0;l<N.childNodes.length;l++){var C=N.childNodes[l];if(C.childNodes[0]==O){continue;}if(C.childNodes[0]==J){continue;}F.remove_el(C,N);break;}}}this.prev_id=this.next_id;this.next_id=p;_ge("nextprev_thumb_"+this.c_type+this.c_id+this.prev_id).title=F.output.get("nextprev_goto_prev",this.c_type);}else{return ;}}if(w){F.decorate(c,F._nextprev_thumb).thumb_go_go_go(G,this.current,this.c_type,this.c_id);}anim_do_slide_to_x(N,5,40,-h,"easeOutQuad",function(a){},[c]);},slide_it:function(a,E,p){var N=false;var C="";var O="";var l=0;var g=this.cache["p"+a];var e=_ge("nextprev_thumb_"+this.c_type+this.c_id+this.prev_id);var h=_ge("nextprev_thumb_"+this.c_type+this.c_id+this.next_id);var k=_ge("nextprev_arrows_prev_img_"+this.c_type+this.c_id);var c=_ge("nextprev_arrows_next_img_"+this.c_type+this.c_id);if(E=="prev"&&g&&g.prev_id!=undefined){c.style.visibility="visible";c.style.cursor=(F.is_ie)?"hand":"pointer";if(g.prev_id!=0){var w=this.cache["p"+g.prev_id];C=w.url;O=w.src;l=w.id;N=w.is_video;k.style.visibility="visible";c.style.cursor=(F.is_ie)?"hand":"pointer";}else{O=_intl_images_root+"/placeholder_first_photo.gif";k.style.visibility="hidden";c.style.cursor="";}}else{if(E=="next"&&g&&g.next_id!=undefined){k.style.visibility="visible";c.style.cursor=(F.is_ie)?"hand":"pointer";if(g.next_id!=0){var G=this.cache["p"+g.next_id];C=G.url;O=G.src;l=G.id;N=G.is_video;c.style.visibility="visible";c.style.cursor=(F.is_ie)?"hand":"pointer";}else{O=_intl_images_root+"/placeholder_last_photo.gif";c.style.visibility="hidden";c.style.cursor="";hide_tooltip(_ge("nextprev_arrows_next_img_"+this.c_type+this.c_id));}}else{if(p){writeDebug("should have had it in cache");return ;}if(this.c_type=="set"){F.API.callMethod("flickr.photosets.getContext",{photoset_id:this.c_id,photo_id:a},this);}else{if(this.c_type=="pool"){F.API.callMethod("flickr.groups.pools.getContext",{group_id:this.c_id,photo_id:a},this);}else{if(this.c_type=="stream"){F.API.callMethod("flickr.photos.getContext",{user_id:this.c_id,photo_id:a},this);}}}return ;}}this.add_thumb(l,O,C,E,e,h,N);this.arrows_div.direction_to_move=0;},generic_api_onLoad:function(c,l,a,O){if(c){var G="";var g="";var k="";var w=false;if(this.arrows_div.direction_to_move=="prev"){var h=l.documentElement.getElementsByTagName("prevphoto")[0];k=h.getAttribute("id")*1;if(h&&k!="0"){G=h.getAttribute("url");g=h.getAttribute("thumb");if(h.getAttribute("media")=="video"){w=true;}}else{g=_intl_images_root+"/placeholder_first_photo.gif";}this.cache["p"+O.photo_id].prev_id=k;this.cache["p"+k]={next_id:O.photo_id,id:k,url:G,src:g,is_video:w};}else{if(this.arrows_div.direction_to_move=="next"){var C=l.documentElement.getElementsByTagName("nextphoto")[0];k=C.getAttribute("id")*1;if(C&&k!="0"){G=C.getAttribute("url");g=C.getAttribute("thumb");if(C.getAttribute("media")=="video"){w=true;}}else{g=_intl_images_root+"/placeholder_last_photo.gif";}this.cache["p"+O.photo_id].next_id=k;this.cache["p"+k]={prev_id:O.photo_id,id:k,url:G,src:g,is_video:w};}}}else{this.arrows_div.direction_to_move=0;return ;}this.slide_it(O.photo_id,this.arrows_div.direction_to_move,1);}};var upload_uploading=0;function upload_is_safari(){if(navigator.userAgent.indexOf("Safari")!=-1){return 1;}return 0;}function upload_is_moz_one(){if(navigator.userAgent.indexOf("Mozilla/5.0")!=-1&&navigator.userAgent.indexOf("rv:1.0")!=-1){return 1;}return 0;}function upload_click_button(){if(upload_is_safari()){upload_hide_form();document.getElementById("upload_form").submit();}upload_uploading=1;return true;}function upload_submit_form(){if(!upload_is_safari()&&!upload_is_moz_one()){upload_hide_form();}upload_uploading=1;return true;}function upload_hide_form(){document.getElementById("upload_form_container").style.display="none";document.getElementById("upload_uploading_container").style.display="block";}function flashError(){}var escape_utf8_bytes=function(q){if(q===""||q===null||q===undefined){return "";}q=q.toString();var u="";for(var w=0;w<q.length;w++){var b=q.charCodeAt(w);var z=new Array();if(b>65536){z[0]=240|((b&1835008)>>>18);z[1]=128|((b&258048)>>>12);z[2]=128|((b&4032)>>>6);z[3]=128|(b&63);}else{if(b>2048){z[0]=224|((b&61440)>>>12);z[1]=128|((b&4032)>>>6);z[2]=128|(b&63);}else{if(b>128){z[0]=192|((b&1984)>>>6);z[1]=128|(b&63);}else{z[0]=b;}}}if(z.length>1){for(var W=0;W<z.length;W++){u+=(String.fromCharCode(z[W]));}}else{u+=(String.fromCharCode(z[0]));}}return u;};var upPage=new function(){this.toggle=function(){row=_ge("moderation");if(YAHOO.util.Dom.hasClass(row,"open")){YAHOO.util.Dom.removeClass(row,"open");}else{YAHOO.util.Dom.addClass(row,"open");}return false;};};function goOldSkool(W){var z="?";var u=null;for(u in W){if(W.hasOwnProperty(u)&&u!="result"){z+=(u+"="+encodeURI(W[u])+"&");}}z=z.substr(0,z.length-1);window.location.replace(_ge("upload-add-files").href+z);}if(typeof YAHOO.util.BgPosAnim=="undefined"){(function(){YAHOO.util.BgPosAnim=function(j,w,q,b){YAHOO.util.BgPosAnim.superclass.constructor.apply(this,arguments);};YAHOO.extend(YAHOO.util.BgPosAnim,YAHOO.util.Anim);var W=YAHOO.util;var z=W.BgPosAnim.superclass;var u=W.BgPosAnim.prototype;u.toString=function(){var w=this.getEl();var j=w.id||w.tagName;return ("BgPosAnim "+j);};u.patterns.bgPos=/^backgroundPosition|background-position$/i;u.setAttribute=function(w,q,j){if(this.patterns.bgPos.test(w)){q=q[0]+j[0]+" "+q[1]+j[1];YAHOO.util.Dom.setStyle(this.getEl(),w,q);}else{z.setAttribute.apply(this,arguments);}},u.doMethod=function(j,C,q){var M;if(this.patterns.bgPos.test(j)){M=[];for(var b=0,w=C.length;b<w;++b){M[b]=z.doMethod.call(this,j,C[b],q[b]);}}else{M=z.doMethod.apply(this,arguments);}return M;};})();}F.format_file_size=function(u,w,C){var C=(typeof C!="undefined"?C.toLowerCase():"bytes");var w=(typeof w!="undefined"?w.toLowerCase():null);var j={bytes:{string:F.output.format_strs.uploadr_filesize_bytes,scale:1,decimalPlaces:0},kb:{string:F.output.format_strs.uploadr_filesize_kb,scale:1024,decimalPlaces:1},mb:{string:F.output.format_strs.uploadr_filesize_mb,scale:1024*1024,decimalPlaces:2},gb:{string:F.output.format_strs.uploadr_filesize_gb,scale:1024*1024*1024,decimalPlaces:2},decimal:".",result_format:"<!! dev=\"chronic\">%number %units</!!>"};var b=(j[C]?j[C]:j.bytes);if(!w){w="bytes";var O=u*b.scale;if(O>=j.gb.scale){w="gb";}else{if(O>=j.mb.scale){w="mb";}else{if(O>=j.kb.scale){w="kb";}}}}var M=(j[w]?j[w]:null);var z=b.scale/M.scale;var W=(u*z).toFixed(M.decimalPlaces);if(W.substr(W.length-3)==".00"){W=W.substr(0,W.length-3);}if(W.substr(W.length-2)==".0"){W=W.substr(0,W.length-2);}var q=j.result_format.replace("%number",(W.toString().replace(".",j.decimal)));q=q.replace("%units",M.string);return q;};function toggleModeration(){var u=_ge("moderation_toggle");if(YAHOO.util.Dom.hasClass(u,"open")){YAHOO.util.Dom.removeClass(u,"open");}else{YAHOO.util.Dom.addClass(u,"open");}}function showBandwidthNotice(){var b=_ge("bandwidth");if(!b){return false;}var z=_ge("bandwidth-used");var u=_bytes_used;var q=_bytes_left;var j=(u/q);var w=F.format_file_size(q,"mb");var W="low";if(j>0.5){W="moderate";}else{if(j>0.75){W="high";}}z.className=W;}F.uploadr=null;F.Uploadr=function(){if(typeof w=="undefined"){var w=function(C){return document.getElementById(C);};}var z=this;var W=z;this.url=(typeof window._upload_api_root!="undefined"?window._upload_api_root:_api_root)+(typeof window._upload_api_path!="undefined"?window._upload_api_path:"/services/upload/");this.data={bytesUploaded:0,bytesTotal:0,fileCount:0,videoCount:0};this.params={api_key:global_magisterLudi,async:true,auth_hash:global_auth_hash,auth_s:_get_cookie("cookie_session"),chronic:1};this.stats={photos:0,bytes:0,upload_time:0,errors:0,chronic:1};this.upload_disabled=false;this.didStatsSubmit=false;this.statsTimer=null;var q=0;this.async=this.params.async;var u={ANIM:0.6,EASE:YAHOO.util.Easing.easeBothStrong,FILE_TIMEOUT:1000*60,FOO:"BAR"};this.mb=1024*1024;this.oversizeFiles=0;this.excludedFiles=0;this.maxFileSize=(_upload_max_photo_size*this.mb);this.uploadActive=false;this.uploadStarted=false;this.uploadComplete=false;this.files=[];this.photoIDs=[];this.failedFiles=0;this.failedFilesBytes=0;this.currentFile=null;this.isEmpty=true;this.fileTypesPhotos=[{description:F.output.format_strs.uploadr_filetypes_photos,extension:"*.jpg;*.JPG;*.jpeg;*.JPEG;*.bmp;*.BMP;*.gif;*.GIF;*.png;*.PNG;*.tif;*.TIF;*.tiff;*.TIFF"}];this.fileTypesPhotosAndVideos=[{description:F.output.format_strs.uploadr_filetypes_photos_and_videos,extension:this.fileTypesPhotos[0].extension+";*.mov;*.MOV;*.mpg;*.MPG;*.mpeg;*.MPEG;*.mp4;*.avi;*.AVI;*.wmv;*.WMV;*.3gp;*.3GP;*.m4v;*.M4V"}];this.fileTypes=(_video_offline?this.fileTypesPhotos:this.fileTypesPhotosAndVideos);this.maxFileSize={fs_default:_upload_max_photo_size*this.mb,fs_video:(typeof _upload_max_video_size!="undefined"?_upload_max_video_size:0)*this.mb};this.getFileType=function(O){O=O.toLowerCase();var L=["mov","mpg","mpeg","mp4","avi","wmv","3gp","m4v"];for(var C=L.length;C--;){if(O.indexOf("."+L[C])!=-1){return "video";}}return "image";};this.fileTypes[0].description+=" ("+this.fileTypes[0].extension+")";this.o=w("upload-table");this.oWidth=0;this.barWidth=800;this.barOffset=60;this.oForm=w("upload_form");this.oControl=null;this.oAdd=w("upload-add-files");this.oAddMore=w("upload-add-more");this.oRemove=w("upload-remove-files");this.oList=w("uploadr-list");this.oStatus=w("upload-container");this.oUpOverSize=w("upload-oversize");this.oUpOverLimit=w("upload-overlimit");this.oUpNoVideo=w("upload-no-video");this.oUpOneFailed=w("uploadr-one-failed");this.oUpSomeFailed=w("uploadr-some-failed");this.oUpAllFailed=w("uploadr-all-failed");this.oStatusProgress=w("uploadr-status").getElementsByTagName("div")[0];this.oOffline=document.createDocumentFragment();this.strings={messages:{overSize:this.oUpOverSize.innerHTML,overLimit:this.oUpOverLimit.innerHTML,upOneFailed:this.oUpOneFailed.innerHTML,upSomeFailed:this.oUpSomeFailed.innerHTML,upAllFailed:this.oUpAllFailed.innerHTML},fileCountSingle:YAHOO.util.Dom.getElementsByClassName("single","span",w("upload-total-files"))[0].innerHTML,fileCountPlural:YAHOO.util.Dom.getElementsByClassName("plural","span",w("upload-total-files"))[0].innerHTML,bytesCount:w("upload-total-bytes").innerHTML,pageTitleStatus:YAHOO.util.Dom.getElementsByClassName("title-status","li",w("upload-templates"))[0].innerHTML.replace("%pagetitle",document.title),pageTitleProcessing:YAHOO.util.Dom.getElementsByClassName("title-processing","li",w("upload-templates"))[0].innerHTML.replace("%pagetitle",document.title),pageTitleDefault:document.title};this.lastState=null;var M=(isIE&&navigator.appVersion.indexOf("MSIE 6")!=-1);var b=(navigator.userAgent.match(/firefox/i));if(b){YAHOO.util.Dom.addClass(z.oStatus,"firefox");}this.getControl=function(){var C="yUpload";z.oControl=(isIE?window[C]:document[C]);};this.getMaxFileSize=function(C){var O=(C=="video");var i=z.maxFileSize[(O?"fs_video":"fs_default")];return i;};this.getModerationSettings=function(){var G=w("moderation_container");var O=G.getElementsByTagName("input");var H=null;var C=null;for(var L=O.length;L--;){if(O[L].name&&!O[L].disabled&&((O[L].type=="radio"&&O[L].checked)||(O[L].type=="checkbox"&&O[L].checked)||O[L].type=="hidden")){H=O[L].name.indexOf("_0")!=-1?O[L].name.substr(0,O[L].name.lastIndexOf("_0")):O[L].name;C=(O[L].name=="safety_level"||O[L].name=="content_type"?parseInt(O[L].value)+1:O[L].value);if(O[L].name=="hidden"){C=(O[L].checked?2:1);}z.params[H]=C;}}var p=_ge("is_friend_0");var E=_ge("is_family_0");if(!p.disabled){z.params["is_friend"]=(p.checked?1:0);}if(!E.disabled){z.params["is_family"]=(E.checked?1:0);}};this.checkContentSettings=function(){return ({"is_restricted":w("restricted").checked,"is_default":(_default_content_type_restricted==1)});};this.checkRestrictedRules=function(){var p=w("video_restricted");var L=YAHOO.util.Dom.hasClass(p,"open");function O(){p.style.position="absolute";p.style.top="-9999px";p.style.height="auto";p.className=i;var H=p.offsetHeight-4;p.style.overflow="hidden";p.style.height="1px";p.style.position="relative";p.style.top="0px";E=new YAHOO.util.Anim(p,{height:{from:1,to:H},opacity:{from:0,to:1}},0.33,YAHOO.util.Easing.easeBothStrong);E.onComplete.subscribe(function(){p.style.height="auto";p.style.overflow="";});E.animate();}function C(){p.style.overflow="hidden";E=new YAHOO.util.Anim(p,{height:{from:p.offsetHeight-4,to:1},opacity:{to:0}},0.33,YAHOO.util.Easing.easeBothStrong);E.onComplete.subscribe(function(){p.className=i;p.style.overflow="";});E.animate();}var E=null;if(z.data.videoCount>0&&w("restricted").checked){var i="open";if(z.data.videoCount==z.data.fileCount){i+=" video-only";}else{i+=" mixed-content";}if(_default_content_type_restricted==1){i+=" default";}else{i+=" non-default";}if(!w("moderation").className.match(/open/i)){toggleModeration();upPage.toggle();}if(!L&&i.indexOf("open")!=-1){O();}else{if(L&&i.indexOf("open")==-1){C();}else{p.className=i;}}return false;}else{C();return true;}};this.checkNonProVideo=function(){if(global_ispro){return true;}else{var C=false;var O=null;for(O in z.files){if(z.files[O].fileType=="video"){C=true;break;}}if(C){z.oUpNoVideo.style.display="block";}else{z.oUpNoVideo.style.display="none";}}};this.setState=function(C){if((C=="canceled"||C=="failed")&&z.lastState=="ok"){return false;}if(z.lastState){YAHOO.util.Dom.removeClass(z.oStatus,z.lastState);}z.lastState=C;YAHOO.util.Dom.addClass(z.oStatus,C);};this.setPageTitle=function(C,O,E){try{var L=(typeof C!="undefined"?z.strings[C].replace(O,E):z.strings["pageTitleDefault"]);if(document.title!=L){document.title=L;}}catch(i){}};this.setPageIcon=function(C){if(!b){return false;}if(!C){var C="/favicon.ico";}if(w("oldPageIcon")){w("oldPageIcon").parentNode.removeChild(w("oldPageIcon"));}link=document.createElement("link");link.id="oldPageIcon";link.href=C;link.type=(isIE?"image/vnd.microsoft.icon":"image/ico");link.rel=(isIE?"shortcut icon":"icon");document.getElementsByTagName("head")[0].appendChild(link);};this.File=function(O){var C=this;this.o=null;this.oWidth=0;this.oCheckbox=null;this.oRemove=null;this.complete=false;this.state="default";this.lastState=this.state;this.nextState=null;this.oData=O;this.oStub=document.createElement("div");this.bestDate=O.bestDate;this.bestDateStamp=null;this.data={id:O.id,url:O.url,bytesTotal:O.bytesTotal,mDate:O.mDate,cDate:O.cDate,debugInfo:[],bytesUploaded:0,lastBytesUploaded:0};this.isExcluded=false;this.fileType=W.getFileType(this.data.url);this.maxFileSize=W.getMaxFileSize(this.fileType);this.isOversize=(this.data.bytesTotal>this.maxFileSize);if(this.fileType=="video"&&(!global_ispro||_video_offline)){this.isOversize=false;this.isExcluded=true;W.excludedFiles++;}if(this.isOversize){this.isExcluded=true;W.oversizeFiles++;W.excludedFiles++;}this.poll={retryCount:0,pendingResponse:0,pollCount:0,pollCountSegments:4,pollOffset:0};this.timeoutTimer=null;this.oAnimPoll=null;this.ticket=null;this.isOverLimit=false;this.allowUpload=(!this.isExcluded);this.reset=function(){if(C.state=="error"){C.setTooltip("");C.data.bytesUploaded=0;C.data.lastBytesUploaded=0;C.nextState=null;C.setState("default");C.animateColor("#000");if(C.oAnimPoll){C.oAnimPoll.stop();}C.o.style.backgroundPosition=(-W.barWidth+"px 0px");}};this.timeoutCheck=function(){C.timeoutTimer=null;if(C.state=="uploading"){W.doFileError(C);C.setTooltip("file upload stall/timeout");W.oControl.cancel(C.data.id);W.refreshProgress();window.setTimeout(W.uploadNextFile,1000);}};this.setTimeoutEvent=function(){if(C.timeoutTimer){window.clearTimeout(C.timeoutTimer);}C.timeoutTimer=window.setTimeout(C.timeoutCheck,u.FILE_TIMEOUT);};this.animatePollingTween=function(){if(!C||C.nextState=="ok"||C.nextState=="error"){return false;}var i=parseInt(this.getAttribute("marginLeft"));if(isNaN(i)||(this.currentFrame<this.totalFrames&&i==0)){return false;}C.poll.pollOffset=i;C.o.style.backgroundPosition=(i+"px 0px");};this.animateColor=function(L){var i=new YAHOO.util.ColorAnim(C.o,{color:{to:L}},u.ANIM,YAHOO.util.Easing.easeBoth);i.animate();};this.resetBackground=function(){C.oSelect.style.backgroundPosition="50% 32px";};this.animateOut=function(){var i=new YAHOO.util.BgPosAnim(C.o,{backgroundPosition:{from:[-W.barWidth+C.oWidth,0],to:[-W.barWidth+C.oWidth,24],unit:["px","px"]}},u.ANIM,YAHOO.util.Easing.bounceOut);var L=new YAHOO.util.BgPosAnim(C.oSelect,{backgroundPosition:{from:[50,24],to:[50,5],unit:["%","px"]}},u.ANIM,YAHOO.util.Easing.bounceOut);C.resetBackground();C.setState(C.nextState);C.resetBackground();if(C.nextState=="ok"){i.onComplete.subscribe(function(){C.o.style.backgroundImage="none";});}i.animate();L.animate();};this.animateProcessingOut=function(){var L=-W.barWidth+parseInt(C.data.bytesUploaded/C.data.bytesTotal*C.oWidth);var i=new YAHOO.util.BgPosAnim(C.o,{backgroundPosition:{from:[C.poll.pollOffset,0],to:[L,0],unit:["px","px"]}},u.ANIM,u.EASE);i.onComplete.subscribe(function(){C.animateOut();});i.animate();};this.animatePoll=function(G){var E=-W.barWidth+C.oWidth;var H=E-W.barOffset;var p=H;var i=E;C.poll.pollOffset=p;var L=new YAHOO.util.Anim(C.oStub,{marginLeft:{from:H,to:E}},G,YAHOO.util.Easing.easeNone);L.onTween.subscribe(C.animatePollingTween);C.oAnimPoll=L;window.setTimeout(function(){L.animate();},u.ANIM*1000);};this.startPolling=function(){C.animatePoll(W.poll.delay*(Math.pow(2,W.poll.retryCountMax))/1000);};this.onUploadComplete=function(){};this.onComplete=function(){C.complete=true;C.animateColor("#999");C.nextState="ok";C.animateProcessingOut();W.removeFile(C.data.id);W.updateTicketRequests();};this.onError=function(){C.nextState="error";C.animateProcessingOut();C.data.bytesUploaded=0;C.poll.pollCount=0;C.animateColor("#cc3333");};this.setState=function(i){if((i=="canceled"||i=="failed")&&C.lastState=="ok"){return false;}if((C.isExcluded||C.isOverLimit)&&i=="ok"){return false;}if(C.lastState){YAHOO.util.Dom.removeClass(C.o,C.lastState);}C.state=i;C.lastState=i;YAHOO.util.Dom.addClass(C.o,i);};this.setSelected=function(i){if(i){return C.select();}else{return C.deselect();}};this.select=function(){if(!C.isSelected){YAHOO.util.Dom.addClass(C.o,"selected");C.isSelected=true;return true;}return false;};this.deselect=function(){if(C.isSelected){YAHOO.util.Dom.removeClass(C.o,"selected");C.isSelected=false;return true;}return false;};this.focus=function(){var H=w("uploadr-scroll");var L=parseInt(C.o.offsetHeight);var p=parseInt(C.o.offsetTop);var E=parseInt(H.offsetHeight);var Z=parseInt(H.scrollTop);var G=((p+L)>(Z+E));var i=(Z>p);if((G||i)&&!H._isScrolling){var m=new YAHOO.util.Scroll(H,{scroll:{to:[0,p-(G?L:0)]}},u.ANIM*2,u.EASE);H._isScrolling=true;m.onComplete.subscribe(function(){H._isScrolling=false;});m.animate();}C.oWidth=parseInt(W.oList.offsetWidth);};this.setTooltip=function(L,i){if(typeof i=="undefined"){i="";}C.data.debugInfo[C.data.debugInfo.length]=L+i;if(_show_tooltips!="1"){return false;}C.o.getElementsByTagName("div")[0].innerHTML=(C.data.url.indexOf("/")==-1?C.data.url:C.data.url.substr(C.data.url.lastIndexOf("/")))+(L?" <b>A/D: "+L+i+"</b>":"");C.o.title=L.unescape_from_xml();};this.init=function(){var i=0;C.o=w("tmpl-upload-item").cloneNode(true);C.oSelect=C.o.getElementsByTagName("div")[2];C.o.id="";C.o.title=C.data.url+" - "+new Date(C.bestDate).toLocaleString();C.o.getElementsByTagName("div")[0].innerHTML=(C.data.url.indexOf("/")==-1?C.data.url:C.data.url.substr(C.data.url.lastIndexOf("/")));C.oRemove=C.o.getElementsByTagName("a")[0];YAHOO.util.Event.addListener(C.oRemove,"click",C.removeAndDestruct,C);var L=C.o.getElementsByTagName("div")[1];L.innerHTML=L.innerHTML.replace("%filesize",F.format_file_size(C.data.bytesTotal));if(C.isExcluded){C.setState("oversize");i=1;}W.oOffline.appendChild(C.o);C.oWidth=parseInt(W.oList.offsetWidth);if(!C.oWidth){C.oWidth=(global_ispro?736:400);}C.poll.pollOffset=-W.barWidth+C.oWidth-W.barOffset;return i;};this.setData=function(L){var i=null;for(i in L){C.data[i]=L[i];}};this.refreshProgress=function(i){if(i){C.data.bytesUploaded=C.data.bytesTotal;}var p=(C.data.bytesUploaded==C.data.bytesTotal);if(p&&!C.o._isAnimating&&C.lastState!="processing"&&C.lastState!="complete"){C.setState("processing");C.resetBackground();C.startPolling();}else{if(!C.complete&&C.lastState!="uploading"&&C.lastState!="processing"){C.setState("uploading");}}var E=-W.barWidth+parseInt(C.data.bytesUploaded/C.data.bytesTotal*(C.oWidth-W.barOffset));if(!C.o._isAnimating&&C.data.lastBytesUploaded==0&&C.data.bytesUploaded==C.data.bytesTotal){var H=-W.barWidth+parseInt(C.data.lastBytesUploaded/C.data.bytesTotal*(C.oWidth-W.barOffset));C.o._isAnimating=true;var L=new YAHOO.util.BgPosAnim(C.o,{backgroundPosition:{from:[H,0],to:[E,0],unit:["px","px"]}},u.ANIM,u.EASE);L.onComplete.subscribe(function(){C.o._isAnimating=false;C.setState("processing");});L.animate();}else{if(!C.o._isAnimating&&C.state!="failed"){C.o.style.backgroundPosition=(E+"px 0px");}}C.data.lastBytesUploaded=C.data.bytesUploaded;};this.remove=function(){if(C.isOversize){W.oversizeFiles--;}if(C.isExcluded){W.excludedFiles--;}if(!W.uploadStarted){C.o.parentNode.removeChild(C.o);}};this.removeAndDestruct=function(i){W.removeFile(C.data.id);YAHOO.util.Event.preventDefault(i||event);return false;};this.destruct=function(){C.o=null;C=null;};};this.fileExists=function(L){var i=false;var C=null;var O=null;for(C in z.files){i=true;for(O in z.files[C].oData){if(O!="id"&&(z.files[C]).oData[O]!=L[O]){i=false;}}if(i){return true;}}return false;};this.addFile=function(O){if(z.files[O.id]){return false;}if(z.fileExists(O)){return false;}z.files[O.id]=new z.File(O);var C=z.files[O.id].init();if(C==0){z.data.fileCount++;if(z.files[O.id].fileType=="video"){z.data.videoCount++;}z.data.bytesTotal+=parseInt(O.bytesTotal);}if(z.isEmpty){z.isEmpty=false;z.setStep("step2");}};this.selectFiles=function(C){z.oControl.browseMultiple(z.fileTypes);YAHOO.util.Event.preventDefault(C||event);return false;};this.setStep=function(C){var O=w("uploadr");if(!YAHOO.util.Dom.hasClass(O,C)){O.className=C+(global_ispro?" pro":"");}};this.removeFile=function(C,O){if(!z.files[C]||z.uploadStarted){return false;}if(!z.files[C].isExcluded){z.data.fileCount--;z.data.bytesTotal-=parseInt(z.files[C].data.bytesTotal);}if(z.files[C].fileType=="video"){z.data.videoCount--;}z.files[C].remove();z.oControl.removeFile(z.files[C].data.id);z.files[C].destruct();delete z.files[C];z.doEmptyCheck();if(!O){W.refreshTotals();W.refreshMessages();}};this.removeAllFiles=function(){for(var C in z.files){z.removeFile(z.files[C].data.id,true);}W.ref