A JavaScript function which will validate an ISBN. Works with ISBN-10 and ISBN-13.