select vertex by Z axis

when working with editable/edit poly - select one vertex and script must select all vertexs which are on the same Z
i guess ot is simple but i'm totally not into maxscript. please help