jQuery.extend({ShowWindow:function(type,title,message,height,width,modal,auto,goUrl,textStyle)
{
    //初始化，关闭曾打开过的Window
    $.HideWindow();
    if($("#Global_div_ShowWindow").html()==null)
    {
        $("body").append($("<div id=\"Global_div_ShowWindow\"></div>"));
        
    }
    $("#Global_div_ShowWindow").hide();
    $("#Global_div_ShowWindow").empty();
    var html="";
    var ul="";
    //根据type放不同的图片
    html+="<table width=\"100%\" height=\"80%\"><tr>";
    html+="<td width=\"36px\" valign=\"middle\">";
    switch(type)
    {
        case "info":html+="<img src=\"/Images/thickbox/info_big.gif\" />";break;
        case "alert":html+="<img src=\"/Images/thickbox/alert_big.gif\" />";break;
        case "error":html+="<img src=\"/Images/thickbox/error_big.gif\" />";break;
        case "success":html+="<img src=\"/Images/thickbox/success_big.gif\" />";break;
        case "loading":html+="<img src=\"/Images/thickbox/loading_big.gif\" />";break;
        case "nopic":html+="";break;
    }
    html+="</td>";
    html+="<td valign=\"middle\" style=\""+textStyle+"\">"+message+"</td>" ;
    html+="</tr></table>";

    $("#Global_div_ShowWindow").html(html);
    url="#TB_inline?height="+height+"&width="+width+"&inlineId=Global_div_ShowWindow&modal="+modal;
    tb_show(title, url, false);
    $("#Global_div_ShowWindow").empty();
    
    //自动关闭
    if(auto != undefined && auto == true)
    {
        setTimeout('$.HideWindow()',2000);
    }
    //跳转
    if(goUrl != undefined && goUrl != "" && goUrl != null)
    {
       setTimeout('window.location.assign("'+goUrl+'")',2000);
    }
    
},HideWindow:function()
{
 	$("#TB_imageOff").unbind("click");
	$("#TB_closeWindowButton").unbind("click");
	//$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
	$("#TB_window").hide();
	$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();
	$("#TB_load").remove();
	if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
		$("body","html").css({height: "auto", width: "auto"});
		$("html").css("overflow","");
	}
	document.onkeydown = "";
	document.onkeyup = "";
	return false;
}});
