Javascript Function Example Problems For Half Life