/* Hide Button */
HideAssociatedViewButton('esp_quote_esp_shippingmark', 'Add existing Shipping Mark to this record');
function HideAssociatedViewButton(loadAreaId, buttonTitle)
{
var navElement = document.getElementById('nav_' + loadAreaId);
if (navElement != null)
{
navElement.onclick = function LoadAreaOverride()
{
// Call the original method to launch the navigation link
loadArea(loadAreaId);
var associatedViewIFrame = document.getElementById(loadAreaId + 'Frame');
if (associatedViewIFrame != null)
{
associatedViewIFrame.onreadystatechange = function HideTitledButton()
{
if (associatedViewIFrame.readyState == 'complete')
{
var iFrame = frames[window.event.srcElement.id];
var liElements = iFrame.document.getElementsByTagName('li');
for (var i = 0; i < liElements.length; i++)
{
if (liElements[i].getAttribute('title') == buttonTitle)
{
liElements[i].style.display = 'none';
break;
}
}
}
}
}
}
}
}
HideAssociatedViewButton('esp_quote_esp_shippingmark', 'Add existing Shipping Mark to this record');
function HideAssociatedViewButton(loadAreaId, buttonTitle)
{
var navElement = document.getElementById('nav_' + loadAreaId);
if (navElement != null)
{
navElement.onclick = function LoadAreaOverride()
{
// Call the original method to launch the navigation link
loadArea(loadAreaId);
var associatedViewIFrame = document.getElementById(loadAreaId + 'Frame');
if (associatedViewIFrame != null)
{
associatedViewIFrame.onreadystatechange = function HideTitledButton()
{
if (associatedViewIFrame.readyState == 'complete')
{
var iFrame = frames[window.event.srcElement.id];
var liElements = iFrame.document.getElementsByTagName('li');
for (var i = 0; i < liElements.length; i++)
{
if (liElements[i].getAttribute('title') == buttonTitle)
{
liElements[i].style.display = 'none';
break;
}
}
}
}
}
}
}
}