$.fn.imgBox = function(o) {
    var _othis = $(this);
    var obj = { 
	"html": $(this).html() ,//内联HTML代码
	"closeico":"image/icon_close.gif"//关闭按钮
	};
    var objs=$.extend(obj, o);
    var h = 0;
    if ($.browser.msie && $.browser.version < 7) {
        var scrollHeight = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
        var offsetHeight = Math.max(document.documentElement.offsetHeight, document.body.offsetHeight);
        if (scrollHeight < offsetHeight) {
            h = $(window).height() + 'px';
        } else {
            h = scrollHeight + 'px';
        }
    } else if ($.browser.opera) {
        h = Math.max(
			window.innerHeight,
			$(document).height()
		) + 'px';
    } else {
        h = $(document).height() + 'px';
    }
    if ($("#messboxprent").length <= 0)
        $(document.body).append("<div  id='messboxprent' class='modelcontent'></div>");
    $("#messboxprent")
	.css({ "height": h, "opacity": 0.70 })
	.show();
    if ($("#boxoooopen").length <= 0)
        $(document.body).append("<div class='boxoooopen' id='boxoooopen'>\
								<div class='box'></div><div class='tools'>\
								<img alt='关闭' id='imgboxclose' src='"+objs.closeico+"' style='cursor:pointer;' />\
								</div></div>");
    $("#imgboxclose").click(function() {
        $(this).imgBoxClose();
    });
    $(".box").html(objs.html);
    var ptop = $(document);
    $("#boxoooopen").css({
        "top": ptop.scrollTop() + 5,
        "left": ($("body").width() - $(".box").width()) / 2
    }).hide();
    $("#boxoooopen").slideDown("slow");
}
$.fn.imgBoxClose = function() {
    $("#messboxprent,#boxoooopen").hide();
    $("#messboxprent,#boxoooopen").remove();
}