';rotate_div.innerHTML=html,_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(){photo_notes.hide_rotate_div()},window.save_rotation=function(rotation){photo_notes.save_rotation(rotation)},this.restack_notes()},onmouseover:function(){clearTimeout(this.hide_tim),this.shown_initially?window.should_I_ignore_stuff_because_of_button_action||window.should_I_ignore_stuff_because_of_editable_div_action||global_comm_div.comming||(this.isOver=1,this.change_display()):this.tried_to_show_before_shown_initially=1},go_away_in_a_bit:function(){this.hide_tim=setTimeout("_ge('photo_notes').take_her_away('go_away_in_a_bit');",1300)},restack_notes:function(){function get_prop(item){return item.box.w*item.box.h}function sort_func(a,b){var a2=get_prop(a),b2=get_prop(b);return a2',swf_html+='',swf_html+="",swf_html+='',this.rotate_swf_html=swf_html}-1!=navigator.userAgent.indexOf("KHTML")?this.insert_rotate_swf_and_show_tim=setTimeout("_ge('photo_notes').insert_rotate_swf_and_show()",50):""==_ge("rotate_span").innerHTML?this.insert_rotate_swf_and_show():(rotate_div.style.visibility="visible",global_single_shadow_div.style.visibility="visible"),global_single_shadow_div.style.display="block",_set_single_shadow_x(x),_set_single_shadow_y(y),_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,this.button_acting&&this.button_acting.enable_others()},save_rotation:function(rotation){this.hide_rotate_div(),"-90"==rotation&&(rotation=270),"-180"==rotation&&(rotation=180),this.start_comming(F.output.get("photo_notes_rotate"));var params={photo_id:this.p_id,degrees:rotation};F.API.callMethod("flickr.photos.transform.rotate",params,this)},flickr_photos_transform_rotate_onLoad:function(success,responseXML,responseText){success?document.location=page_current_url+"?rotated=1&cb="+(new Date).getTime():(alert(F.output.get("api_err_generic")+" "+responseText),this.stop_comming())},make_note_this_color:function(color){var last_color=this.last_note_color?this.last_note_color:"yellow";if(last_color!=color){F.border_radius&&(_ge("notes_text_table").style.backgroundColor=this.hex_colors[color]),_ge("notes_text_area").style.backgroundColor=this.hex_colors[color];var tds=null;if(F.border_radius)tds=this.getElementsByTagName("div");else{tds=this.getElementsByTagName("td");for(var imgs=this.getElementsByTagName("IMG"),i=0;i"+which_note.author_name+" ["+F.output.get("deleted")+"]"):which_note.from_owner||which_note.person||(txt+=' - '+which_note.author_name+""),_ge("notes_text_span").innerHTML=txt,this.which_note=which_note;var notes_text_area=_ge("notes_text_area");this.editing?(_ge("notes_text_span").style.display="none",_ge("notes_text_form").style.display="block",_ge("notes_text_buttons_form").style.display="block","photo_note_temp"==this.which_note.id||this.which_note.new_note?_ge("delete_note_button").style.display="none":_ge("delete_note_button").style.display="inline",which_note==this.which_note&&""!=notes_text_area.value||(notes_text_area.value=which_note.saved_txt,adjust_textarea_height(notes_text_area))):(_ge("notes_text_span").style.display="inline",_ge("notes_text_form").style.display="none",_ge("notes_text_buttons_form").style.display="none"),which_note.person?(_ge("notes_text_area").style.display="none",_ge("notes_text_content").style.display="block",_ge("notes_text_content").innerHTML=which_note.saved_txt):(_ge("notes_text_area").style.display="",_ge("notes_text_content").style.display="none",_ge("notes_text_content").innerHTML=""),_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(),this.editing&&!which_note.person&&(notes_text_area.focus(),notes_text_area.select()),which_note.configured_for_showing=!0}},check_note_for_prop:function(){if(_ge("photo_props")&&"undefined"!=typeof page_p&&page_p.isOwner&&1==page_p.isOwner){var notes_text_area=_ge("notes_text_area");"ho ho ho beard"==notes_text_area.value||"ho ho ho hat"==notes_text_area.value?_ge("photo_prop_"+this.which_note.note_id)&&"none"==_ge("photo_prop_"+this.which_note.note_id).style.display&&("ho ho ho beard"==notes_text_area.value&&(_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"),"ho ho ho hat"==notes_text_area.value&&(_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")):_ge("photo_prop_"+this.which_note.note_id)&&"block"==_ge("photo_prop_"+this.which_note.note_id).style.display&&(_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(note_x,note_y){var notes_text_div=_ge("notes_text_div");if(note_x&¬e_y)var nx=note_x,ny=note_y+this.which_note.get_note_h()+5;else{if(this.editing)var allowed_under=0,allowed_over=200;else allowed_under=100,allowed_over=200;nx=_pi(this.which_note.style.left);(ny=_pi(this.which_note.style.top)+this.which_note.get_note_h()+5)+notes_text_div.offsetHeight>this.get_image_h()+allowed_under&&(ny=_pi(this.which_note.style.top)-notes_text_div.offsetHeight-10,F.is_ie&&-1==navigator.userAgent.indexOf("Opera")&&(ny+=15)),ny<-allowed_over&&(ny=_pi(this.which_note.style.top)+this.which_note.get_note_h()+5)}notes_text_div.style.left=nx+"px",notes_text_div.style.top=ny+"px",_set_single_shadow_x(nx),_set_single_shadow_y(ny)},stop_showing_one:function(from_w){_ge("notes_text_div").style.display="none",global_single_shadow_div.style.display="none",F.people_taggr&&F.people_taggr.dragProxy&&Y.D.setStyle(F.people_taggr.dragProxy,"display",""),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,F.people_taggr&&F.people_taggr.dragProxy&&Y.D.setStyle(F.people_taggr.dragProxy,"display","none")},start_editing_one:function(which_note){this.editing=1,this.dragging=0,window.should_I_ignore_stuff_because_note_editing=1,F.people_taggr&&F.people_taggr.dragProxy&&Y.D.setStyle(F.people_taggr.dragProxy,"display","none"),this.start_showing_one(which_note)},hide_notes_text_div:function(){_ge("notes_text_div").style.display="none",global_single_shadow_div.style.display="none"},refresh_notes:function(person_updated){if(_ok_for_scrumjax_xml()){var params={photo_id:this.p_id};person_updated?F.API.callMethod("flickr.photos.people.getList",params,this):F.API.callMethod("flickr.photos.getInfo",params,this)}else document.location=page_current_url+"?changednotes=1&cb="+(new Date).getTime()},flickr_photos_people_getList_onLoad:function(success,responseXML,responseText,params){if(success){for(var note,A=global_photos[this.p_id].personNotesA=[],people_notes=responseXML.documentElement.getElementsByTagName("person"),n=0,len=people_notes.length;n
',html+='
',note_div.innerHTML=html,this.appendChild(note_div),F.decorate(note_div,F._photo_note).note_go_go_go(note_id,can_edit,from_owner,author_name,author,note_text,person_nsid,0),_ge("photo_props")&&"undefined"!=typeof page_p&&page_p.isOwner&&1==page_p.isOwner){_ge("photo_prop_temp")&&F.remove_el(_ge("photo_prop_temp"),_ge("photo_props"));var prop_div=document.createElement("DIV");prop_div.className="photo_prop",prop_div.id="photo_prop_"+note_id,prop_div.style.left=note_x+3+"px",prop_div.style.top=note_y+3+"px",prop_div.style.width=note_w-4+"px",prop_div.style.height=note_h-4+"px",prop_div.style.display="ho ho ho beard"==note_text||"ho ho ho hat"==note_text?"block":"none";var prop_img=document.createElement("IMG");prop_img.className="trans_png",prop_img.id="photo_prop_img_"+note_id,prop_img.style.width=note_w-4+"px",prop_img.style.height=note_h-4+"px",prop_img.src=_images_root+"/spaceball.gif",prop_img.src="ho ho ho beard"==note_text?_images_root+"/prop_santa_beard.png":"ho ho ho hat"==note_text?_images_root+"/prop_santa_hat.png":_images_root+"/spaceball.gif",prop_div.appendChild(F.prepare_for_insertion(prop_img)),_ge("photo_props").appendChild(F.prepare_for_insertion(prop_div))}return note_div},delete_note:function(skipApiCall){if(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(this.which_note.person?"photo_notes_deleting_face_boundry":"photo_notes_deleting")),_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")),this.which_note.person&&!skipApiCall){var params={user_id:this.which_note.nsid,photo_id:this.p_id};F.API.callMethod("flickr.photos.people.deleteCoords",params,this)}else if(skipApiCall)this.which_note.person&&this.removeChild(_ge("person-note-"+this.which_note.nsid));else{params={note_id:this.which_note.note_id};F.API.callMethod("flickr.photos.notes.delete",params,this)}},flickr_photos_notes_delete_onLoad:function(success,responseXML,responseText){success||responseText&&-1!=responseText.indexOf("not found")||(alert(F.output.get("api_err_generic")+" "+responseText),this.stop_comming()),this.refresh_notes()},flickr_photos_people_deleteCoords_onLoad:function(success,responseXML,responseText,params){success||responseText&&-1!=responseText.indexOf("not found")||(alert(F.output.get("api_err_generic")+" "+responseText),this.stop_comming()),success&¶ms.user_id&&(F.people_taggr.resetRemoveLinkByNsid(params.user_id),this.removeChild(_ge("person-note-"+params.user_id))),this.refresh_notes(!0)},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(),"photo_note_temp"!=this.which_note.id&&!this.which_note.new_note||(F.remove_el(this.which_note,this),_ge("photo_prop_temp")&&_ge("photo_props")&&F.remove_el(_ge("photo_prop_temp"),_ge("photo_props"))),this.which_note.new_note&&this.which_note.person&&F.people_taggr.resetRemoveLinkByNsid(this.which_note.nsid)},empty_notes_text_area:function(){_ge("notes_text_area").value=""},save_editing:function(){var notes_text_area=_ge("notes_text_area");if(""==notes_text_area.value&&!this.which_note.person)return notes_text_area.focus(),void notes_text_area.select();if(deja_view_uh_huh(),this.which_note.stop_editing(0),this.editing=0,this.stop_showing_one(),this.which_note.person){this.start_comming(F.output.get("photo_notes_saving_face_boundry"));var params={photo_id:this.p_id,user_id:this.which_note.nsid,person_x:this.which_note.get_note_x()/this.get_note_ratio(),person_y:this.which_note.get_note_y()/this.get_note_ratio(),person_w:this.which_note.get_note_w()/this.get_note_ratio(),person_h:this.which_note.get_note_h()/this.get_note_ratio()};this.which_note.new_note=!1,F.API.callMethod("flickr.photos.people.editCoords",params,this)}else if("photo_note_temp"==this.which_note.id){this.start_comming(F.output.get("photo_notes_saving_note"));params={photo_id:this.p_id,note_x:this.which_note.get_note_x()/this.get_note_ratio(),note_y:this.which_note.get_note_y()/this.get_note_ratio(),note_w:this.which_note.get_note_w()/this.get_note_ratio(),note_h:this.which_note.get_note_h()/this.get_note_ratio(),note_text:notes_text_area.value};F.API.callMethod("flickr.photos.notes.add",params,this),F.remove_el(this.which_note,this)}else{this.start_comming(F.output.get("saving"));params={note_id:this.which_note.note_id,note_x:this.which_note.get_note_x()/this.get_note_ratio(),note_y:this.which_note.get_note_y()/this.get_note_ratio(),note_w:this.which_note.get_note_w()/this.get_note_ratio(),note_h:this.which_note.get_note_h()/this.get_note_ratio(),note_text:notes_text_area.value};F.API.callMethod("flickr.photos.notes.edit",params,this)}this.empty_notes_text_area()},flickr_photos_notes_add_onLoad:function(success,responseXML,responseText){success?this.refresh_notes():(alert(F.output.get("api_err_generic")+" "+responseText),this.stop_comming(),_ge("photo_prop_temp")&&F.remove_el(_ge("photo_prop_temp"),_ge("photo_props")))},flickr_photos_notes_edit_onLoad:function(success,responseXML,responseText){success?this.refresh_notes():(alert(F.output.get("api_err_generic")+" "+responseText),this.stop_comming())},flickr_photos_people_editCoords_onLoad:function(success,responseXML,responseText){success?this.refresh_notes(!0):(alert(F.output.get("api_err_generic")+" "+responseText),this.stop_comming())},flickr_test_echo_onLoad:function(success,responseXML,responseText){success||(alert(F.output.get("api_err_generic")+" "+responseText),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 imgs=_ge("photoImgDiv"+this.p_id).getElementsByTagName("img");return imgs[0]&&imgs[0].width?imgs[0].width:0},get_image_h:function(){var imgs=_ge("photoImgDiv"+this.p_id).getElementsByTagName("img");return imgs[0]&&imgs[0].height?imgs[0].height:0},change_display:function(){this.isOver?(this.style.visibility="visible",_ge("photo_props")&&(_ge("photo_props").style.display="")):this.style.visibility="hidden"},check_for_mouseover:function(){0===Y.D.getElementsByClassName("photo-note-mouseover","div",this).length&&Y.D.removeClass(this,"dim")}},F._photo_note={note_go_go_go:function(note_id,can_edit,from_owner,author_name,author,note_text,person_nsid,deleted){this.note_id=note_id,this.can_edit=can_edit,this.author_name=author_name,this.author=author,this.from_owner=from_owner,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.deleted=deleted,this.box_div=this.childNodes[0],this.innermost_div=this.box_div.childNodes[0].childNodes[0].childNodes[0],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=note_text,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,!0),Y.U.Event.addListener(this.box_div,"mouseout",this.handle_mouseout,this,!0),this.can_edit&&(Y.U.Event.addListener(this.box_div,"mousedown",this.handle_mousedown,this,!0),this.box_div.style.cursor=F.is_ie?"hand":"pointer"),person_nsid&&F.decorate(this,F._person_note).note_go_go_go(person_nsid,"temp"===note_id)},make_resize_div:function(which){var ref="resize_"+which+"_div",photo_note=this,el=document.createElement("DIV");return el.style.position="absolute",el.style.display="none",el.style.cursor=which+"-resize",el.style.top="ne"==which||"nw"==which?"0px":this.get_note_h()-this.resize_box_size+"px",el.style.left="sw"==which||"nw"==which?"0px":this.get_note_w()-this.resize_box_size+"px",el.style.backgroundColor="#fff",el.innerHTML='