Try using the element's nextSibling property
function TreeViewOnClick() {
var item = window.event.srcElement;
if(item.tagName == 'INPUT' && item.type == 'checkbox') {
// a checkbox has been clicked
// now get the value from the corresponding anchor tag
// ...Here...
var hrefProp = item.nextSibling.getAttribute("href");
}
}
Keep in mind that you may end up getting returned a text node and will need to check for this.