Complete javascript for war project