Copy Code code as follows:
JavaScript Document
var dv;
var dvmsg;
function Customalert ()
{
Dvmsg = document.createelement ("div");
DvMsg.style.position = "absolute";
Dvmsg.setattribute (' id ', ' msg ');
DvMsg.style.width = "600px";
dvMsg.style.padding = "10 0 2 0";
DvMsg.style.height = "313px";
DvMsg.style.background = "#EF621D";
DvMsg.style.border = "1px solid #6699dd";
DvMsg.style.zIndex = "1112";
Document.body.appendChild (DVMSG);
document.getElementById ("msg"). Style.top = Document.documentElement.scrollTop + ( Document.documentelement.clientheight-document.getelementbyid ("msg"). offsetheight)/2 + "px";
document.getElementById ("msg"). Style.left = Document.documentElement.scrollLeft + ( Document.documentelement.clientwidth-document.getelementbyid ("msg"). offsetwidth)/2 + "px";
var IMGs = document.createelement ("div");
Imgs.setattribute ("id", "pic");
Imgs.title = "Close";
Imgs.style.float = "Left";
Imgs.style.height = "20px";
imgs.innerhtml = "<a href=\" http://www.jb51.net\ "target=\" _blank\ "></a>";
Imgs.style.color = "#FFF";
Imgs.style.textAlign = "right";
Imgs.style.cursor = "pointer";
Imgs.style.zIndex = "1114";
Imgs.onclick = function ()
{
Document.body.removeChild (DVMSG);
Document.body.removeChild (DV);
}
document.getElementById ("msg"). appendchild (IMGs);
var divstr = document.createelement ("div");
Divstr.setattribute ("id", "info");
Divstr.style.left = "0";
Divstr.style.position = "absolute";
Divstr.style.marginTop = "10px";
Divstr.style.zIndex = "1115";
divstr.innerhtml = "<embed src=\" gallery/header2.swf\ "pluginspage=\" http://www.macromedia.com/shockwave/ Download/\ "width=\" 600\ "height=\" 313\ "></embed>";
document.getElementById ("msg"). appendchild (DIVSTR);
}
function Scrolldivs ()
{
document.getElementById ("msg"). style.top=document.documentelement.scrolltop+ ( Document.documentelement.clientheight-document.getelementbyid ("msg"). offsetheight)/2+ "px";
document.getElementById ("msg"). style.left=document.documentelement.scrollleft+ ( Document.documentelement.clientwidth-document.getelementbyid ("msg"). offsetwidth)/2+ "px";
}
Window.attachevent ("OnResize", Scrolldivs);
Window.onscroll=scrolldivs;
Window.onload=scrolldivs;