I wrote about how to do this for 1.6ST. Article located here: http://www.tmib.net/content/osticket-16-st-add-pending-status-and-autoclose-tickets-after-5-days(http://www.tmib.net/content/osticket-16-st-add-pending-status-and-autoclose-tickets-after-5-days)
I have not updated the mod for 1.7ST as of this time . A lot of the basics will remain the same, but there are some large changes to the osTicket source that will need to be taken into consideration.
You may be able to follow the mod and presuming you have some skill in PHP figure out how to do it in the current version. Once I finally get a chance to update the mod I will of course post about it here on the forums.