﻿//showToolDiv(event, 450, 250, -350, 10, 'common/toolTip/term.aspx?termId=64');
// function replaces the old mechanism for divs. First param is legacy.
function showToolDiv(event, width, height, centerLeftOffset, centerTopOffset, url)
{
   //go to the url with ajax
   $.ajax({      
      url: url,                  
      success: popupLoadSuccess,
      error: popupLoadFailed
   });
   // html the result in the popup.
   $("#divPopup").dialog("option", "width", width);
   $("#divPopup").dialog("option", "height", height);
   //$("#divPopup").dialog("option", "position", [event.]);
   $("#divPopup").dialog("open");
}
function popupLoadSuccess(result)
{
   $("#divPopup").html(result);
}

function popupLoadFailed(result)
{
   $("#divPopup").dialog("close");
}
//showToolDivFixPosition(650, 580, (document.documentElement.clientWidth - 650) / 2, 10, path);
function showToolDivFixPosition(width, height, centerLeftOffset, centerTopOffset, url)
{
   showToolDiv(null, width, height, centerLeftOffset, centerTopOffset, url);
}

function openDiv(path)
{
    showToolDivFixPosition(650, 580, (document.documentElement.clientWidth - 650) / 2, 10, path);
}
