Heartbeat Javascript.

Created heartbeat javascript to check if server is online.