﻿// ==UserScript==
// @name                弹出层
// @description         简易好用定制度高的一个弹出层框架
// @created date        2009/11/12   15:42
// @created author      Tiger(tigershi0507@gmail.com)
// @version             1.2.1
// @version owner       Copyright (C) 2009-2010 keerr.com All rights reserved.
// ==/UserScript==
/*************************************************
verified time 	:	2009/12/9   9:15
verified author	:	Tiger
verified purpose:	增加了floatbox_close这个关闭样式和jsclick动作
**************************************************/
/*************************************************
verified time 	:	2009/12/9   9:59
verified author	:	Tiger
verified purpose:	取消了相应的keypress事件
**************************************************/
/*************************************************
verified time 	:	2009/12/16   18:35
verified author	:	Tiger
verified purpose:	添加了确认“联系方式”
**************************************************/
/*************************************************
verified time 	:	2009/12/17   14:35
verified author	:	Tiger
verified purpose:	添加了确认“联系方式”的真实姓名
**************************************************/
/*************************************************
verified time 	:	2009/12/20   12:23
verified author	:	Tiger
verified purpose:	完成修改了弹出层的样式了
**************************************************/
/*************************************************
verified time 	:	2010/1/6   9:58
verified author	:	Tiger
verified purpose:	修复了ie6的一个定位bug
**************************************************/
/*************************************************
verified time 	:	2010/1/19   9:31
verified author	:	Tiger
verified purpose:	为setMap（）的地图修改ile宽高参数
**************************************************/
/*************************************************
verified time 	:	2010/1/29   8:57
verified author	:	Tiger
verified purpose:	修改了redirectIndex（），使其居中
**************************************************/
/*************************************************
verified time 	:	2010/3/9   15:22
verified author	:	Tiger
verified purpose:	修改了基本dom结构，去掉了冗余dom代码
**************************************************/
/********************************************************************
verified time 	:	2010/3/26   14:46
verified author	:	Tiger
verified purpose:	添加了“举报不良内容”的floatbox module
*********************************************************************/

//var scrollHeight = 0;
//$(function() {
//    $(document).scroll(function() {
//        $(this).;
//    });
//});


(function($) {
    $.floatbox = function(options) {
        var getWidth = function() {
            var version = parseInt($.prototype.jquery.match(/\d/gim)[1]);
            var width;
            if (version > 1) {
                width = $(window).width();
            } else {
                width = document.body.scrollWidth ? document.body.scrollWidth : document.documentElement.scrollWidth;
            }
            return width / 2;
        };
        var settings = $.extend(true, {
            bg: "floatbox-background",
            box: "floatbox-box",
            //content: "",
            button: "<p><a role='button' href='javascript:void(0);' class='close-floatbox'>Close</a></p>",
            desc: "This is a popup box, press esc key to close.",
            fade: false,
            ajax: null,
            bgConfig: {
                //position: ($.browser.msie) ? "absolute" : "fixed",
                //position: "fixed",
                position: ($.browser.version === "6.0") ? "absolute" : "fixed",
                zIndex: 1888,
                width: "100%",
                height: "100%",
                top: "0px",
                left: "0px",
                backgroundColor: "#000",
                opacity: "0.4",
                display: "none"
            },
            boxConfig: {
                //position: ($.browser.msie) ? "absolute" : "fixed",
                //position: "fixed",
                position: ($.browser.version === "6.0") ? "absolute" : "fixed",
                zIndex: 1889,
                width: getWidth() + "px",
                marginLeft: "-" + (getWidth() / 2) + "px",
                height: "auto",
                top: ($.browser.version === "6.0") ? $(document).scrollTop() + $(window).height() / 2 - 80 + "px" : $(window).height() / 2 + "px", //"50%",
                left: "50%",
                //backgroundColor: "#fff",
                display: "none"
            },
            content: {
                head: "百楼",
                summary: "",
                main: ""
            },
            afterClose: function() {
                ;
            },
            afterOpen: function() {
                ;
            }
        },
        options);
        var showBox = function() {

            var content = typeof settings.content.main === "string" ? settings.content.main : settings.content.main.clone();
            $("<div></div>")
            .bind("click",
				function() {
				    closeBox();
				}
			)
            .attr("id", settings.bg)
            .css(settings.bgConfig)
            .width(($.browser.msie) ? document.body.clientWidth : "100%")
			.height(($.browser.msie) ? document.body.clientHeight : "100%")
            //.width($("#aspnetForm").width())
            //.height($("#aspnetForm").height())
            //.width("100%")
            //.height("100%")
            .appendTo("body");

            // 绑定box
            var $_popbox =
                $("<div>" +
                '<table style="width: 100%;" id="pop_dialog_table" class="pop_dialog_table">' +
                    '<tbody><tr><td class="pop_topleft"></td><td class="pop_border pop_top"></td><td class="pop_topright"></td></tr>' +
                        '<tr>' +
                            '<td class="pop_border pop_side"></td>' +
                            '<td class="pop_content" id="pop_content">' +
                                '<h2 class="dialog_title"><span>百楼欢迎您</span><span class="poptip_close">X</span></h2>' +
                                '<div class="dialog_content">' +
                                    '<div class="dialog_summary">百楼欢迎您</div>' +
                                    '<div class="dialog_body">' +
            //'<div class="ubersearch search_profile">' +
                                            '<div class="result clearfix">' +
                                                '<div class="image">' +
                                                    '<span><img src="/images/tupian1.jpg" alt="百楼" class="photo" /></span>' +
                                                '</div>' +
                                                '<div class="info">' +
                                                    '<p><b>About David Walsh</b><br />' +
                                                        'David Walsh, Web Developer' +
                                                    '</p>' +
                                                    '<p></p>' +
                                                '</div>' +
                                                '<div class="clear"></div>' +
                                            '</div>' +
            //'</div>' +
                                    '</div>' +
                                    '<div class="dialog_buttons">' +
                                        '<span class="button button-main "><span><button>关闭</button></span></span>' +
                                        '<span class="button button-main "><span><button>关闭</button></span></span>' +
                                    '</div>' +
                                '</div>' +
                            '</td>' +
                            '<td class="pop_border pop_side"></td>' +
                        '</tr>' +
                        '<tr><td class="pop_bottomleft"></td><td class="pop_border pop_bottom"></td><td class="pop_bottomright"></td></tr>' +
                    '</tbody>' +
                '</table>' +
            "</div>");

            $_popbox.find(".dialog_title span:first").text(settings.content.head);
            settings.content.summary !== "" ? $_popbox.find(".dialog_summary").html(settings.content.summary) : $_popbox.find(".dialog_summary").remove();
            $_popbox.find(".dialog_body").html(settings.content.main);
            $_popbox.find(".dialog_buttons").html(settings.content.buttons);

            $_popbox
            .attr({
                id: settings.box,
                role: "alertdialog"
            })
            //.html(content)
            //.append(settings.button)
            .css(settings.boxConfig)
            .appendTo("body")
            //.append(content)
            .css("margin-top", "-" + $("#" + settings.box).height() / 2 + "px")
            .find(".poptip_close").click(function() {
                closeBox();
            })
            /*.
            find(".close-floatbox")
            .bind("click",
            function() {
            closeBox();
            })
            .find(".floatbox_close")
            .bind("click",
            function() {
            closeBox();
            return false;
            })
            */
            .end();

            if ($.isFunction(settings.afterOpen)) {
                settings.afterOpen();
            }
            else {
                return true;
            }

            if (settings.fade) {
                $("#" + settings.bg).fadeIn(200,
                function() {
                    $("div#" + settings.box).fadeIn(200);
                });
            } else {
                $("#" + settings.bg).show().parent().find("#" + settings.box).show();
            }
            if (settings.ajax) {
                $.ajax({
                    url: settings.ajax.url,
                    type: settings.ajax.params === "" ? "GET" : "POST",
                    data: settings.ajax.params,
                    dataType: "json",
                    cache: false,
                    timeout: 5000,
                    //contentType: "html",
                    beforeSend: function() {
                        //$("#" + settings.box).html(settings.ajax.before);
                        $(".sh_loading").show();
                    },
                    success: function(data) {
                        /*$("#" + settings.box).html(data).append(settings.button).find(".close-floatbox").bind("click",
                        function() {
                        closeBox();
                        }).end();*/
                        if ((data.state + "") === "1") {
                            if ($.isFunction(settings.ajax.succFun)) {
                                settings.ajax.succFun(data);
                            };
                        } else {
                            $.popMsgbox("服务器忙碌，请稍后重试", { score: "+0", lc: "-3" }, { top: $(document).scrollTop() + 100 });
                        }
                    },
                    complete: function(XMLHttpRequest, textStatus) {
                        /*if (settings.ajax.finish) {
                        settings.ajax.finish(XMLHttpRequest, textStatus);
                        }*/
                        //$(".sh_loading").hide();
                    },
                    error: function() {
                        $.popMsgbox("服务器忙，请稍后重试", { score: "+0", lc: "-3" }, { top: $(document).scrollTop() + 100 });
                    }
                });
            }

            
        };
        var closeBox = function() {
            if (settings.fade) {
                $("#" + settings.box).fadeOut(200,
                function() {
                    $("#" + settings.bg).fadeOut(200,
                    function() {
                        if ($.isFunction(settings.afterClose)) {
                            settings.afterClose();
                        }
                        else {
                            return true;
                        }
                        //$("#" + settings.box).remove();
                        //$("#" + settings.bg).remove();
                    });
                });
                setTimeout(function() {
                    $("#" + settings.box).remove();
                    $("#" + settings.bg).remove();
                },
                500);
            } else {
                $("#" + settings.box + ",#" + settings.bg).hide();
                setTimeout(function() {
                    $("#" + settings.box).remove();
                    $("#" + settings.bg).remove();
                },
                500);
                if ($.isFunction(settings.afterClose)) {
                    settings.afterClose();
                }
                else {
                    return true;
                }
            }
        };
        var init = function() {
            showBox();
            $(document)
            //            .one("keypress",
            //            function(e) {
            //                var escKey = $.browser.mozilla ? 0 : 27;
            //                if (e.which === escKey) {
            //                    closeBox();
            //                }
            //            })
            .one("keydown",
            function(e) {
                var escKey = $.browser.mozilla ? 0 : 27;
                if (e.which === escKey) {
                    closeBox();
                }
            });
            //if ($.browser.msie) {
            if ($.browser.version === "6.0") {
                //                $("body, html").css({
                //                    height: "100%",
                //                    width: "100%"
                //                });
                $(window).bind("scroll",
                function() {
                    $("#" + settings.box).css("top", document.documentElement.scrollTop + ($(window).height() / 2) - 80 + "px");

                });
            }
        };

        // 初始保护处理，保证只有一个floatout对象
        $("#floatbox-box, #floatbox-background").remove();
        init();
    };
})(jQuery);

/// <summary>
/// 发送留言
/// </summary>
/// <param name=""></param>
/// <param name=""></param>
function sendMsg(userid2) {
    $.floatbox({
        content: {
            head: "发送消息",
            summary: "",
            main: '<div class="result clearfix">' +
                        '<div class="info">' +
                            '<textarea name="bd" cols="45" rows="3" class="biaodan" id="txtMsg"></textarea>' +
                        '</div>' +
                        '<div class="clear"></div>' +
                    '</div>',
            buttons: '<span class="button button-main" onclick="subMsg(' + userid2 + ');"><span><button>确定</button></span></span>' +
                    '<span class="button button-main" onclick="$(\'.poptip_close\').click();"><span><button>取消</button></span></span>'
        },
        boxConfig: { width: "432px", marginLeft: "-" + 424 / 2 + "px" }
    });
    //$(".box_bg").css("opacity", "0.4");
}
function subMsg(userid2) {
    if ($("#txtMsg").val() != "") {
        $.ajax({
            url: "/ajax/GetJson.aspx",
            type: "post",
            dataType: "text",
            data: { type: "sendMsg", userid: userid2, content: $("#txtMsg").val() },
            timeout: 5000,
            cache: false,
            error: function() {
            },
            success: function(str) {
                if (str == "1") {
                    $('#floatbox-background').click();
                    //alert("留言成功");
                    $.popMsgbox("留言成功", { score: "+0", lc: "-3" }, { top: $(document).scrollTop() + 100 });
                }
                else if (str == "-1") {
                    $.popMsgbox("请先登录！", { score: "+0", lc: "-3" }, { top: $(document).scrollTop() + 100 });
                }
                else {
                    $.popMsgbox("服务器忙，请稍后重试", { score: "+0", lc: "-3" }, { top: $(document).scrollTop() + 100 });
                }
            }
        });
    }
}


/// <summary>
/// 引用设置
/// </summary>
/// <param name=""></param>
/// <param name=""></param>
function setup(confirmFun) {
    $.floatbox({
        content: {
            head: "设置",
            summary: "",
            main: '<div id="sub-nav" class="memberdttab" style="padding:0; margin:0;">' +
            //                    '<ul>' +
            //                        '<li class="selected" id="nav_set_1" style="cursor: pointer;"><a href="javascript:void(0);">新鲜事</a></li>' +
            //                        '<li id="nav_set_2" style="cursor: pointer;"><a href="javascript:void(0);">通知</a></li>' +
            //                    '</ul>' +
                    '<div class="clear"></div>' +
                '</div>' +
                '<div class="body opSetBd">' +
            //			        '<div class="nav_set_1">' +
            //				        '<p><label onclick="" for="r01"><input type="radio" checked="checked" value="8" name="feedType" id="r01" class="radio"/>允许自动获取此应用内容</label></p>' +
            //				        '<p><label onclick="" for="r03"><input type="radio" value="0" name="feedType" id="r03" class="radio"/>不允许自动获取此应用内容</label></p>' +
            //			        '</div>' +
            //'<div style="display: none;" class="nav_set_2">' +
            //    '<p><label for="r05"><input type="checkbox" name="inProfile" id="r05" class="checkbox"/>在个人主页中显示此应用</label></p>'+
            //'</div>'+
			        '<div style="display: ;" class="nav_set_1">' +
			            '<p><label for="r08"><input type="checkbox" checked="checked" name="notice" id="r08" class="checkbox"/>好友此应用更新时不在好友动态里显示</label></p>' +
				        '<p><label for="r08"><input type="checkbox" checked="checked" name="notice" id="r08" class="checkbox"/>好友此应用更新时以短消息的方式通知我</label></p>' +
			        '</div>' +
		        '</div>',
            buttons: '<span class="button button-main" onclick="' + confirmFun + '"><span><button>保存</button></span></span>' +
                    '<span class="button visible button-main" onclick="$(\'.poptip_close\').click();"><span><button>取消</button></span></span>'
        },
        boxConfig: { width: "432px", marginLeft: "-" + 424 / 2 + "px" },
        afterOpen: function() {
            $("#nav_set_1, #nav_set_2").toggleTabs(
                {
                    HiddenTabsCls: "",
                    ShownTabsCls: "selected",
                    ParentsCls: "memberdttab"
                }
            );
        }
    });
    $("#floatbox-background").css("opacity", "0.6").unbind("click");
}

/// <summary>
/// 反馈意见
/// </summary>
/// <param name=""></param>
/// <param name=""></param>
function sendResponse(confirmFun) {
    $.floatbox({
        content: {
            head: "用户反馈",
            summary: "",
            main: '<div id="mainWrapper" class="full clearfix"><div class="conContentBox"><h2 class="largeFont">我要提问题！</h2>' +
                        '<p><q>百楼的成长需要你的关爱。如果玩的不顺手，或是不知道怎么玩，请告诉我们你的宝贵意见，或直接联系我们：<br />客服电话：0574-28818312 <br />客服邮箱：hr@keerr.com <br />客服QQ：731608402' +
                        '<a href="http://sighttp.qq.com/cgi-bin/check?sigkey=51d611a9852645d3f187458e14983c5275335c46c0532e1e4bf3ce2eaea89999"; target=_blank; onclick="var tempSrc=\'http://sighttp.qq.com/wpa.js?rantime=\'+Math.random()+\'&sigkey=51d611a9852645d3f187458e14983c5275335c46c0532e1e4bf3ce2eaea89999\';var oldscript=document.getElementById(\'testJs\');var newscript=document.createElement(\'script\');newscript.setAttribute(\'type\',\'text/javascript\'); newscript.setAttribute(\'id\', \'testJs\');newscript.setAttribute(\'src\',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;"><img border="0" SRC=\'http://wpa.qq.com/pa?p=1:731608402:1\' alt="点击这里给我发消息"></a>' +
                        '</q></p><p class="footline"></p>' +
                        '<table class="tb">' +
                            '<tbody>' +
                                '<tr>' +
                                    '<th align="right">问题类型：</th>' +
                                    '<td width="224">' +
                                        '<select onchange="changeValue(this.options[selectedIndex].value)" id="type1" name="type1" gtbfieldid="1">' +
                                            '<option value="网页错误">网页错误</option>' +
                                            '<option value="建议">建议</option>' +
                                            '<option value="疑问">疑问</option>' +
                                        '</select><br />' +
                                    '</td>' +
                                    '<th width="101">发生时间：</th>' +
                                    '<td width="167">' +
                                        '<select id="time" name="time" gtbfieldid="2">' +
                                            '<option value="刚刚">刚刚</option>' +
                                            '<option value="一小时前">一小时前</option>' +
                                            '<option value="今天">今天</option>' +
                                            '<option value="这周">这周</option>' +
                                            '<option value="更早以前">更早以前</option>' +
                                        '</select>' +
                                    '</td>' +
                                '</tr>' +
                                '<tr>' +
                                    '<th align="right">QQ/MSN号：</th><td colspan="3"><input type="text" class="text" id="qqmsn" name="qqmsn" gtbfieldid="4" /></td>' +
                                '</tr>' +
                                '<tr>' +
                                    '<th></th><td colspan="3">留下您的QQ/MSN，能让我们更快的与您联系，进而快速为您解决问题</td>' +
                                '</tr>' +
                                '<tr>' +
                                    '<th align="right">Email/电话：</th><td colspan="3"><input type="text" class="text" id="contact" name="contact" gtbfieldid="5" /></td>' +
                                '</tr>' +
                                '<tr>' +
                                    '<th align="right">反馈内容：</th>' +
                                    '<td colspan="3">' +
                                        '<textarea class="txt" id="content" rows="5" cols="55" name="content"></textarea>' +
                                        '<span id="aTip" style="display: none;" class="importantText">' +
                                            '<img src="http://images.huotu.com/res_h/images/ico_invalid.gif" />' +
                                            '<font color="red">请描述您遇到的问题</font></span>' +
                                    '</td>' +
                                '</tr>' +
                            '</tbody></table></div></div>',
            buttons: '<span class="button button-main" onclick="' + "" + '"><span><button>提交反馈</button></span></span>' +
                    '<span class="button visible button-main" onclick="$(\'.poptip_close\').click();"><span><button>取消</button></span></span>'
        },
        boxConfig: { width: "690px", marginLeft: "-" + 690 / 2 + "px" }

    });
    $("#floatbox-background").css("opacity", "0.6").unbind("click");
}


/// <summary>
/// 删除好友
/// </summary>
/// <param name=""></param>
/// <param name=""></param>
function delFri(userid2, friendname) {
    $.floatbox({
        content: {
            head: "删除好友",
            summary: "",
            main: '<div class="result clearfix">' +
                        '<div class="image">' +
                            '<span><img src="/images/tupian1.jpg" alt="百楼" class="photo" /></span>' +
                        '</div>' +
                        '<div class="info">' +
                            '确定把“' + friendname + '”从我的好友里删除？' +
                        '</div>' +
                        '<div class="clear"></div>' +
                    '</div>',
            buttons: '<span class="button button-main" onclick="subDel(' + userid2 + ');"><span><button>确定</button></span></span>' +
                    '<span class="button button-main" onclick="$(\'.poptip_close\').click();"><span><button>取消</button></span></span>'
        },
        boxConfig: { width: "432px", marginLeft: "-" + 424 / 2 + "px" }
    });
    //$(".box_bg").css("opacity", "0.4");
}
function subDel(userid2) {
    $.ajax({
        url: "/ajax/GetJson.aspx",
        type: "post",
        dataType: "text",
        data: { type: "delFriend", userid: userid2 },
        timeout: 5000,
        cache: false,
        error: function() {
        },
        success: function(str) {
            if (str === "1") {
                $.friend.delFri(userid2); 
                
                $('#floatbox-background').click();
                $("#friend_" + userid2).remove();
                $.popMsgbox("删除成功", { score: "+0", lc: "-3" }, { top: $(document).scrollTop() + 100 });
            }
        }
    });
}

/// <summary>
/// 发送请求加为好友request
/// </summary>
/// <param name=""></param>
/// <param name=""></param>
function addFri(userid, username) {
    $.floatbox({
        content: {
            head: "加为好友",
            summary: "",
            main: '<div class="result clearfix">' +
                        '<div class="image">' +
                            '<span><img src="/images/tupian1.jpg" alt="百楼" class="photo" /></span>' +
                        '</div>' +
                        '<div class="info">' +
                            '确定把“' + username + '”加为好友？' +
                        '</div>' +
                        '<div class="clear"></div>' +
                    '</div>',
            buttons: '<span class="button button-main" onclick="sendAddFriRequest(' + userid + ');return false;"><span><button>确定</button></span></span>' +
                    '<span class="button button-main" onclick="$(\'.poptip_close\').click();"><span><button>取消</button></span></span>'
        },
        boxConfig: { width: "432px", marginLeft: "-" + 424 / 2 + "px" }
    });
    $(".box_bg").css("opacity", "0.4").css("height", $(".sc_k").height() + 8);
    if (document.location.pathname === "/admin/index.aspx" && $.browser.version === "6.0") {
        $("#floatbox-background").remove();
    }
}

/// <summary>
/// 发送关注request
/// </summary>
/// <param name=""></param>
/// <param name=""></param>
function FollowUser(userid) {
    $.ajax({
        url: '/ajax/GetJson.aspx',
        type: 'POST',
        dataType: 'text',
        timeout: 3000,
        data: 'type=FollowUser&userid=' + userid,
        cache: false,
        error: function() {
        },
        success: function(str) {
            if (str === "1") {
                $('#floatbox-background').click();
                $("#spfollow").remove();
                $.popMsgbox("关注成功", { score: "+0", lc: "-3" }, { top: $(document).scrollTop() + 100 });
            }
            else {
                $('#floatbox-background').click();
                $("#floatbox-box").remove();
                $.popMsgbox("关注失败，请稍后重试", { score: "+0", lc: "-3" }, { top: $(document).scrollTop() + 100 });
            }
        }
    });
}
function sendAddFriRequest(usr) {
    $.ajax({
        url: '/ajax/GetJson.aspx',
        type: 'POST',
        dataType: 'text',
        timeout: 3000,
        data: 'type=subAddFriends&friid=' + usr,
        cache: false,
        error: function() {
        },
        success: function(str) {
            if (str === "1") {
                $('#floatbox-background').click();
                $("#floatbox-box").remove();
                //alert("已向对方发送加为好友申请，敬请等待对方确认！");
                $.popMsgbox("发送请求成功，敬请等待", { score: "+0", lc: "-3" }, { top: $(document).scrollTop() + 100 });
            }
            else {
                $('#floatbox-background').click();
                $("#floatbox-box").remove();
                //alert("已向对方发送加为好友申请，敬请等待对方确认！");
                $.popMsgbox("已经向对方发出申请了，敬请等待", { score: "+0", lc: "-3" }, { top: $(document).scrollTop() + 100 });
            }
        }
    });
}



/// <summary>
/// 记录清空
/// </summary>
/// <param name=""></param>
/// <param name=""></param>
function confirmCleanAll() {
    $.floatbox({
        content: '<div class="box"><div class="box_bg"></div><div class="sc_k">' +
                    '<div class="sc_c">' +
                        '<div class="sc_ca"><img src="/images/tupian1.jpg" /></div>' +
                        '<div class="sc_cb">确定将访问记录全部清空么？</div>' +
                    '</div>' +
                    '<div class="sc_b">' +
                      '<div class="sc_ba">' +
                        '<div  class="sc_bb"><span class="button button-main"><span><button onclick="$(\'#floatbox-background\').click();">取消</button></span></span></div>' +
                        '<div  class="sc_bb"><span class="button button-main"><span><button onclick="">确定</button></span></span></div> ' +
                      '</div>' +
                    '</div>' +
                  '</div></div>',
        boxConfig: { width: "432px", marginLeft: "-" + 424 / 2 + "px" }
    });
    //$(".box_bg").css("opacity", "0.4");
}

/// <summary>
/// 登录成功后的跳转
/// </summary>
/// <param name=""></param>
/// <param name=""></param>
function redirectIndex(s) {
    $.floatbox({
        content: {
            head: "登录转接",
            summary: "",
            main: '<div class="result clearfix">' +
                        '<div class="info" style="text-align:center; float:none; margin:0 auto;">' +
                            'loading...正在跳转到' + s +
                            '<div><img src="/images/ajax-loader.gif" width="128" height="15" /></div>' +
                        '</div>' +
                        '<div class="clear"></div>' +
                    '</div>',
            buttons: ''
        },
        boxConfig: { width: "432px", marginLeft: "-" + 424 / 2 + "px" }
    });
    $("#floatbox-background").css("opacity", "0.6").unbind("click");
    $(".poptip_close").unbind("click");
}

/// <summary>
/// 发布点击上传后的提示
/// </summary>
/// <param name=""></param>
/// <param name=""></param>
function fbInform() {
    $.floatbox({
        content: {
            head: "提交检查",
            summary: "",
            main: '<div class="result clearfix">' +
                    '<div id="fb_result" style="text-align:center;line-height:22px;font-size:14px;">' +
                        '<div>上传中检查中...<img src="/images/ajax-loader.gif" width="128" height="15" /></div>' +
                    '</div>' +
                    '<div class="clear"></div>' +
                '</div>',
            buttons: '<span class="button button-main" onclick=""><span><button>确定</button></span></span>' +
                                '<span class="button button-main" onclick="$(\'.poptip_close\').click();"><span><button>取消</button></span></span>'
        },
        boxConfig: { width: "432px", marginLeft: "-" + 424 / 2 + "px" }
    });
    if ($.browser.version === "6.0") {
        $("#floatbox-background, #floatbox-box").bgiframe();
    }
    $("#floatbox-background").css("opacity", "0.6").unbind("click");
}






$(function() {
    $("input").focus(function() {
        $(this).select();
    });
});



/// <summary>
/// 地图设置
/// </summary>
/// <param name=""></param>
/// <param name=""></param>
function setMap() {
    $.floatbox({
        content: {
            head: "请拖动图标标注位置",
            summary: "",
            main: '<iframe id="iFrame1"  width="750px" height="436px"  frameborder="0" src="/admin/modules/map.html"></iframe>',
            buttons: '<span class="button visible button-main" onclick="document.getElementById(\'iFrame1\').contentWindow.saveXYZ();" style="display:none" id="butmap"><span><button type="button">保存位置</button></span></span>' +
            '<span class="button visible button-main" onclick="document.getElementById(\'iFrame1\').contentWindow.checkSave();$(\'.poptip_close\').click();"><span><button type="button">关闭窗口</button></span></span>'
        },
        boxConfig: { width: "785px", marginLeft: "-" + 785 / 2 + "px" },
        afterOpen: function() {
        }
    });
    $("#floatbox-background").css("opacity", "0.6").unbind("click");
}

