treenode.prototype.getRoot = function(){
	var currentNode = this;
	while(currentNode.parentNode.oNode.oNodeImg){
		currentNode = currentNode.parentNode;
	}
	return currentNode;
}
treenode.prototype.isRoot = function(){
	return (this.getRoot() == this);
}

function prepareSafari ( string ){
	// in this function we replace characters to avoid errors in Safari
	var cleanedString;
	cleanedString = string;
	for (i=0; i<10; i++) {
		cleanedString = cleanedString.replace('&#38;','&');
	}
	
	return cleanedString;
}