function openbrowser(image,title)
{
  action = window.open('showimage.php?image='+image+'&title='+escape(title),'bbviewwindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
}
// toggle visibility
function toggle( targetId )
{
  if (document.getElementById)
  {
  	target = document.getElementById( targetId );
		if (target.style.display == "none")
		{
 			target.style.display = "";
  	}
  	else
  	{
  		target.style.display = "none";
  	}
  }
}
function togglesubnav(targetId,nrids)
{
  for(i=1; i<=nrids; i++)
  {
    if (i != targetId)
    {
      target = document.getElementById("subnav"+i);
      if (target.style.display != "none")
      {
        target.style.display = "none";
      }
    }
  }
  toggle("subnav"+targetId);
  return false;
}
  function applyeffect()
  {
    if (document.all && photoslider.filters)
    {
      //photoslider.filters.revealTrans.Transition=Math.floor(Math.random()*23)
      photoslider.filters.revealTrans.Transition=12
      photoslider.filters.revealTrans.stop()
      photoslider.filters.revealTrans.apply()
    }
  }
  function playeffect()
  {
    if (document.all && photoslider.filters)
      photoslider.filters.revealTrans.play()
  }
  function keeptrack()
  {
    window.status="Image "+(which+1)+" of "+photos.length
  }
  function backward()
  {
    if (which>0)
    {
      which--
      applyeffect()
      document.images.photoslider.src=photos[which]
      playeffect()
      keeptrack()
    }
  }
  function forward()
  {
    if (which<photos.length-1)
    {
      which++
      applyeffect()
      document.images.photoslider.src=photos[which]
      playeffect()
      keeptrack()
    }
  }
  function start_slideshow()
  {
    setTimeout('slideshow()',4000);
  }
  function slideshow()
  {
    if (which>=photos.length-1)
    {
      which = -1;
    }
    forward();
    setTimeout('slideshow()',4000);
  }
  function transport()
  {
    window.location=photoslink[which]
  }
