Folders to not have the onClick Event

So how do i go about making only the pages in the tree menu get the onlick and not the pages and folders.

You may try to apply the enableActiveImages method:
tree.enableActiveImages(false)

sorry, let me be more clear. i only want the children have the onclick event. not the parent folders and titles.

You may check if item is folder or leaf using hasChildren method:

tree.attachEvent("onClick",function(id){ if(!this.hasChildren(id)){ /*your code here*/ } })