includes/clientside/static/ajax.js
changeset 585 35e91d16ecf5
parent 582 a38876c0793c
child 592 27377179fe58
equal deleted inserted replaced
584:04a6ea3da279 585:35e91d16ecf5
  1037 };
  1037 };
  1038 
  1038 
  1039 window.aboutKeepAlive = function()
  1039 window.aboutKeepAlive = function()
  1040 {
  1040 {
  1041   new MessageBox(MB_OK|MB_ICONINFORMATION, $lang.get('user_keepalive_info_title'), $lang.get('user_keepalive_info_body'));
  1041   new MessageBox(MB_OK|MB_ICONINFORMATION, $lang.get('user_keepalive_info_title'), $lang.get('user_keepalive_info_body'));
  1042 }
       
  1043 
       
  1044 window.ajaxShowCaptcha = function(code)
       
  1045 {
       
  1046   var mydiv = document.createElement('div');
       
  1047   mydiv.style.backgroundColor = '#FFFFFF';
       
  1048   mydiv.style.padding = '10px';
       
  1049   mydiv.style.position = 'absolute';
       
  1050   mydiv.style.top = '0px';
       
  1051   mydiv.id = 'autoCaptcha';
       
  1052   mydiv.style.zIndex = String( getHighestZ() + 1 );
       
  1053   var img = document.createElement('img');
       
  1054   img.onload = function()
       
  1055   {
       
  1056     if ( this.loaded )
       
  1057       return true;
       
  1058     var mydiv = document.getElementById('autoCaptcha');
       
  1059     var width = getWidth();
       
  1060     var divw = $dynano(mydiv).Width();
       
  1061     var left = ( width / 2 ) - ( divw / 2 );
       
  1062     mydiv.style.left = left + 'px';
       
  1063     fly_in_top(mydiv, false, true);
       
  1064     this.loaded = true;
       
  1065   };
       
  1066   img.src = makeUrlNS('Special', 'Captcha/' + code);
       
  1067   img.onclick = function() { this.src = this.src + '/a'; };
       
  1068   img.style.cursor = 'pointer';
       
  1069   mydiv.appendChild(img);
       
  1070   domObjChangeOpac(0, mydiv);
       
  1071   var body = document.getElementsByTagName('body')[0];
       
  1072   body.appendChild(mydiv);
       
  1073 }
  1042 }
  1074 
  1043 
  1075 window.ajaxUpdateCheck = function(targetelement)
  1044 window.ajaxUpdateCheck = function(targetelement)
  1076 {
  1045 {
  1077   if ( !document.getElementById(targetelement) )
  1046   if ( !document.getElementById(targetelement) )