final public static function getAlignedPosY($posY, $sizeY, $valign, $newAlign)
    {
        switch ($valign) {
            case 'top':
            case null:
                $valign = 'right';
                break;

            case 'bottom':
                $valign = 'left';
                break;
        }
        switch ($newAlign) {
            case 'top':
                $newAlign = 'right';
                break;

            case 'bottom':
                $newAlign = 'left';
                break;
        }
        return self::getAlignedPosX($posY, $sizeY, $valign, $newAlign);
    }