includes/clientside/static/faders.js
changeset 151 824821224153
parent 53 3dea509d88ae
child 210 2b283402e4e4
child 320 112debff64bd
equal deleted inserted replaced
146:fa3dab3cfb08 151:824821224153
    91 function messagebox(type, title, message)
    91 function messagebox(type, title, message)
    92 {
    92 {
    93   var y = getScrollOffset();
    93   var y = getScrollOffset();
    94   if(document.getElementById('messageBox')) return;
    94   if(document.getElementById('messageBox')) return;
    95   darken(true);
    95   darken(true);
       
    96   if ( aclDisableTransitionFX )
       
    97   {
       
    98     document.getElementById('specialLayer_darkener').style.zIndex = '5';
       
    99   }
    96   var master_div = document.createElement('div');
   100   var master_div = document.createElement('div');
       
   101   master_div.style.zIndex = '6';
    97   var mydiv = document.createElement('div');
   102   var mydiv = document.createElement('div');
    98   mydiv.style.width = '400px';
   103   mydiv.style.width = '400px';
    99   mydiv.style.height = '200px';
   104   mydiv.style.height = '200px';
   100   w = getWidth();
   105   w = getWidth();
   101   h = getHeight();
   106   h = getHeight();
   102   //master_div.style.left = (w / 2) - 200+'px';
   107   if ( aclDisableTransitionFX )
   103   //master_div.style.top = (h / 2) + y - 120+'px';
   108   {
   104   master_div.style.top = '-10000px';
   109     master_div.style.left = ((w / 2) - 200)+'px';
   105   master_div.style.position = ( IE ) ? 'absolute' : 'fixed';
   110     master_div.style.top = ((h / 2) + y - 120)+'px';
   106   z = getHighestZ(); // document.getElementById('specialLayer_darkener').style.zIndex;
   111     master_div.style.position = 'absolute';
   107   mydiv.style.zIndex = parseInt(z) + 1;
   112   }
       
   113   else
       
   114   {
       
   115     master_div.style.top = '-10000px';
       
   116     master_div.style.position = ( IE ) ? 'absolute' : 'fixed';
       
   117   }
       
   118   z = ( aclDisableTransitionFX ) ? document.getElementById('specialLayer_darkener').style.zIndex : getHighestZ();
   108   mydiv.style.backgroundColor = '#FFFFFF';
   119   mydiv.style.backgroundColor = '#FFFFFF';
   109   mydiv.style.padding = '10px';
   120   mydiv.style.padding = '10px';
   110   mydiv.style.marginBottom = '1px';
   121   mydiv.style.marginBottom = '1px';
   111   mydiv.id = 'messageBox';
   122   mydiv.id = 'messageBox';
   112   mydiv.style.overflow = 'auto';
   123   mydiv.style.overflow = 'auto';
   113   
   124   
   114   var buttondiv = document.createElement('div');
   125   var buttondiv = document.createElement('div');
   115   buttondiv.style.width = '400px';
   126   buttondiv.style.width = '400px';
   116   w = getWidth();
   127   w = getWidth();
   117   h = getHeight();
   128   h = getHeight();
   118   // buttondiv.style.left = (w / 2) - 200+'px';
   129   if ( aclDisableTransitionFX )
   119   // buttondiv.style.top = (h / 2) + y + 101+'px';
   130   {
   120   // buttondiv.style.position = ( IE ) ? 'absolute' : 'fixed';
   131     //buttondiv.style.left = ((w / 2) - 200)+'px';
   121   z = getHighestZ(); // document.getElementById('specialLayer_darkener').style.zIndex;
   132     //buttondiv.style.top = ((h / 2) + y + 101)+'px';
   122   buttondiv.style.zIndex = parseInt(z) + 1;
   133   }
       
   134   //buttondiv.style.position = ( IE ) ? 'absolute' : 'fixed';
       
   135   z = ( aclDisableTransitionFX ) ? document.getElementById('specialLayer_darkener').style.zIndex : getHighestZ();
   123   buttondiv.style.backgroundColor = '#C0C0C0';
   136   buttondiv.style.backgroundColor = '#C0C0C0';
   124   buttondiv.style.padding = '10px';
   137   buttondiv.style.padding = '10px';
   125   buttondiv.style.textAlign = 'right';
   138   buttondiv.style.textAlign = 'right';
   126   buttondiv.style.verticalAlign = 'middle';
   139   buttondiv.style.verticalAlign = 'middle';
   127   buttondiv.id = 'messageBoxButtons';
   140   buttondiv.id = 'messageBoxButtons';
   263   master_div.appendChild(mydiv);
   276   master_div.appendChild(mydiv);
   264   master_div.appendChild(buttondiv);
   277   master_div.appendChild(buttondiv);
   265   
   278   
   266   body.appendChild(master_div);
   279   body.appendChild(master_div);
   267   
   280   
   268   setTimeout('mb_runFlyIn();', 100);
   281   if ( !aclDisableTransitionFX )
       
   282     setTimeout('mb_runFlyIn();', 100);
   269   
   283   
   270   this.onclick = new Array();
   284   this.onclick = new Array();
   271   this.onbeforeclick = new Array();
   285   this.onbeforeclick = new Array();
   272   mb_current_obj = this;
   286   mb_current_obj = this;
   273 }
   287 }
   291     o = false;
   305     o = false;
   292   }
   306   }
   293   
   307   
   294   var mydiv = document.getElementById('messageBox');
   308   var mydiv = document.getElementById('messageBox');
   295   var maindiv = mydiv.parentNode;
   309   var maindiv = mydiv.parentNode;
   296   var to = fly_out_top(maindiv, true, false);
   310   
   297   
   311   if ( aclDisableTransitionFX )
   298   setTimeout("var mbdiv = document.getElementById('messageBox'); mbdiv.parentNode.removeChild(mbdiv.nextSibling); mbdiv.parentNode.removeChild(mbdiv); enlighten(true);", to);
   312   {
       
   313     var mbdiv = document.getElementById('messageBox');
       
   314     mbdiv.parentNode.removeChild(mbdiv.nextSibling);
       
   315     mbdiv.parentNode.removeChild(mbdiv);
       
   316     enlighten(true);
       
   317   }
       
   318   else
       
   319   {
       
   320     var to = fly_out_top(maindiv, true, false);
       
   321     setTimeout("var mbdiv = document.getElementById('messageBox'); mbdiv.parentNode.removeChild(mbdiv.nextSibling); mbdiv.parentNode.removeChild(mbdiv); enlighten(true);", to);
       
   322   }
   299   if(typeof mb.onclick[val] == 'function')
   323   if(typeof mb.onclick[val] == 'function')
   300   {
   324   {
   301     o = mb.onclick[val];
   325     o = mb.onclick[val];
   302     o();
   326     o();
   303     o = false;
   327     o = false;