added the javascript function for demo GADGET parameters