function getScrollPosY()
// this is used to get the current vertical position of the screen, for the profile popup
{
	if (window.pageYOffset != null)
	{
		return window.pageYOffset;
	}
	else if (document.body.scrollTop != null)
	{
//		return document.body.scrollTop; used to use this
		return document.documentElement.scrollTop;
	}
	return 0;
}


function hideLayer(whichLayer) {

if (document.getElementById) {
// this is the way the standards work
document.getElementById(whichLayer).style.visibility = "hidden";
}
else if (document.all) {
// this is the way old msie versions work
document.all[whichlayer].style.visibility = "hidden";
}
else if (document.layers) {
// this is the way nn4 works
document.layers[whichLayer].visibility = "hidden";
}

}

function showLayer(whichLayer,name,picture,profile) {
var position = getScrollPosY();
position = position + 150;
document.getElementById('boxthing').style.top = position +"px";


var pName = document.getElementById("pName");
var pPicture = document.getElementById("picture");
var pProfile = document.getElementById("profile");
pName.innerHTML = (name);
pPicture.innerHTML = ('<img src=' + picture + '>');
pProfile.innerHTML = (profile);
if (document.getElementById) {
// this is the way the standards work
document.getElementById(whichLayer).style.visibility = "visible";
}
else if (document.all) {
// this is the way old msie versions work
document.all[whichlayer].style.visibility = "visible";
}
else if (document.layers) {
// this is the way nn4 works
document.layers[whichLayer].visibility = "visible";
}

}

function handleClick(whichClick,name,picture,profile) {
if (whichClick == "hide it") {
// then the user wants to hide the layer
hideLayer("boxthing");

}
else if (whichClick == "show it") {
// then the user wants to show the layer
showLayer("boxthing",name,picture,profile);
}

}
