Thanks for the link, though it didn't help me with my problem.
As on my attached file, I think, it's only a matter of manipulation with the script to work things fine. Hope someone out there may check my scripts so that I will know what went wrong with my scripts.
One more thing, I attached my files so that someone may know what my problem is, coz I think that if I only post the script code, you may wonder what problem I am pointing to.
Thanks again.