function doInsertImage()
{
  window.open ("browse.aspx", "ImgWindow","menubar=0,status=0,toolbar=0,location=0,directories=0,resizable=1,width=600,height=480");
}

function doInsertMovie()
{
  window.open ("Media.aspx", "ImgWindow","menubar=0,status=0,toolbar=0,location=0,directories=0,resizable=1,width=600,height=480");
  //"Recorder.aspx
}

function ShowTooltip(objImg, txtMsg)
{
    objTooltip = document.getElementById("DivTooltip");
    ImgDetails = GetDetails(objImg)
	objTooltip.style.left =  ImgDetails[0] + ImgDetails[2] + 5 + "px";
	objTooltip.style.top =  ImgDetails[1] + "px";
	objTooltip.innerHTML = "<font size='2'>" + txtMsg + "</font>";
	objTooltip.style.visibility = "visible";
}

function HideTooltip()
{
    objTooltip = document.getElementById("DivTooltip");
	objTooltip.style.visibility = "hidden";
}

// Get the details of offset elements
function GetDetails(Element)
{
	if (Element != null) {
		var Left=Element.offsetLeft;
		var Top=Element.offsetTop;
		var Width = Element.width;
		var Height = Element.height;
		while (Element.offsetParent != null)
		{
			Element = Element.offsetParent;
			Left += Element.offsetLeft;
			Top += Element.offsetTop;
		}
		return new Array(Left, Top, Width, Height);
	}
	else
		return new Array(0,0,0,0);
}
