function addBookmarkButton(location) {
    var _tag = "";
    _tag = [
        '<a href="http://b.hatena.ne.jp/append?' + location.href + '">',
        '  <img alt="append.gif" src="/images/bookmark/append.gif" alt="このエントリーをはてなブックマークする" title="このエントリーをはてなブックマークする" width="16" height="12" border="0" />',
        '</a>',
        '<a href="http://b.hatena.ne.jp/entry/' + location.href + '" target="_blank">',
        '  <img src="http://b.hatena.ne.jp/entry/image/' + location.href + '" alt="このエントリーをはてなブックマークする" title="このエントリーをはてなブックマークする" border="0" />',
        '</a>'
    ].join("");

    document.write(_tag);
}

function addTwitterButton(location, document) {
    var _tag = "";
    _tag = [
        '<a target="_blank" href="http://twitter.com/home/?status=',
        encodeURIComponent('「' + document.title + '」 #Rmake ' + location.href),
        '">twitterでつぶやく</a>'
    ].join("");
    
    document.write(_tag);
}

function openTestPlayer(id, type) {
    if (type == "NovelGame") {
        var win = new Window(
            {
                className: "alphacube",
                title: "テストプレー",
                //top: 520,
                width: 820,
                height: 820,
                top: 20,
                left: 100,
                url: "/testplay/" + id + "?testplay=true",
                okLabel: "終了する",
                destroyOnClose: true,
                minimizable: false,
                maximizable: false,
                draggable: false
            }
        );
        win.show(true);
    }
    else {
        var win = new Window(
            {
                className: "alphacube",
                title: "テストプレー",
                width: 1000,
                height: 460,
                url: "/testplay/" + id + "?testplay=true",
                okLabel: "終了する", 
                destroyOnClose: true,
                minimizable: false,
                maximizable: false,
                draggable: false
            }
        );
        win.showCenter(true);
    }
}