if(typeof(window.yj_share_btn)==="undefined"||!yj_share_btn){function PofeeDefine(){}pofeeDefine=new PofeeDefine();pofeeDefine.STYLE_NONE="none";yj_share_btn={button_type:"1",request_url:undefined,box_align1:"right",box_offset_x1:0,box_offset_y1:0,box_align2:"right",box_offset_x2:0,box_offset_y2:0,addEvent:function(c,a,b){if(c.addEventListener){c.addEventListener(a,b,false)}else{if(c.attachEvent){c.attachEvent("on"+a,b)}}},cumulativeOffset:function(b){var a=0,c=0;do{a+=b.offsetTop||0;c+=b.offsetLeft||0;b=b.offsetParent}while(b);return{top:a,left:c}},isDefined:function(a){return(typeof(a)==="undefined"||!a)?"":a},isInteger:function(a){return(parseInt(a,10)==a)},init:function(){var a=window;var c={yj_share_btn_src:a.yj_share_btn_src,yj_share_btn_done_url:a.yj_share_btn_done_url,yj_share_btn_title:a.yj_share_btn_title,yj_share_btn_comment:a.yj_share_btn_comment,yj_share_btn_primary_url:a.yj_share_btn_primary_url,yj_share_btn_pc_url:a.yj_share_btn_pc_url,yj_share_btn_mob_url:a.yj_share_btn_mob_url,yj_share_btn_smp_url:a.yj_share_btn_smp_url,yj_share_btn_img_url:a.yj_share_btn_img_url,yj_share_btn_mixi_check_key:a.yj_share_btn_mixi_check_key,yj_share_btn_mixi_content_rating:a.yj_share_btn_mixi_content_rating,yj_share_btn_type1:a.yj_share_btn_type1,yj_share_btn_type2:a.yj_share_btn_type2,yj_share_btn_box_align1:a.yj_share_btn_box_align1,yj_share_btn_box_offset_x1:a.yj_share_btn_box_offset_x1,yj_share_btn_box_offset_y1:a.yj_share_btn_box_offset_y1,yj_share_btn_box_align2:a.yj_share_btn_box_align2,yj_share_btn_box_offset_x2:a.yj_share_btn_box_offset_x2,yj_share_btn_box_offset_y2:a.yj_share_btn_box_offset_y2};for(var b in c){c[b]=this.isDefined(c[b]);c[b]=a.encodeURIComponent(c[b])}this.button_type1=c.yj_share_btn_type1;this.button_type2=c.yj_share_btn_type2;var d=c.yj_share_btn_box_align1;this.box_align1=(d==="left")?"left":"right";d=c.yj_share_btn_box_offset_x1;this.box_offset_x1=this.isInteger(d)?parseInt(d,10):0;d=c.yj_share_btn_box_offset_y1;this.box_offset_y1=this.isInteger(d)?parseInt(d,10):0;var d=c.yj_share_btn_box_align2;this.box_align2=(d==="left")?"left":"right";d=c.yj_share_btn_box_offset_x2;this.box_offset_x2=this.isInteger(d)?parseInt(d,10):0;d=c.yj_share_btn_box_offset_y2;this.box_offset_y2=this.isInteger(d)?parseInt(d,10):0;d=c.yj_share_btn_done_url;c.yj_share_btn_done_url=(d)?d:a.encodeURIComponent(document.URL);d=c.yj_share_btn_title;c.yj_share_btn_title=(d)?d:a.encodeURIComponent(document.title);this.request_url="http://share.yahoo.co.jp/render/box/?.done="+c.yj_share_btn_done_url+"&.src="+c.yj_share_btn_src+"&title="+c.yj_share_btn_title+"&comment="+c.yj_share_btn_comment+"&primary_url="+c.yj_share_btn_primary_url+"&pc_url="+c.yj_share_btn_pc_url+"&mob_url="+c.yj_share_btn_mob_url+"&smp_url="+c.yj_share_btn_smp_url+"&img_url="+c.yj_share_btn_img_url+"&mixi_check_key="+c.yj_share_btn_mixi_check_key+"&mixi_content_rating="+c.yj_share_btn_mixi_content_rating},render:function(){var a='<img src="http://i.yimg.jp/images/pofee/btn/__BUTTON__ alt="シェアする" id="yjPofeeButton" style="cursor:pointer" />';var h=this.button_type1;var f=(h==1)?'h22_a.gif" width="79" height="22"':(h==2)?'h30_a.gif" width="89" height="30"':(h==3)?'h34_a.gif" width="85" height="34"':(h==4)?'h38_a.gif" width="100" height="38"':(h==5)?'h38_big_a.gif" width="123" height="38"':(h==6)?'h22_c.gif" width="130" height="22"':(h==7)?'h30_c.gif" width="136" height="30"':(h==8)?'h34_c.gif" width="141" height="34"':(h==9)?'h38_c.gif" width="88" height="38"':'h38_big_c.gif" width="209" height="38" ';var g=this.button_type2;var d=(g==1)?'h22_a.gif" width="79" height="22"':(g==2)?'h30_a.gif" width="89" height="30"':(g==3)?'h34_a.gif" width="85" height="34"':(g==4)?'h38_a.gif" width="100" height="38"':(g==5)?'h38_big_a.gif" width="123" height="38"':(g==6)?'h22_c.gif" width="130" height="22"':(g==7)?'h30_c.gif" width="136" height="30"':(g==8)?'h34_c.gif" width="141" height="34"':(g==9)?'h38_c.gif" width="88" height="38"':'h38_big_c.gif" width="209" height="38" ';document.write('<style type="text/css">@import url(http://i.yimg.jp/images/pofee/css/yj_share_btn_out.css);</style>');var c=document.getElementById("share_button1");if(c){var e=a.replace("yjPofeeButton","yjPofeeButton1");e=e.replace("__BUTTON__",f);c.innerHTML=e}var b=document.getElementById("share_button2");if(b){var e=a.replace("yjPofeeButton","yjPofeeButton2");e=e.replace("__BUTTON__",d);b.innerHTML=e}},setBoxPos:function(b){var a=document.getElementById("yjPofeeButton"+b);var h=document.getElementById("yjPofeeBox");var d=this.cumulativeOffset(a);if(b==1){var g=this.box_align1;var c=this.box_offset_y1;var e=this.box_offset_x1}else{if(b==2){var g=this.box_align2;var c=this.box_offset_y2;var e=this.box_offset_x2}}var j=a.offsetHeight;var i=d.top+j+c;var f=d.left+e;if(g==="right"){f+=a.offsetWidth-h.offsetWidth}h.style.top=i+"px";h.style.left=f+"px"},getBoxPos:function(b){var a=document.getElementById("yjPofeeButton"+b);var h=document.getElementById("yjPofeeBox");var d=this.cumulativeOffset(a);if(b==1){var g=this.box_align1;var c=this.box_offset_y1;var e=this.box_offset_x1}else{if(b==2){var g=this.box_align2;var c=this.box_offset_y2;var e=this.box_offset_x2}}var j=a.offsetHeight;var i=d.top+j+c;var f=d.left+e;if(g==="right"){f+=a.offsetWidth-h.offsetWidth}return{top:i,left:f}},initEventHandler:function(){var a=this;var b=function(){var i=a.request_url;var j=document.createElement("div");j.id="yjPofeeOn";j.style.display="none";j.innerHTML='<div id="yjPofeeBox">    <div id="yjPofeeBoxIn">        <h3 class="yjPofeeH3">            <span class="yjPofeeH3Brd clearfix">                <label>おすすめ情報をみんなにシェアしよう！</label>                <span id="yjPofeeWinClose" title="閉じる">閉じる</span><a href="http://help.yahoo.co.jp/help/jp/common/common-02.html" id="yjPofeeLinkHelp">ヘルプ</a>            </span>        </h3>        <div id="yjPofeeMain">            <div id="yjPofeeContent" >            <iframe id="yjPofeeContentIframe" height="300" frameborder="0" src="'+i+'"></iframe>            </div>         </div>    </div></div>';document.body.appendChild(j);document.getElementById("yjPofeeOn").style.display="block"};function c(k){if(!document.getElementById("yjPofeeOn")){b();a.setBoxPos(k);var i=document.getElementById("yjPofeeWinClose");a.addEvent(i,"click",e)}else{if(a.isBoxPosOwn(k)){var j=document.getElementById("yjPofeeOn");document.body.removeChild(j)}else{var j=document.getElementById("yjPofeeOn");document.body.removeChild(j);b();a.setBoxPos(k);var i=document.getElementById("yjPofeeWinClose");a.addEvent(i,"click",e)}}}var h=function(){c(1)};var g=function(){c(2)};var e=function(){var i=document.getElementById("yjPofeeOn");document.body.removeChild(i)};var f=document.getElementById("yjPofeeButton1");if(f){this.addEvent(f,"click",h)}var d=document.getElementById("yjPofeeButton2");if(d){this.addEvent(d,"click",g)}},isBoxPosOwn:function(c){var a=this.getBoxPos(c);var b=document.getElementById("yjPofeeBox");a.top+="px";a.left+="px";if(a.top==b.style.top&&a.left==b.style.left){return true}else{return false}},execute:function(){this.init();this.render();this.initEventHandler()}};yj_share_btn.execute()};
