var isInternetExplorer = document.all?true: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);
}
/*TODO: Remove this method as minified version has a copy.*/
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");
}

