Might give some ideas to those working on template expanders: "Using functional programming techniques to write elegant JavaScript" http://www-128.ibm.com/developerworks/library/wa-javascript.html jay