1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
function createPopUp(Title,Width,Height,Page,Param1,Param2,Param3,Param4,Param5,Param6,Param7,Param8,Param9)
{
var me = this;
if ( !xGetElementById('popup') )
{
me.popup = document.createElement('div');
me.popup.id = 'popup';
me.popup.className = 'popup';
if ( !Width )
{
Width = 450;
}
if ( !Height )
{
Height = 150;
}
me.popup.style.width = Width + 'px';
me.popup.style.height = Height + 'px';
me.popup_topbar = document.createElement('div');
me.popup_topbar.className = 'popuptop';
me.popup_toptxt = document.createElement('span');
me.popup_closebtn = document.createElement('div');
me.popup_closebtn.className = 'popupclose';
me.popup_body = document.createElement('div');
me.popup_body.className = 'popupbody';
me.popup_body.style.height = (Height - 20) + 'px';
me.popup_content = document.createElement('div');
me.popup_content.className = 'popupcontent';
me.popup_content.id = 'popupbody';
document.body.appendChild(me.popup);
me.popup.appendChild(me.popup_topbar);
me.popup_topbar.appendChild(me.popup_toptxt);
me.popup_topbar.appendChild(me.popup_closebtn);
me.popup.appendChild(me.popup_body);
me.popup_body.appendChild(me.popup_content);
me.popup_closebtn.onclick = function()
{
document.body.removeChild(me.popup);
}
function barDrag(e, mdx, mdy)
{
var x = xLeft(me.popup) + mdx;
var y = xTop(me.popup) + mdy;
xMoveTo(me.popup, x, y);
}
--> me.popup_topbar.onclick = xEnableDrag(me.popup_topbar, '', barDrag);
} |
Partager