Javascript RRD working