Nested If Else Syntax In Javascript Alert