javascript to use with drawpad's site