// ******** expandElement.js ********

function expandElement(elementId)
{
  myElement = document.getElementById(elementId) ;
  myElementIcon = document.getElementById(elementId+'_icon') ;
  if (myElement.style.display=='none') {
//this is correct, but doesn't work for IE6
//    myElement.style.display = 'table-row' ;
//this seems to work for IE6 and Safari
    myElement.style.display = '' ;
    if (myElementIcon) { myElementIcon.src = '/Art/ExpandMinus.gif' ; } ;
  }
  else {
    myElement.style.display = 'none' ;
    if (myElementIcon) { myElementIcon.src = '/Art/ExpandPlus.gif' ; } ;
  } ;
}

// ******** hideMap.js ********

function hideMap(elementId)
{
  myElement = document.getElementById(elementId) ;
  myText = document.getElementById('hideMapText') ;
  if (myElement.style.opacity==""||myElement.style.opacity=="0.85") {
    myElement.style.opacity = 0 ;
    myText.innerHTML = 'Hide' ;
  }
  else {
    myElement.style.opacity = 0.85 ;
    myText.innerHTML = 'Show' ;
  } ;
}

// ******** loadingBanner.js ********

function LoadBetter() {
  MyElement = document.getElementById("topbanner") ;
//  if (MyElement) {
//    MyElement.style.backgroundImage = "url(/Photos/JenningsPond_20090606-dw.jpg)" ;
//    MyElement.title = "Jennings Pond, 06-Jun-2009, (ted crane)" ;
//  } ;
  if (MyElement) {
    MyElement.style.backgroundImage = "url(/Photos/MillerComfort_20090609-dw.jpg)" ;
    MyElement.title = "Looking southeast at the corner of East Miller and Comfort, 09-Jun-2009, (ted crane)" ;
  } ;
  MyElement = document.body ;
  if (MyElement) { MyElement.style.backgroundImage = "url(/Art/DanbyBackground.jpg)" ; } ;
  }

function LoadingBannerDone() {
  MyElement = document.getElementById("LoadingBanner") ;
  if (MyElement) { MyElement.style.visibility = "hidden" ; } ;
  }

function LoadingBannerDisplay() {
  document.write("<DIV ID=\"LoadingBanner\"") ;
  document.write("     STYLE=\"position: absolute;") ;
  document.write("            bottom: 20px; height:50px;") ;
  document.write("            left:250px; right: 250px; ") ;
  document.write("            background: #f33;") ;
  document.write("            border: thick dashed red;") ;
  document.write("            opacity: 0.60;") ;
  document.write("            z-index: 1;\">") ;
  document.write("<TABLE BORDER=0 WIDTH=100% HEIGHT=100%>") ;
  document.write("  <TR VALIGN=MIDDLE>") ;
  document.write("    <TD ID=\"LoadingBannerText\" ALIGN=CENTER") ;
  document.write("        STYLE=\"color: black; font-size: 16px;") ;
  document.write("              font-family: sans-serif; font-weight: bold;\">Loading...</TD>") ;
  document.write("  </TR>") ;
  document.write("</TABLE>") ;
  document.write("</DIV>") ;
  }

function LoadingBannerUpdate(NewText) {
  MyElement = document.getElementById("LoadingBannerText") ;
  if (MyElement) { MyElement.innerHTML = NewText ; } ;
  }
