document.writeln("<div style=\"width:340px; position:absolute; right:10px; top:20px; border:3px solid #c6c6c6; background-color:#fff; padding:10px; display:block; overflow:visible;z-index:20;\" id=\"unionBox\">");
document.writeln(" <p style=\"font-size:14px;\"><a href=\"javascript:void(0)\" class=\"at_trace_s\" style=\"background-position:-15px 0; margin:0;\" onclick=\"hideBox()\"></a>推广此页<\/p>");
if ($.cookie("unstatus") == 1 || $.cookie("unstatus") == '1') {
    document.writeln(" <p class=\"mt10\">您的推广链接：<span class=\"at_text t_1_d mb5\" style=\"vertical-align:middle;\"><input type=\"text\" value=\"http:\/\/www.zhubajie.com\" name=\"password\" id=\"user_url\" style=\"width:180px;\"><\/span> <span id=\"tg_flashCopy_buts\" style=\"position:relative;top:5px; width:50px; overflow:hidden; display:inline-block\"></span><\/p>");
}
else {
    document.writeln(" <p class=\"mt10\">您尚未加入推广联盟，请立即加入<a href=\"http://union.zhubajie.com/\" style=\"color:#0080C8;font-weight:bold;\" target=\"_blank\">推广联盟<\/a><\/p>");
}
document.writeln("<style>.tjrowmor a{ color:#0080C8;}.tjnew_info{display:inline-block;width:25px;height:27px;background:url(http://s.zbjimg.com/p/help/img/new_icon.gif) no-repeat;position:absolute;left:25px;top:-7px;}.tjunion_new{position:relative;z-index:20; width:30px;}</style>")
document.writeln(" <p class=\"mt5\" style=\"color:#666;\">赶快邀请您的朋友加入猪八戒网，丰厚现金奖励等你拿！<\/p>");
document.writeln("<p class=\"mt5 tjrowmor\"><a href=\"http://union.zhubajie.com/\" target=\"_blank\" style=\"font-weight:bold;\">更多推广工具</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http://quan.zhubajie.com/mtag/index-tagid-1730.html\" target=\"_blank\">推广经验交流<a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http://help.zhubajie.com/main/list-typeid-91.html\" target=\"_blank\">查看奖励规则</a><\/p>");
document.writeln("<\/div> ");
if ($.cookie("userid")) {
    $("#user_url").val("http://un.zhubajie.com/r/?u=" + $.cookie("userid") + "&l=" + location.href);
    var tg_flashCopy_buts = new copyTextButton("tg_flashCopy_buts", "http://s.zbjimg.com/as/copyText.swf");
    tg_flashCopy_buts.setText($("#user_url").val());
    $("#unionBox").css("visibility", "hidden");
}
else {
    $("#unionBox").css("visibility", "hidden");
}
function showUnion(){
    if ($.cookie("userid")) {
        $("#unionBox").css("visibility", "visible");
    }
    else {
        if (at_userData() == null) {
            function _call_(){
                window.location.reload()
            }
            //at_loginUse.open(_call_, _call_);
            at_loginUse.open(_call_, "", "", "您需要登录才能获取推广代码");
        }
    }
}

function hideBox(){
    $("#unionBox").css("visibility", "hidden");
}

$("#user_url").mouseover(function(){
    this.select()
});
