    function getSiblingFrame(window, name)
    {
      for(i = 0; i < window.parent.frames.length; i++)
      {
        if(window.parent.frames[i].name == name)
        {
            return window.parent.frames[i];
        }
      }
    }

    function showWindow(url,name,width,height)
    {
        var options = "width="+width+",height="+height+",scrollbar=yes,status=no,toolbar=no,directories=no,menubar=no,location=no,resizable=yes,left=100,top=100";
        var hwnd = open(url, name, options);
    }

    function popupWindow(newURL)
    {
        open(newURL);
    }

    function popupPDF(newURL)
    {
        showWindow(newURL , '', 720, 560);
    }

    function popupImage(newURL)
    {
        showWindow('showImage.jsp?targetURL='+ newURL , '', 720, 560);
    }
    
    
    function deleteConfirm(cbId, illegalMesg, confirmMesg)
    {
        if(document.getElementById(cbId).checked)
        {
            alert(illegalMesg);
            return false;
        }
        else
        {
            return confirm(confirmMesg);
        }
    }
    
    function deleteConfirmLink(cbId)
    {
        return deleteConfirm(cbId, 
               'You cannot delete a link that is selected for display on the homepage. First uncheck the \'Display on homepage\' option for this link and then delete the link.',
               'Are you sure you want to delete this link?');
    }
    
    function deleteConfirmCalc(cbId)
    {
        return deleteConfirm(cbId, 
               'You cannot delete a calculator that is selected for display on the homepage. First uncheck the \'Display on homepage\' option for this calculator and then delete the calculator.',
               'Are you sure you want to delete this calculator?');
    }
    
    function deleteConfirmPage(cbId)
    {
        return deleteConfirm(cbId, 
               'You cannot delete a page which is selected for display. First uncheck the \'Display on site\' option for this page and then delete the page.',
               'Are you sure you want to delete this page?');
    }
    
    

