Thanks Richard I will use this as the basis for future scripts. Much appreciated.