Rewrote history.php javascript

table expanding now works properly