function dialog(title,content,width,height,cssName,displayClose)
{
  var docE =document.documentElement;
  var _z=9000;//新对象的z-index
  var loadhtm = '<div class="aui_outer load_info" id="load_info"><div class="request_load"></div></div>';
    $("body").append(loadhtm);
    $('<div id="maskLayerLoad"></div>').appendTo("body").css({
      "background":"#000","opacity":".4","top":0,"left":0,"position":"absolute","zIndex":"8000"
    });
    reModelLoad();
    var leftl=($(window).width() - $(".load_info").outerWidth())/2;
    var topl=($(window).height() - $(".load_info").outerHeight())/2 + $(document).scrollTop();
    $(".load_info").css({position:"absolute","left":leftl,"top":topl,"display":"block","z-index":_z-(-1)});
    function reModelLoad(){
      var b = docE? docE : document.body,
      height = b.scrollHeight > b.clientHeight ? b.scrollHeight : b.clientHeight,
      width = b.scrollWidth > b.clientWidth ? b.scrollWidth : b.clientWidth;
      $("#maskLayerLoad").css({
        "height": height,"width": width
      });
    };
  contentType=content.substring(0,content.indexOf(":"));
  content=content.substring(content.indexOf(":")+1,content.length);
  switch(contentType){
    case "url":
    $.get(content, function(data){
      var temp_float='';
      temp_float+='<div class="aui_outer content_info" id="content_info"><table class="aui_border"><tbody><tr><td class="aui_nw"></td><td class="aui_n"></td><td class="aui_ne"></td></tr><tr><td class="aui_w"></td><td class="aui_c"><div class="aui_inner"><table class="aui_dialog"><tbody><tr><td class="aui_header" colspan="2"><div class="aui_titleBar"><div class="aui_title float_auititle" style="cursor: move;">请您登录</div><a href="javascript:;" class="aui_close">×</a></div></td></tr><tr><td class="aui_main" style="width: auto; height: auto; visibility: visible;"><div class="aui_content" style="padding: 0px;"><div style="min-width:760px" class="LocalDataMultiC float_ldac"><div style="height:auto;" class="data-row-list data-row-main float_main"></div></div></div></td></tr></tbody></table></div></td><td class="aui_e"></td></tr><tr><td class="aui_sw"></td><td class="aui_s"></td><td class="aui_se" style="cursor: se-resize;"></td></tr></tbody></table></div>';
      $("body").append(temp_float);
      $('<div id="maskLayer"></div>').appendTo("body").css({
        "background":"#000","opacity":".4","top":0,"left":0,"position":"absolute","zIndex":"8000"
      });
      $(".float_auititle").html(title);
      $(".float_ldac").css("min-width",width+"px");
     $(".float_main").html(data);
      reModel();
      $("#maskLayerLoad").remove();
      $(".load_info").remove();
      var _obj= $(".content_info");
      var _mv=false;//移动标记
      var _x,_y;//鼠标离控件左上角的相对位置 
      var _wid= _obj.width();
      var _hei= _obj.height();
      var _tit= _obj.find(".aui_title");
      var _cls =_obj.find(".aui_close");
      var left=($(window).width() - _obj.outerWidth())/2;
      var top=($(window).height() - _obj.outerHeight())/2 + $(document).scrollTop();
      _obj.css({position:"absolute","left":left,"top":top,"display":"block","z-index":_z-(-1)});
      _tit.mousedown(function(e){
        _mv=true;
        _x=e.pageX-parseInt(_obj.css("left"));//获得左边位置
        _y=e.pageY-parseInt(_obj.css("top"));//获得上边位置
        _obj.css({  "z-index":_z-(-1)}).fadeTo(50,.5);//点击后开始拖动并透明显示
      });
      _tit.mouseup(function(e){
        _mv=false;
        _obj.fadeTo("fast",1);//松开鼠标后停止移动并恢复成不透明         
      
      });
      
      $(document).mousemove(function(e){
        if(_mv){
          var x=e.pageX-_x;//移动时根据鼠标位置计算控件左上角的绝对位置
          if(x<=0){x=0};
          x=Math.min($(document).width()-_wid,x)-5;
          var y=e.pageY-_y;
          if(y<=0){y=0};
          y=Math.min($(document).height()-_hei,y)-5;
          _obj.css({
            top:y,left:x
          });//控件新位置
        }
      });
      _cls.live("click",function(){
          $("#maskLayer").remove();
          _obj.remove();
      });
      $(".DialogClose").live("click",function(){
          $("#maskLayer").remove();
          _obj.remove();
      })
      $(document).keydown(function(event) {
        if (event.keyCode == 27) {
          $("#maskLayer").remove();
          _obj.remove();
        }
      });
      function reModel(){
        var b = docE? docE : document.body,
        height = b.scrollHeight > b.clientHeight ? b.scrollHeight : b.clientHeight,
        width = b.scrollWidth > b.clientWidth ? b.scrollWidth : b.clientWidth;
        $("#maskLayer").css({
          "height": height,"width": width
        });
      };
    });
    break;
    case "text":
    $(".data-row-main").html('<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableall"><tr><td width="20" align="right"></td><td>'+content+'</td></tr></table>');
    break;
    case "id":
    $(".data-row-main").html($("#"+content+"").html());
    break;
    case "iframe":
    $(".data-row-main").html("<iframe src=\""+content+"\" width=\"100%\" height=\""+(parseInt(height)-30)+"px"+"\" scrolling=\"auto\" frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\"></iframe>");
  }
}
function alert_dialog(content,width,height,cssName,displayClose)
{
  if (width=='')
  {
    width="150px"
  }
  if (height=='')
  {
    height="auto"
  }
if(dialogFirst==true){
  var temp_float=new String;
  temp_float="<div class=\"AlertFloatBg\"  style=\"height:"+$(document).height()+"px;width:"+$(document).width()+"px; background-color:rgba(212,0,0,0.5); background:#f00\9; filter:alpha(opacity=50); opacity:0;\"></div>";
  temp_float+="<div class=\"AlertFloatBox\">";
  temp_float+="</div></div>";
  $("body").append(temp_float);
  $(".AlertFloatBox").css("width","117px");
  dialogFirst=true;
}
$('.AlertFloatBg').live('click', function() {
  $(".AlertFloatBg").remove();
  $(".AlertFloatBox").remove();
});
var seconds = 3;
window.setInterval(redirection, 1000);
function redirection()
{
  if (seconds <= 0)
  {
    window.clearInterval();
    return;
  }

  seconds --;

  if (seconds == 0)
  {
    window.clearInterval();
    $(".AlertFloatBg").remove();
    $(".AlertFloatBox").remove();
  }
}

contentType=content.substring(0,content.indexOf(":"));
content=content.substring(content.indexOf(":")+1,content.length);
switch(contentType){
  case "success":
  $(".AlertFloatBox").html('<div class="save_success"><div class="save_txt">'+content+'</div></div>');
  break;
  case "fail":
  $(".AlertFloatBox").html('<div class="save_fail"><div class="save_txt">'+content+'</div></div>');
  break;
}

$(".AlertFloatBg").show().css("opacity", 0);
if (cssName)
{
  $(".AlertFloatBox").addClass(cssName);
}
if (displayClose)
{
  $(".AlertFloatBox #DialogClose").css("display","none");
}
$(".AlertFloatBox").css({display:"block",left:(($(document).width())/2-(parseInt(width)/2))+"px",top:(($(window).height() - $('.refresh_resume').outerHeight())/2 + $(document).scrollTop())+"px",width:width,height:height});
// $(".FloatBox .title .DialogClose").hover(function(){$(this).addClass("spanhover")},function(){$(this).removeClass("spanhover")});
}