Client side javascript for sfap.co