var oldId, oldBgColor;

function hiddenLayer(elem)
	{
	document.getElementById(elem).style.visibility = 'hidden';
	lightOff();
	}

function showLayer(elem)
	{
	document.getElementById(elem).style.visibility = 'visible';
	}

function lightOn(elem,color)
	{
	oldId = elem;
	oldBgColor = document.getElementById(elem).style.background;
	document.getElementById(elem).style.background = color;
	}

function lightOff()
	{
	document.getElementById(oldId).style.background = oldBgColor;
	}


var thumb = null;
function showThumbnail(which,e,t)
   {
    thumb = document.getElementById('thumb');
    if( thumb && thumb.style.visibility == 'hidden' )
      {
       thumb.style.left       = e.pageX ? pageXOffset + e.clientX + 20 : document.body.scrollLeft + e.x + 20;
       thumb.style.top        = e.pageY ? pageYOffset + e.clientY : document.body.scrollTop  + e.y;
       thumb.style.visibility = 'visible';
       thumb.innerHTML        = '<table width=400 align=center bgcolor=#157EA5 cellpadding=0 cellspacing=0><tr align=center><td><font color=white>'+t+'</font><td></tr><tr align=center><td><img align=center src="' + which + '"></td></tr></table>';
      }
   }

function closeThumbnail()
   {
    if(thumb)
	   thumb.style.visibility = 'hidden';
   }

function l_image(a,t)
  {
  document.images.tool.src=a;
  photo_preview.innerHTML = '<table width=400 align=center cellpadding=0 cellspacing=0 border=0><tr align=center><td class=text>'+t+'</td></tr></table>';
  }
