I tried copying the solution provided by Alan Cochran in the Share Knowledge forum.
I created my own js file in Dreamweaver, copied it to the Web/Scripts folder and added it in the Web Server properties.
I defined the global variable in my dictionary and set up the field code as instructed.
However it did not work regrettably. I wondered if anyone had got that working and/or if there was a small example app anyone could post or send to me.
I kept my own script file as I was intending to build up a library of functions over time and thought separating them was the best method.
Thanks
John