// Sets the z-index of the top most layer
var TOP_Z_INDEX = 10000;

// Function to init the iframe helpers
function initIframeHelpers()
{
  /*
  if (false) {
  // if (IE5 || IE6) {
    // Initialize the parent
    var IFRAME_DIV_HELPER_PARENT = document.getElementsByTagName('BODY').item(0);

    // Initialize the root menu iframe and add it to the parent document
    var IFRAME_HELPER_ROOT_MENU = document.createElement('IFRAME');
    IFRAME_HELPER_ROOT_MENU.setAttribute('id',IFRAME_HELPER_ROOT_NAME);
    IFRAME_HELPER_ROOT_MENU.src            = BLANK_PAGE_URL;
    IFRAME_HELPER_ROOT_MENU.style.border   = 0;
    IFRAME_HELPER_ROOT_MENU.width          = 0;
    IFRAME_HELPER_ROOT_MENU.height         = 0;
    IFRAME_HELPER_ROOT_MENU.style.position = 'absolute';
    IFRAME_DIV_HELPER_PARENT.appendChild(IFRAME_HELPER_ROOT_MENU);
  }
  */
}

// Function to hide iframe helper with the specified id
function hideIframeHelper(id)
{
  document.getElementById(id).style.visibility  = 'hidden';
  document.getElementById(id).style.zIndex      = -1000;
}

// Function to show iframe helper with the specified id
function showIframeHelper(iframeHelperId,x,y,w,h)
{
  //alert('id:' + iframeHelperId + ' |x:' + x + ' |y:' + y + ' |w:' + w + ' | h:' + h );
  
  if (!document.getElementById(iframeHelperId)) {
    return false;
  }
  document.getElementById(iframeHelperId).style.left        = x;
  document.getElementById(iframeHelperId).style.top         = y;
  if (w != 'undefined') {
    document.getElementById(iframeHelperId).style.width       = w + 'px';
  }
  else {
    // alert('invalid width: "' + w + '"');
  }
  if (h != 'undefined') {
    document.getElementById(iframeHelperId).style.height      = h + 'px';
  }
  else {
    // alert('invalid height: "' + w + '"');
  }
  document.getElementById(iframeHelperId).style.zIndex      = 1;
  document.getElementById(iframeHelperId).style.visibility  = 'visible';
}
