function show (evt, id) {

 var evt = evt || window.event;
 var o = evt.target || evt.srcElement;
 var f = document.getElementById('cur_popup_note');

 var bbtn_center=(document.body.offsetWidth/2)+195;
 var bcenter =(document.body.offsetWidth/2)-210;

 if (f == null) {

  f = document.createElement('div');
  f.setAttribute ('id', 'cur_popup_note');
  f.setAttribute ('style', 
  'progid:DXImageTransform.Microsoft.Alpha(opacity=100); '+
  'opacity: 1;position:fixed;  top: 66px; left: '+ bbtn_center+'px;'+
  'width:400px; height:570px');
  f.setAttribute('class', 'popup');
  document.body.appendChild(f);
 }
 f.opacityFilter = 0; 
 f.innerHTML = '<img src="/banner/x.gif" height="13" width="13" border="0" id="x_image" '+
  'style="cursor:pointer;position:fixed;top:66px;left:'+bbtn_center+'px;z-index:100000" onclick="hide();opacity: 1;">'+
  '<div style="pisition:fixed;padding: 10px; top:75px; left:'+bcenter+'px;">' +  
  '<A href="https://online.moscombank.ru">'+
  '<IMG src="/banner/bonlineb.jpg" class ="popup" width="400" height="570" style="position:fixed;z-index:10000;top:75px; left:'+bcenter+'px;"></A>'+
   + '</div>';

 f.className = 'popup_active';


 f.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + (f.opacityFilter * 100) + ');';
 f.style.opacity = f.opacityFilter;
 f.style.display = 'block';

/*
 var o_coords = getPosition(o);
 var f_coords = getPosition(f);
 var calculatedTop = (f.offsetTop + (o_coords.top - f_coords.top));
 var calculatedLeft = (f.offsetLeft + (o_coords.left - f_coords.left));
 if (calculatedTop + f.offsetHeight > document.body.offsetHeight) 
  calculatedTop = document.body.offsetHeight - f.offsetHeight;
 if (calculatedLeft + 400 > document.body.offsetWidth) 
  calculatedLeft = document.body.offsetWidth - 420; 
 f.style.top = calculatedTop + 'px';
 f.style.left = calculatedLeft + 'px'; */
window.setTimeout('animate()', 10);

 f.style.top =  75 + 'px';
 f.style.left =  bcenter+'px';
 
 fi.style.top =  70 + 'px';
 fi.style.left =  bcenter+'px';
 
 fa.style.top =  70 + 'px';
 fa.style.left =  bcenter+'px';
 
  
 evt.cancelBubble = true;
 return false;
}
 
function hide() {
 var div = document.getElementById('cur_popup_note');
 if (div != null) {
  div.className = 'footnote_new';
  div.style.display = 'none';
 }
 return false;
}
 
function animate() {
 var f = document.getElementById('cur_popup_note');
 f.opacityFilter += 0.05;
 f.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + (f.opacityFilter * 100) + ');';
 f.style.opacity = f.opacityFilter;
 if (f.opacityFilter<1) window.setTimeout('animate()', 50);
}
 
function getPosition(offsetTrail) {
 var offsetLeft = 0;
 var offsetTop = 0;
 while (offsetTrail) {
  offsetLeft += offsetTrail.offsetLeft;
  offsetTop += offsetTrail.offsetTop;
  offsetTrail = offsetTrail.offsetParent;
 }
 return { left:offsetLeft, top:offsetTop }
}

