function tree(){
	this.leaves = new Array();
	this.add = addLeaf;
}

function leaf(x){
	if (document.getElementById("hoverDIV" + x)){
		if (document.getElementById("normalDIV" + x)){
			this.img = document.getElementById("normalDIV" + x);
			this.div = document.getElementById("hoverDIV" + x);
			this.img.div = this.div;
			this.div.img = this.img;
			this.img.onmouseover = showIMG;
			this.img.onmouseout = hideIMG;
			this.img.div.onmouseout = hideDIV;
			this.img.div.onmouseover = showDIV;
			this.div.style.display = "none";
		}
		else {
			document.getElementById("normalDIV" + x).style.display = "none";
		}
	}
}

function showIMG(){
	this.style.display = "none";
	this.div.style.display = "block";
}
function hideIMG(){
	this.style.display = "block";
	this.div.style.display = "none";
}
function showDIV(){
	this.style.display = "block";
	this.img.style.display = "none";
}
function hideDIV(){
	this.style.display = "none";
	this.img.style.display = "block";
}

function addLeaf(leaf){
	this.leaves[this.leaves.length] = leaf;
}