window id and display index functions