function showPopup(elemName)
{
        if(!elemName)
        {
            return;
        }
        elemName = typeof div === "string" ? document.getElementById(elemName) : elemName;
		document.getElementById("popup").style.top = (GetTop(elemName) + elemName.offsetHeight)+"px";
		document.getElementById("popup").style.left = (GetLeft(elemName) +30) + "px";
		document.getElementById("popup").style.backgroundImage = 'url(images/popup_bkd.gif)';
		
		caption = "";
		imgCourtesy = "";
		switch(elemName.id)
		{
			case "rhino2":
			caption = "<b>Dorsal Hump:</b> This patient desired refinement of the 'bump' on her nose as well as improvement in breathing due to a severely deviated septum, which were both repaired using a endonasal or closed rhinoplasty technique.";
			imgCourtesy = "Images courtesy of Kapil Saigal";
			break;
			case "rhino3":
			caption = "<b>Dorsal Hump/Ethnic rhinoplasty:</b> This patient wanted to preserve her ethnic appearance, while eliminating the 'bump' on her nose, which was accomplished without the use of any external incisions, or with a closed rhinoplasty technique.";
			imgCourtesy = "Images courtesy of Kapil Saigal";
			break;
			case "rhino4":
			caption = "<b>Ethnic rhinoplasty/Traumatic nasal deformity:</b> This patient had a history of nasal trauma, as well as difficulty breathing and excess tissue in the Ala, or sides of his nose. This deformity was repaired by Dr. Saigal with the patient's own septal cartilage using an endonasal technique, as well as external sculpting of his nasal width.";
			imgCourtesy = "Images courtesy of Kapil Saigal";
			break;
			case "rhino5":
			caption = "<b>Traumatic nasal deformity:</b> This patient suffered a nasal and septal fracture that was reduced by Dr. Saigal using a endonasal, minimally invasive technique.";
			imgCourtesy = "Images courtesy of Kapil Saigal";
			break;
		}
		document.getElementById("popup").innerHTML = "<img src=\"images/popup_top.gif\" alt=\"\" /><div class=\"fcCaption\">"+caption+"<br /><span class=\"fcCapName\">"+imgCourtesy+"</span></div><img src=\"images/popup_bot.gif\" alt=\"\" />";
		document.getElementById("popup").style.display ="block";
}
function hidePopup(){document.getElementById("popup").style.display ="none";}
function GetTop(ele)
{
  if (ele.offsetParent)
	return (ele.offsetTop + GetTop(ele.offsetParent));
  else
	return (ele.offsetTop);
}
function GetLeft(ele)
{
  if (ele.offsetParent)
	return ele.offsetLeft + GetLeft(ele.offsetParent);
  else
	return ele.offsetLeft;
}
