function PBB_loading(title,content,width,height,cssName,wins){
    var browserWidth = $(window).width(); //浏览器的宽
    var browserHieght = $(window).height(); //浏览器的高
    var scrollLeft = $(document).scrollLeft(); //滚动条的横位置
    var scrollTop = $(document).scrollTop(); //滚动条的竖位置
    
  var temp_float=new String;
  temp_float="<div id=\"floatBoxBg\" style=\"background:#000;filter:alpha(opacity=50);opacity:0.5;position:absolute;top:0;left:0;z-index:2000\"></div>";
  temp_float+="<div id=\"floatBox\" style=\"border:#666 5px solid;width:300px;position:absolute;top:50px;left:40%;z-index:2001\">";
  temp_float+="<div class=\"title\" style=\"height:23px;padding:7px 10px 0;background:#333;color:#fff;\"><h4 style=\"float:left;padding:0;margin:0;font-size:14px;line-height:16px;\"></h4><span style=\"float:right;cursor:pointer;\"> close </span></div>";
  temp_float+="<div class=\"content\" style=\"padding:20px 15px;background:#fff;\"></div>";
  temp_float+="</div>";
  $("body").prepend(temp_float);

$("#floatBox .title span").click(function(){
  $("#floatBoxBg").animate({opacity:"0"},"normal",function(){$(this).hide();});
  $("#floatBox").animate({top:-(scrollTop+(browserHieght/2))+"px"},"normal",function(){$(this).hide();}); 
  //$(document.documentElement).css({"overflow":"auto"});
  $("#floatBoxBg").remove();
});
if(wins==true)
{
$(window).load(function(){
  $("#floatBoxBg").animate({opacity:"0"},"normal",function(){$(this).hide();});
  $("#floatBox").animate({top:-(scrollTop+(browserHieght/2))+"px"},"normal",function(){$(this).hide();}); 
  //$(document.documentElement).css({"overflow":"auto"});
  $("#floatBoxBg").remove();
});
}
$("#floatBox .title h4").html(title);
contentType=content.substring(0,content.indexOf(":"));
content=content.substring(content.indexOf(":")+1,content.length);
switch(contentType){
  case "url":
  var content_array=content.split("?");
  $("#floatBox .content").ajaxStart(function(){
    $(this).html("loading...");
  });
  $.ajax({
    type:content_array[0],
    url:content_array[1],
    data:content_array[2],
	error:function(){
	  $("#floatBox .content").html("error...");
	},
    success:function(html){
      $("#floatBox .content").html(html);
    }
  });
  break;
  case "text":
  $("#floatBox .content").html(content);
  break;
  case "id":
  $("#floatBox .content").html($("#"+content+"").html());
  break;
  case "iframe":
  $("#floatBox .content").html("<iframe src=\""+content+"\" width=\"100%\" height=\""+(parseInt(height)-30)+"px"+"\" scrolling=\"auto\" frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\"></iframe>");
}

$("#floatBoxBg").show();
$("#floatBoxBg").animate({opacity:"0.5"},"normal");
$("#floatBox").attr("class","floatBox "+cssName);
$("#floatBox").css({display:"block",left:(scrollLeft+(browserWidth/2-width/2))+"px",top:"0px",width:width+"px",height:height});
$("#floatBox").animate({top:(scrollTop+(browserHieght/2))+"px"},"normal"); 
//$(document.documentElement).css({"overflow":"hidden"});
}
