var isInternetExplorer = document.all?true:false;

function doDefaultButton(e, buttonid)
{ 
      var evt = e ? e : window.event;
      var bt = document.getElementById(buttonid);
      if (bt)
      { 
          if (evt.keyCode == 13)
          { 
                bt.click(); 
                return false; 
          } 
      } 
}
function isChild(parent, child)
{
    while(child.parentElement != null && child != parent)
        child = child.parentElement;
    return child == parent;
}
function switchLinkToLoadingImage(href)
{
    switchLinkToImage(href, "/images/v2/blue_spinning_ball.gif");
}
function switchLinkToImage(href, newImageUrl)
{
    switchLinkToImage(href, newImageUrl, "Loading...");
}
function switchLinkToImage(href, newImageUrl, newImageAlt)
{
    var parent = href.parentNode;
    var img = document.createElement("img");
    img.src = newImageUrl;
    img.alt = newImageAlt;
    parent.replaceChild(img, href);
}
function openScrollablePopupWindow(url, width, height)
{
	window.open(url, "", "width=" + width + ",height=" + height + ",top=20,left=20,location=no,menubar=no,toolbar=no,scrollbars=yes,resizable=no");
}