function opendiv(title, w, h,headsrc){
var titleheight = "22px"; // 提示窗口标题高度
var bordercolor = "#f8f8f8"; // 提示窗口的边框颜色
var titlecolor = "##005bac"; // 提示窗口的标题文字和xx颜色
var titlebgcolor = ""; // 提示窗口的标题背景色
var bgcolor = "#fff"; // 提示内容的背景色
var msg="";
var iwidth = document.documentelement.clientwidth;
var iheight = document.documentelement.clientheight;
var bgobj = document.createelement("div");
bgobj.style.csstext = "position:absolute;left:0px;top:0px;width:"+iwidth+"px;height:"+math.max(document.body.clientheight, iheight)+"px;filter:alpha(opacity=50);opacity:0.5;background-color:#000000;z-index:101;";
document.body.appendchild(bgobj);
var msgobj=document.createelement("div");
msgobj.style.csstext = "position:absolute;font:11px '宋体';top:"+(iheight-h)/2+"px;left:"+(iwidth-w)/2+"px;width:"+w+"px;height:"+h+"px;text-align:center;border:1px solid "+bordercolor+";background-color:"+bgcolor+";padding:1px;line-height:22px;z-index:102;";
document.body.appendchild(msgobj);
var table = document.createelement("table");
msgobj.appendchild(table);
table.style.csstext = "margin:0px;border:0px;padding:0px;";
table.cellspacing = 0;
var tr = table.insertrow(-1);
var titlebar = tr.insertcell(-1);
titlebar.style.csstext = "width:100%;height:"+titleheight+"px;text-align:left;padding:3px;margin:0px;font:16px 'microsoft yahei' '微软雅黑' '宋体';color:"+titlecolor+";border:1px solid " + bordercolor + ";cursor:move;background:url(images/newbg0.jpg) repeat-x";
titlebar.style.paddingleft = "10px";
titlebar.innerhtml = title;
var closebtn = tr.insertcell(-1);
closebtn.style.csstext = "cursor:pointer; padding:2px;background-color:" + titlebgcolor;
closebtn.innerhtml = "×";
closebtn.onclick = function(){
document.body.removechild(bgobj);
document.body.removechild(msgobj);
}
var msgbox = table.insertrow(-1).insertcell(-1);
msgbox.style.csstext = "font:10pt '宋体';";
msgbox.colspan = 2;
msgbox.innerhtml = msg;
// 获得事件event对象,用于兼容ie和firefox
function getevent() {
return window.event || arguments.callee.caller.arguments[0];
}
}