umm. i have posted the relevant code a long time ago.. search the sahder forums..