<!--
//-------------------------------------------------------------------------
//  YOSOPOGET
//-------------------------------------------------------------------------
function getYosopo ( eid, crm ) {

    // ※ CHECK
    if ( !eid || !crm ) {
        //return;
    }

    document.getElementById( 'cnt' ).style.zIndex   = 100;

    // ※ INIT
    var pos = YAHOO.util.Dom.getXY( 'getbtn' );
    pos[0]  -= 120;
    YAHOO.util.Dom.setXY( 'cnt', pos );
    clearContainer();

    disabledButton();

    // ▽ GETURL
    $uri    = "/ajax/yosopoget.html?eid=" + eid + "&crm=" + crm;

    // ▽ WAIT
    waitContainerR();


    // ▽ AJAX
    var request = YAHOO.util.Connect.asyncRequest( 'GET', $uri, {
        // SUCCESS
        success:function ( o ) {
            // ▽ JSON CONV
            jdata   = JSON.parse( o.responseText );
            if ( jdata.sts == 0 ) {

                // ERR
                str_html    = '<table cellpadding="5" cellspacing="0" border="0" width="300"><tr>' +
                            '<td>' + jdata.err_msg.replace( /(\r\n|\n)/gi, '<br>' ) + '</td>' +
                            '</tr><tr>' +
                            '<td align="right"><a href="#" onclick="clearContainer();return false;"><small>閉じる</small></a></td>' +
                            '</tr></table>';

                pos[0]  -= 200;
                YAHOO.util.Dom.setXY( 'cnt', pos );
                msgContainerR( str_html );

            } else if ( jdata.sts == -1 ) {

                // LOGIN
                window.location.href    = 'https://login.yahoo.co.jp/config/login?.src=yosou&lg=jp&.intl=jp&.done=http%3A%2F%2Fyosou.yahoo.co.jp%2F';

            } else if ( jdata.sts == -2 ) {

                // UREG
                window.location.href    = '/ureg.html';

            } else {

                // GET
                str_html    = '<table width="380" cellspacing="0" cellpadding="6" border="0" bgcolor="#ffffff">' +
                              '<tbody>' +
                              '<tr>' +
                              '<td width="1%" rowspan="2"><img width="88" height="126" alt="ヨソポをゲット！" src="http://i.yimg.jp/images/sports/yosou/common/character/get_yosopon.gif"/></td>' +
                              '<td width="99%" style="font-size: 90%;"><div style="font-size: 150%; font-weight: bold;">' +
                              '<span style="font-size: 150%; color: rgb(232, 0, 0); font-family: Verdana,Arial,Helvetica,sans-serif; font-weight: 800;">' + jdata.data.add_p + '</span>' +
                              ' ヨソポゲット！</div><br/>' +
                              '<span style="font-weight: bold;font-size: 120%;">現在のヨソポ</span><br>' + 
                              '<span style="font-weight: bold;font-size: 130%;">' + jdata.data.pre_p + '</span> ヨソポ　→　' +
                              '<span style="color: rgb(232, 0, 0); font-weight: bold;;font-size: 150%;">' + jdata.data.point + '</span> ヨソポ</td>' +
                              '</tr>' +
                              '<tr>' +
                              '<td style="text-align: right; vertical-align: bottom; font-size: 80%;"><a href="#" onclick="getYosopoRd( location.href ); return false;"><b>ヨソポを更新して閉じる</b></a></td>' +
                              '</tr>' +
                              '</tbody>' +
                              '</table>';


                pos[0]  -= 280;
                YAHOO.util.Dom.setXY( 'cnt', pos );
                msgContainerR( str_html );

            }

        },
        // FAIL
        failure:function ( o ) {
        }
    }, null );

}
function getYosopoRd ( url ) {
    url = url.replace( /#$/gi, '' )
    location.href   = url;
}
function disabledButton () {
    str_html    = '<div class="yosopo_get_box" title="1日1回、「ヨソポゲットボタン」を押して、ヨソポを増やそう！">' +
            '<p class="bt_yosopo_noget"><a href="#" id="getbtn" title="ヨソポをゲット！">' +
            '<span>ヨソポをゲット！</span></a></p></div>' +
            '<div class="helpicon"><a href="http://help.yahoo.co.jp/help/jp/yosou/yosou-15.html">' +
            '<img src="http://i.yimg.jp/images/common/helpicon.gif" width=13 height=15 alt="ヘルプ"></a></div>';
    document.getElementById( 'getbox' ).innerHTML  = str_html;
}
//-->

