Added revised javascript syntax.