Copiar código del código de la siguiente manera:
// ------------------------------------------
// PopDivids: la identificación de la capa div
// dragdivid: se usa para arrastrar la identificación del div
// isshowmask: si se muestra la capa de máscara
Función PopDivShow (PopDivid, DragDivid, Isshowmask) {
if (isshowmask) {
Creatmask (popDivid);
}
var dueño = document.getElementById (popDivid);
var dueño_tital = document.getElementById (dragDivid);
var bdrag = false;
Var disx = disy = 0;
owins.style.display = "bloque";
owins_tital.onmousedown = function (evento) {{
Var Every = Event || Window.Event;
bdrag = verdadero;
disx = event.clientx -owins.offsetLect;
disy = event.clienty -owins.offsettop;
this.setCapture && s.setCapture ();
Devolver falso;
};
document.onmouseMove = function (evento) {
if (! bdrag)
Devolver;
Var Every = Event || Window.Event;
var il = event.clientx -disx;
var it = event.clienty -disy;
var maxl = document.documentedlement.clientwidth -owins.offsetWidth;
var maxt = document.documentedlement.clientheight -owins.offsetheight;
Il = il <0? 0: il;
Il = il> maxl?
It = it <0?
it = it> maxt?
owins.style.margintop = owins.style.marginleft = 0;
owins.style.left = il + "px";
owins.style.top = it + "px";
Devolver falso;
};
document.onmouseup = window.onblur = owins_title.onloseCapture = function () {
bdrag = falso;
Owins_tital.ReleaseCapture && Pins_title.ReleaseCapture ();
};
}
// ocultar la capa pop -up
Función popDivhidden (popDivid) {{
var dueño = document.getElementById (popDivid);
owins.style.display = "Ninguno";
Window.parent.document.body.removechild (window.parent.document.getElementById ("MaskDiv")
}
// consigue la capa pop -up zindex
Función getzindex (popDivid) {
varpodiv = document.getElementById (popDivid);
varpodivzindex = popDiv.style.zindex;
Devolver popDivzindex;
}
// crear una capa de máscara
Function createMask (popDivid) {{
// Parámetro W es el ancho de la página pop -Up, el parámetro H es la altura de la página pop -Up, el parámetro s es la ruta de la página pop -Up
var mas a maskdiv = window.parent.document.createElement ("div");
MaskDiv.id = "MaskDiv";
Maskdiv.style.Position = "fijo";
Maskdiv.style.top = "0";
Maskdiv.style.left = "0";
Maskdiv.style.zindex = getzindex (popDivid) -1;
Maskdiv.style.backgroundcolor = "#333";
Maskdiv.style.filter = "alfa (opacidad = 70)";
Maskdiv.style.opacity = "0.7";
Maskdiv.style.width = "100%";
Maskdiv.style.head = (window.parent.document.body.scrollheight + 50) + "px";
window.parent.document.body.appendchild (MaskDiv);
MaskDiv.onMousEdown = function () {
Window.parent.document.body.removechild (window.parent.document.getElementById ("MaskDiv")
};
}