
// закрытие окна GreyBox
function GB_Close()
{                          
    obj_olay = window.top.document.getElementById('GB_overlay');
    obj_olay.parentNode.removeChild(obj_olay);
    obj_win = window.top.document.getElementById('GB_window');     
    obj_win.parentNode.removeChild(obj_win);   
}

function getClientHeight()
{
  return document.compatMode=='CSS1Compat' && !window.opera?window.top.document.documentElement.clientHeight:window.top.document.body.clientHeight;
}

function SetMiddleGB()
{
    obj_win = window.top.document.getElementById('GB_window'); 
    win_h = obj_win.offsetHeight;
    w = getClientHeight();   
    itop=parseInt((w-win_h)/2); 
    obj_win.style.marginTop = itop+'px'; 
}