function show(id)
{
  if (document.getElementById)  
  {
    document.getElementById(id).style.display = 'block';
  }
}

//---------------------------------

function hide(id)
{
  if (document.getElementById)  
  {
    document.getElementById(id).style.display = 'none';
  }
}

//---------------------------------

function showhide(id)
{
  if (document.getElementById)  
  {
    if (document.getElementById(id).style.display != 'block')  document.getElementById(id).style.display = 'block';
    else                                                       document.getElementById(id).style.display = 'none';
  }
}


//---------------------------------


function openDirections(URL) 
{
  URL = "directions.php?where=" + URL;

  dir_win = window.open(URL,'directions','width=450,height=300,left=0,top=0,scrollbars,menubar,resizable');
  dir_win.focus();
}


//---------------------------------


function popurl(link, width, height)
{
  var externalWindow;

  externalWindow = window.open(link,"external",'toolbar,location,directories,status,menubar,scrollbars,resizable,left=0,top=0,width='+width+',height='+height);
  externalWindow.focus();
}


//---------------------------------


function openWindow(link, width, height)
{
  var photoWindow;
  var filenamesplit = link.split(".");
  var filenametype = filenamesplit[filenamesplit.length-1];

  if ((filenametype == "jpg") || (filenametype == "gif"))
  {
    photoWindow = window.open(link,"imageviewer",'toolbar=0,location=0,directories=0,status,menubar=0,scrollbars=0,resizable=0,left=0,top=0,width='+width+',height='+height);
  }
  else
  {
    photoWindow = window.open(link,"fileviewer",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars,resizable,left=0,top=0,width='+width+',height='+height);
  }

  photoWindow.resizeTo(width,height);
  photoWindow.focus();
}


//---------------------------------


function openPhoto(link, width, height)
{
  var photoWindow;

  photoWindow = window.open(link,"photoviewer",'toolbar=0,location=0,directories=0,status,menubar=0,scrollbars=0,resizable=0,left=0,top=0,width='+width+',height='+height);
  photoWindow.resizeTo(width,height);
  photoWindow.focus();
}


//---------------------------------


  function changeImages()
  {
    for (var i=0; i<changeImages.arguments.length; i+=2)
    {
      document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
    }
  }


//---------------------------------