portal site js code