set a global variable to hold a tipestamp, on the buttons click event, compare the existing timestamp with the timestamp at wich the event was fired, if the diference is lesser than x milisecs then ignore it and save the new timestamp.
This in a nutshell...do some digging and experimenting