function HideContent(d) {
	if(d.length < 1) { return; }
		document.getElementById(d).style.display = "none";
}

function ShowContent(d,mouseX,mouseY) {
	if(d.length < 1) { return; }
		var pageXOffset = 8;
		var pageYOffset = 8;
		document.getElementById(d).style.display = "block";

		var docwidth = document.body.offsetWidth;
		var docheight = document.body.offsetHeight;
		
		//alert('docwidth: ' + docwidth + '\n docheight: ' + docheight);
		if (docwidth - mouseX < 490) {
			xcoord = mouseX + document.body.scrollLeft - 490;
		} else {
			xcoord = mouseX + document.body.scrollLeft + 8;
		}
		
		if (docheight - mouseY < 370) {
			ycoord = mouseY + document.body.scrollTop - 370;
		} else {
			ycoord = mouseY + document.body.scrollTop + 8;
		}
		
		document.getElementById(d).style.left = xcoord;
		document.getElementById(d).style.top = ycoord

}

function ShowContentSmall(d,mouseX,mouseY) {
	if(d.length < 1) { return; }
		var pageXOffset = 8;
		var pageYOffset = 8;
		document.getElementById(d).style.display = "block";

		var docwidth = document.body.offsetWidth;
		var docheight = document.body.offsetHeight;
		
		//alert('docwidth: ' + docwidth + '\n docheight: ' + docheight);
		if (docwidth - mouseX < 330) {
			xcoord = mouseX + document.body.scrollLeft - 330;
		} else {
			xcoord = mouseX + document.body.scrollLeft + 8;
		}
		
		if (docheight - mouseY < 250) {
			ycoord = mouseY + document.body.scrollTop - 250;
		} else {
			ycoord = mouseY + document.body.scrollTop + 8;
		}
		
		document.getElementById(d).style.left = xcoord;
		document.getElementById(d).style.top = ycoord

}

function ReverseContentDisplay(d) {
	if(d.length < 1) { return; }
	if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
	else { document.getElementById(d).style.display = "none"; }
}