// Copyright (c) 2007, Yahoo! Inc. All rights reserved. Code licensed under the BSD License:http://developer.yahoo.net/yui/license.txt Copyright (C) 2011 Yahoo Japan Corporation. All Rights Reserved. Built on 2011-12-14 15:21:54 if(typeof YAHOO=="undefined"||typeof YAHOO.util.Dom=="undefined"||typeof YAHOO.util.Event=="undefined"||parseFloat(YAHOO.env.modules.yahoo.version)<2.3||parseFloat(YAHOO.env.modules.dom.version)<2.3||parseFloat(YAHOO.env.modules.event.version)<2.3){throw new Error("Userbadge depends on yahoo-dom-events.js(ver2.3.0 or later)");}YAHOO.namespace("identity.dic");YAHOO.namespace("identity.lib.define");YAHOO.namespace("identity.lib.util");YAHOO.namespace("identity.lib.widget");YAHOO.namespace("identity.lib.template");YAHOO.namespace("identity.cfg");YAHOO.namespace("identity.xhr");YAHOO.namespace("identity.box");YAHOO.namespace("identity.user");YAHOO.namespace("identity.template");YAHOO.identity.lib.util.Anim=function(B,A,C,D){if(!B){}this.init(B,A,C,D);};YAHOO.identity.lib.util.Anim.prototype={patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(A,C,B){return this.method(this.currentFrame,C,B-C,this.totalFrames);},setAttribute:function(A,C,B){if(this.patterns.noNegatives.test(A)){C=(C>0)?C:0;}YAHOO.util.Dom.setStyle(this.getEl(),A,C+B);},getAttribute:function(A){var C=this.getEl();var E=YAHOO.util.Dom.getStyle(C,A);if(E!=="auto"&&!this.patterns.offsetUnit.test(E)){return parseFloat(E);}var B=this.patterns.offsetAttribute.exec(A)||[];var F=!!(B[3]);var D=!!(B[2]);if(D||(YAHOO.util.Dom.getStyle(C,"position")=="absolute"&&F)){E=C["offset"+B[0].charAt(0).toUpperCase()+B[0].substr(1)];}else{E=0;}return E;},getDefaultUnit:function(A){if(this.patterns.defaultUnit.test(A)){return"px";}return"";},setRuntimeAttribute:function(B){var G;var C;var D=this.attributes;this.runtimeAttributes[B]={};var F=function(H){return(typeof H!=="undefined");};if(!F(D[B]["to"])&&!F(D[B]["by"])){return false;}G=(F(D[B]["from"]))?D[B]["from"]:this.getAttribute(B);if(F(D[B]["to"])){C=D[B]["to"];}else{if(F(D[B]["by"])){if(G.constructor==Array){C=[];for(var E=0,A=G.length;E0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.identity.lib.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B0&&!(L[0] instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};})();YAHOO.identity.lib.define={DEBUG:false,YIMG_BASE:"http://i.yimg.jp/images/socialproducts/common/usercard/v4.0/",YIMG_BASE_SSL:"https://s.yimg.jp/images/socialproducts/common/usercard/v4.0/",ACTIONS_IFRAME_HOST:"http://badge.social.yahoo.co.jp",ACTIONS_IFRAME_HOST_SSL:"https://s.badge.social.yahoo.co.jp",ACTIONS_IFRAME_PATH_FAVORITE:"/favorite/confirm",ACTIONS_IFRAME_PATH_FRIEND:"/friend/edit",ACTIONS_IFRAME_PATH_MESSAGE:"/message/edit",ACTIONS_IFRAME_PATH_IGNORE:"/ignore/confirm",YIMG_DIC_UTF8_JS:"js/dic.utf8.js",YIMG_DIC_EUC_JS:"js/dic.euc.js",YIMG_IMAGEROTATION_JS:"js/imagerotation.js",YIMG_BOX_JS:"js/box.js",AD_BLOCK_FUNCTION_START:"yfab_start",AD_BLOCK_FUNCTION_STOP:"yfab_end"};YAHOO.identity.lib.util.extendObject=function(A,C){for(var B in C){A[B]=C[B];}return A;};YAHOO.identity.lib.util.syncAddListener=function(A){var C=10;if(!A||!A.check||!A.exec){return false;}var B=function(E){var D=false;try{D=E.check();}catch(F){}if(D){E.args?E.exec(E.args):E.exec();}else{if(YAHOO.env.ua.ie>=6){window.setTimeout(function(){B.call(this,E);},C);}else{window.setTimeout(B,C,E);}}};if(YAHOO.env.ua.ie>=6){window.setTimeout(function(){B.call(this,A);},C);}else{window.setTimeout(B,C,A);}};YAHOO.identity.lib.util.buildQuery=function(B){var A=[];for(k in B){if(!B.hasOwnProperty(k)||typeof B[k]=="undefined"){continue;}A.push(k+"="+B[k]);}return A.length?"?"+A.join("&"):"";};YAHOO.identity.lib.util.makeElement=function(I,D,C){if(arguments.length==2&&(D instanceof Array||typeof D=="string")){C=D;D=null;}if(YAHOO.env.ua.ie>=6&&((I.toLowerCase()=="input"&&D&&D["type"]=="radio")||(I.toLowerCase()=="input"&&D&&D["type"]=="checkbox")||I.toLowerCase()=="map")){var H=I.toLowerCase();var E="";for(var A in D){if(!D.hasOwnProperty(A)){continue;}E+=" "+A.toLowerCase()+'="'+D[A]+'"';}E="<"+H+E+">";return document.createElement(E);}var G=document.createElement(I);if(D){for(var A in D){if(!D.hasOwnProperty(A)){continue;}if(A=="class"){YAHOO.util.Dom.addClass(G,D[A]);}else{G.setAttribute(A,D[A]);}}}if(C!=null){if(C instanceof Array){for(var F=0;F=1.9||B.ie>=8||A()==true||B.webkit>=419)&&B.opera==0)?true:false;};YAHOO.identity.lib.util.getDate=function(){var B=new Date();var D=B.getFullYear();var A=B.getMonth()+1;var C=B.getDate();A=(A<10)?"0"+A:""+A;C=(C<10)?"0"+C:""+C;return D+A+C;};YAHOO.identity.lib.util.loadJS=function(C){if(!C||typeof C=="undefined"){return false;}var A=document.getElementsByTagName("head");if(!A||!A[0]){throw new Error("head element is not exist.");}var B=A[0];var D=document.createElement("script");D.setAttribute("type","text/javascript");D.setAttribute("src",C+"?"+YAHOO.identity.lib.util.getDate());B.appendChild(D);};YAHOO.identity.lib.util.loadCSS=function(D){if(!D||typeof D=="undefined"){return false;}var A=document.getElementsByTagName("head");if(!A||!A[0]){throw new Error("head element is not exist.");}var C=A[0];var B=document.createElement("link");B.setAttribute("rel","stylesheet");B.setAttribute("type","text/css");B.setAttribute("media","all");B.setAttribute("href",D+"?"+YAHOO.identity.lib.util.getDate());C.appendChild(B);};YAHOO.identity.lib.ad=function(E){if(!E){return false;}if(!YAHOO.identity.ad){var A={"src":"#adproxy","frameborder":"0"};var D=YAHOO.identity.lib.util.makeElement("iframe",A);D.style.visibility="hidden";D.style.width="1px";D.style.height="1px";YAHOO.identity.ad=document.body.appendChild(D);}var C="http://profiles.yahoo.co.jp",G="https://msg.profiles.yahoo.co.jp",F="/-/userbadge/ads/",B=YAHOO.identity.cfg.ssl?G:C;B+=F+"?type="+E+"&ts="+(new Date()).getTime();setTimeout(function(){YAHOO.identity.ad.src=B;},500);};(function(){var G=YAHOO.util.Event,H=YAHOO.util.Dom,F=YAHOO.identity,B=F.lib,C=F.user,A=B.util;YAHOO.identity.Messenger=function(){open("http://messenger.yahoo.co.jp/clicktochat.html?sendim="+C.yid,"_blank");};YAHOO.identity.MessengerC2C={};YAHOO.identity.MessengerC2C.checkLibrary=function(){return(typeof YMsgrInfo!="undefined");};YAHOO.identity.MessengerC2C.loadBadge=function(){var I=1;var E=2;var D=function(J){if(J==I){YAHOO.identity.Messenger=function(){open("ymsgrj:sendim?"+C.yid,"_top");};}else{if(J==E){YAHOO.identity.Messenger=function(){YMsgrInfo.openWebClient(C.yid);};}}var K=H.get("yahooIdentityUserCardTitleImIconAnchor");if(K){K.setAttribute("target","_self");if(J==I){K.setAttribute("href","ymsgrj:sendim?"+C.yid);}else{if(J==E){K.setAttribute("href","javascript:YMsgrInfo.openWebClient('"+C.yid+"');");}}}};YMsgrInfo.detectWebClientActive(function(K){if(K){D(E);}else{var J=YMsgrInfo.detectDesktopClientInstalled();if(J==true){D(I);}else{if(J==false){D(E);}else{}}}});};G.onDOMReady(function(){var E=YAHOO.identity.MessengerC2C;var D=function(){return(YAHOO.JP.lib.env.flash.isInstall&&YAHOO.JP.lib.env.flash.version>=8)?true:false;};if(E.checkLibrary()&&YAHOO.env.ua.ie!=9){document.body.appendChild(A.makeElement("div",{"id":"yahooIdentityUserCardMessengerDetector"}));A.syncAddListener({"check":function(){return H.inDocument("yahooIdentityUserCardMessengerDetector");},"exec":function(){YMsgrInfo.init(true,D(),"yahooIdentityUserCardMessengerDetector");}});if(H.inDocument("yahooIdentityUserCardTitleImIconAnchor")){G.addListener("yahooIdentityUserCardTitleImIconAnchor","mouseover",E.loadBadge);}}});})();if(typeof window["avt_getAvatar_jump"]!="function"){throw new Error("Userbadge depends on avatar_multi_nonlink.js");}YAHOO.identity.Init=function(){var M=YAHOO.util.Event,A=YAHOO.util.Dom,K=YAHOO.identity,I=K.lib,N=K.dic,G=K.template,F=K.user,B=K.cfg,H=I.define,L=I.util,C=YAHOO.env.ua;YAHOO.identity.BoxBridge=function(){L.syncAddListener({"check":function(){return(YAHOO.identity.Box)?true:false;},"exec":function(){YAHOO.identity.Box();}});if(!YAHOO.identity.Box){var D=B.ssl?H.YIMG_BASE_SSL:H.YIMG_BASE;L.loadJS(D+H.YIMG_BOX_JS);}};YAHOO.identity.EditProfile=function(){var E={"editImages":"photos/","editProfile":"aboutme/"};var D="http://profiles.yahoo.co.jp/-/edit/"+E[B.type];D+=L.buildQuery({"sp":F.oyuid,".src":B.src,".done":encodeURIComponent(location.href.replace(/\#(\w*)/,""))});open(D,"_top");};YAHOO.identity.ActionButton=function(){YAHOO.identity.cfg.type=this.childNodes[0].name;switch(B.type){case"confirmFavorite":case"editFriend":case"editMessage":case"confirmIgnore":YAHOO.identity.BoxBridge();return true;case"sendMessenger":YAHOO.identity.Messenger();return true;case"editImages":case"editProfile":YAHOO.identity.EditProfile();return true;default:for(var E=0;E=2){M.addListener(W,"mouseover",function(){A.addClass(this,"yahooIdentityUserCardActionButtonSubHighlight");});M.addListener(W,"mouseout",function(){if(!R){A.removeClass(this,"yahooIdentityUserCardActionButtonSubHighlight");}});}P.appendChild(W);var E=(function(Z){var d=D("div");var c=false;for(var b=1;b'+Y.label+'';}else{e.innerHTML=''+Y.label+"";M.addListener(e,"click",YAHOO.identity.ActionButton);}d.appendChild(e);}d.appendChild(D("div",{"class":"bottom"}));var a=(V.length-1)*25+3;if(c){a+=5;}A.setStyle(Z,"height",a+"px");return Z.appendChild(d);})(O);if(C.ie==7){A.setX(O,0);}A.setStyle(P,"display","block");P.removeAttribute("style");if(V.length>=2){var T=function(c){var Y=c.target||c.srcElement;if(!R){return false;}if(Y==W){M.removeListener(W,"click",S);}var a=A.getX(U);var Z=A.getY(U)+U.offsetHeight;if(C.gecko==1.8){a+=2;}var b=new L.Motion(E,{points:{to:[a,Z-O.offsetHeight],from:[a,Z]}},0.1,L.Easing.easeOut);b.onComplete.subscribe(function(){A.setStyle(O,"visibility","hidden");if(Y==W){M.addListener(W,"click",S);}});b.animate();A.removeClass(W,"yahooIdentityUserCardActionButtonSubHighlight");A.removeClass(W,"yahooIdentityUserCardActionButtonSubPushed");M.removeListener(document,"mouseup",T);R=false;};var S=function(b){if(R){return false;}var a=YAHOO.identity.MessengerC2C;if(a.checkLibrary()){a.loadBadge();}R=true;A.setStyle(O,"visibility","visible");A.addClass(W,"yahooIdentityUserCardActionButtonSubPushed");var Z=A.getX(U);var Y=A.getY(U)+U.offsetHeight;if(C.gecko==1.8){Z+=2;}A.setXY(O,[Z,Y]);(new L.Motion(E,{points:{from:[Z,Y-O.offsetHeight],to:[Z,Y]}},0.25,L.Easing.easeOut)).animate();M.addListener(document,"mouseup",T);};M.addListener(W,"click",S);}})();(function(){var O=A.get("yahooIdentityUserCardThumbnailInner");var Q=A.get("yahooIdentityUserCardThumbnailImage");var R=A.get("yahooIdentityUserCardThumbnailJsAvatar");if(!O||!Q||!R){return false;}var E=function(T){var S=T.getElementsByTagName("img");return(S.length==0)?false:S[0];};var D=function(S){var U=(typeof S=="string")?S:S.src;var T=/^http\:\/\/avtimg\.yahoo\.co\.jp\//i;return(U.match(T)!=null)?true:false;};var P=E(Q);if(D(P)){A.setStyle(P,"display","none");A.setStyle(R,"display","block");A.addClass(O,"yahooIdentityUserCardThumbnailInnerAvt");}})();if(B.src=="prf"){var J=B.ssl?H.YIMG_BASE_SSL:H.YIMG_BASE;L.loadJS(J+H.YIMG_IMAGEROTATION_JS);}};YAHOO.util.Event.onDOMReady(function(){var F=YAHOO.util.Dom,C=YAHOO.identity,G=C.lib.define,B=C.lib.util,H=C.cfg;if(H.exec!=false&&B.isSupportedBrowser()){try{F.get("yahooIdentityUserCardBody").getElementsByTagName("form")[0].style.display="none";}catch(E){}YAHOO.identity.cfg.enc=B.getCharSet();YAHOO.identity.cfg.ssl=B.isSsl();var A=H.ssl?G.YIMG_BASE_SSL:G.YIMG_BASE;if(!C.dic.Common){if(H.enc=="utf8"||YAHOO.env.ua.webkit){B.loadJS(A+G.YIMG_DIC_UTF8_JS);}else{if(H.enc=="euc"){B.loadJS(A+G.YIMG_DIC_EUC_JS);}else{return false;}}}B.syncAddListener({"check":function(){return YAHOO.identity.dic.Common?true:false;},"exec":YAHOO.identity.Init});}})