﻿// Added on March 2, 2008
// Find Position
function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}

// Display Popup window
function display_Popup(parent,imgurl)  {
	           //get the named ToUserList
	           //var popup_element = document.getElementById('divPopup');
	           var menu_element = document.getElementById('divImgLarge');
	           //override the 'display:none;' style attribute
	           menu_element.style.display = "";
	           //get the placement of the element that invoked the <strong class="highlight">menu</strong>...
	           var placement = findPos(parent);    // hardcode the extra height value
	           //...and put the <strong class="highlight">menu</strong> there
	           menu_element.style.left = placement[0] + "px";
	           menu_element.style.top = placement[1] + "px";

               menu_element.innerHTML = "<img src='" + imgurl + "' />";
	           return true;
}

// Hide Popup window
function hide_popup(named) {
	            //get the named <strong class="highlight">menu</strong>
	            var menu_element = document.getElementById(named);
	            //hide it with a style attribute
	            menu_element.style.display = "none";
}







