thanx for the code,I've been trying to figure this out for hours