dave - added javascript support.