function alignation()
{
    var x,y;    
    // общий синтаксис    
    if (self.innerHeight) {    
        x = self.innerWidth;    
        y = self.innerHeight;    
    // IE 6 Strict Mode    
    } else if (document.documentElement && document.documentElement.clientHeight) {    
        x = document.documentElement.clientWidth;    
        y = document.documentElement.clientHeight;    
    // Остальные версии IE    
    } else if (document.body) {    
        x = document.body.clientWidth;    
        y = document.body.clientHeight;    
    }
    var pause = (y-595-50)/3;
    document.getElementById('imgContainer').style.marginTop = pause+'px';
    document.getElementById('imgContainer').style.marginBottom = pause+'px';
}
window.onresize = alignation;
