moved some javascript to headers.php