var title;

function refreshTitle() {
    if (parent.frames.header != null) {
        if (parent.frames.header.document.all && (parent.frames.header.titletype != null)) {
            parent.frames.header.titletype.innerHTML = "<table width='100%'><tr><td colspan='2' height='20'></td></tr><tr><td width='3'></td><td><h2 id='title'></h2></td></tr></table>";
        } else {
            setTimeout("refreshTitle()", 100);
        }
        if (parent.frames.header.title != null) {
            parent.frames.header.title.innerHTML = title;
        } else {
            setTimeout("refreshTitle()", 100);
        }
    } else {
        setTimeout("refreshTitle()", 100);
    }
}

function refreshLogo(logoString)
{
  if (parent.frames.menu != null)
  {
    if (parent.frames.menu.logo != null)
    {
      parent.frames.menu.logo.innerHTML = logoString;
    }
    else
    {
      setTimeout("refreshLogo(logoString)", 100);
    }
  }
  else
  {
    setTimeout("refreshLogo(logoString)", 100);
  }
}

function setTitle(value) {
    title = value;
    refreshTitle();
}

function showLogo() {
    var logoStr = "<img src='images/apirlogo.gif'>";

    parent.headerframe.rows = "120,*";
    refreshLogo(logoStr);

}

function hideLogo() {
    var logoStr = "";

    parent.frames.header.title.innerHTML = "";
    parent.headerframe.rows = "45,*";
    refreshLogo(logoStr);
}

function showButton() {
    if (parent.frames.header.srchBtnDisplay != null) {
        parent.frames.header.srchBtnDisplay.innerHTML = "<a href='search.jsp' onmouseover='searchover();' onmouseout='searchout();' target='content'><img id='searchAgain' border='0' src='/public/images/but_searchagain.gif'></a>";
    }
}

function hideButton() {
    if (parent.frames.header.srchBtnDisplay != null) {
        parent.frames.header.srchBtnDisplay.innerHTML = "<img src='/public/images/blank.gif'>";
    }
}

function toggleList(e){
	element = document.getElementById(e).style;
	element.display == 'none' ? element.display = 'block' :
element.display='none';
}
