Hi Ganesh,
A JS is available on net(i dont have the link) that would do the same what you desire. I couldnt post the same coz if JS validation on javaranch. Please search adn
you should be able to find it. I had the same for my code..
Regards,
Roshani